Pārlūkot izejas kodu

[카테고리메인][Common] 스피너 아이템 수정중

Hasemi 7 gadi atpakaļ
vecāks
revīzija
2a2ab25efc

+ 7 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type1/FirstCategoryMainFragment.java

@@ -13,6 +13,7 @@ import android.view.ViewGroup;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.Spinner;
+import android.widget.TextView;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -70,17 +71,21 @@ public class FirstCategoryMainFragment extends FragmentBase<FirstCategoryMainPre
     viewFilter = findViewById(R.id.first_category_main_filter);
     spinnerOrder = findViewById(R.id.spinner_select_contents);
     List<String> spinnerList = Arrays.asList(ResourceUtil.getStringArray("main_filter"));
-    ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.support_simple_spinner_dropdown_item, spinnerList) {
+    ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.spinner_item, spinnerList) {
       @Override
       public View getDropDownView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
         View view = super.getDropDownView(position, convertView, parent);
         //초기값 설정
         if (selectedIndex == -1) {
-          if (position == 0) {view.setBackgroundColor(getResources().getColor(R.color.CE5E5E5));}
+          if (position == 0) {
+            view.setBackgroundColor(getResources().getColor(R.color.CE5E5E5));
+            ((TextView)view.findViewById(R.id.spinner_text)).setTextColor(getResources().getColor(R.color.CF27824));
+          }
         }
         //select 된 값 지정
         if (position == selectedIndex) {
           view.setBackgroundColor(getResources().getColor(R.color.CE5E5E5));
+          ((TextView)view.findViewById(R.id.spinner_text)).setTextColor(getResources().getColor(R.color.CF27824));
         }
         return view;
       }

+ 1 - 1
app/src/main/res/drawable/filter_drop_down.xml

@@ -16,7 +16,7 @@
 
           <padding android:bottom="3dp"
                    android:left="0dp"
-                   android:right="3dp"
+                   android:right="8dp"
                    android:top="3dp" />
         </shape>
       </item>

+ 21 - 6
app/src/main/res/layout/custom_listicle_image_view.xml

@@ -15,14 +15,15 @@
     android:nestedScrollingEnabled="false">
 
   </android.support.v7.widget.RecyclerView>
+
   <View
     android:layout_width="match_parent"
     android:layout_height="183dp"
     android:background="@drawable/listicle_dim_top"
-    app:layout_constraintTop_toTopOf="parent"
     android:rotation="180"
     app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="parent"
     />
 
   <View
@@ -38,9 +39,9 @@
     android:layout_width="match_parent"
     android:layout_height="190dp"
     android:background="@drawable/listicle_dim_bottom_30"
+    app:layout_constraintBottom_toBottomOf="parent"
     app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintStart_toStartOf="parent"
-    app:layout_constraintBottom_toBottomOf="parent"
     />
 
   <View
@@ -53,15 +54,29 @@
     app:layout_constraintTop_toTopOf="parent"
     />
 
+  <TextView
+    android:id="@+id/text_view_copy_right"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="25dp"
+    android:layout_marginBottom="14dp"
+    android:gravity="center_horizontal"
+    android:lineSpacingExtra="3sp"
+    android:textColor="@color/C888888"
+    android:textSize="8sp"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    android:text="© instagram @robococodd"
+    tools:textColor="@color/C000000"/>
+
   <android.support.constraint.ConstraintLayout
     android:id="@+id/layout_pager"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:layout_marginStart="18dp"
-    android:layout_marginTop="19dp"
+    android:layout_marginEnd="18dp"
     android:layout_marginBottom="11dp"
     app:layout_constraintBottom_toBottomOf="parent"
-    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
     tools:background="@color/CD0D0D0">
 
     <ImageView
@@ -180,7 +195,7 @@
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_marginStart="25dp"
-    android:layout_marginBottom="12dp"
+    android:layout_marginBottom="4dp"
     android:lineSpacingExtra="4dp"
     android:textColor="@color/CFFFFFF"
     android:textSize="12sp"

+ 2 - 1
app/src/main/res/layout/fragment_category_main_first.xml

@@ -63,7 +63,8 @@
           android:textColor="@color/C000000"
           android:layout_alignParentTop="true"
           android:layout_alignParentBottom="true"
-          android:textSize="12dp"/>
+          android:lineSpacingExtra="4sp"
+          android:tooltipText="12sp"/>
 
         <ImageView
           android:id="@+id/first_category_main_filter"

+ 11 - 0
app/src/main/res/layout/spinner_item.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:id="@+id/spinner_text"
+  android:layout_height="wrap_content"
+  android:textSize="12sp"
+  android:padding="3dp"
+  android:textColor="@color/C000000"
+  android:lineSpacingExtra="4sp"
+  />