فهرست منبع

[공통][New] 기본 체크 박스 스타일 추가
- drawableLeft 로 drawable 을 지정하면 fragment pop stack back 실행 시 setChecked() 가 제대로 작동하지 않는다.
- button 속성에 지정하면 괜찮음

hyodong.min 7 سال پیش
والد
کامیت
473b8bc067

+ 1 - 6
app/src/main/res/layout/dialog_promotion.xml

@@ -48,14 +48,9 @@
         android:layout_marginStart="18dp"
         android:layout_marginTop="16dp"
         android:layout_marginBottom="16dp"
-        android:background="@null"
-        android:button="@null"
-        android:drawableStart="@drawable/custom_check_box"
-        android:drawablePadding="8dp"
-        android:lineSpacingExtra="5sp"
+        style="@style/CommonCheckBox"
         android:text="@string/not_show"
         android:textColor="@color/C999999"
-        android:textSize="14sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"

+ 3 - 10
app/src/main/res/layout/fragment_sign_up_agree.xml

@@ -2,8 +2,8 @@
 
 <LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
-  xmlns:tools="http://schemas.android.com/tools"
   xmlns:app="http://schemas.android.com/apk/res-auto"
+  xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:orientation="vertical">
@@ -18,18 +18,11 @@
 
     <CheckBox
       android:id="@+id/agree_check_all"
+      style="@style/CommonCheckBox"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:layout_marginBottom="3pt"
-      android:layout_weight="9"
-      android:background="@null"
-      android:button="@null"
-      android:drawableStart="@drawable/custom_check_box"
-      android:drawablePadding="8dp"
-      android:lineSpacingExtra="5sp"
       android:text="@string/all_agree"
-      android:textColor="#000000"
-      android:textSize="14sp"
       />
   </LinearLayout>
 
@@ -45,7 +38,7 @@
     <View
       android:layout_width="match_parent"
       android:layout_height="1dp"
-      android:background="#e5e5e5"/>
+      android:background="@color/CE5E5E5"/>
 
   </LinearLayout>
 

+ 1 - 7
app/src/main/res/layout/fragment_sign_up_agree_list.xml

@@ -12,16 +12,10 @@
 
   <CheckBox
     android:id="@+id/agree_check"
+    style="@style/CommonCheckBox"
     android:layout_width="0dp"
     android:layout_height="wrap_content"
     android:layout_weight="1"
-    android:background="@null"
-    android:button="@null"
-    android:drawableLeft="@drawable/custom_check_box"
-    android:drawablePadding="8dp"
-    android:lineSpacingExtra="5sp"
-    android:textColor="#000000"
-    android:textSize="14sp"
     tools:text="@string/agree_required"
     />
 

+ 2 - 8
app/src/main/res/layout/setting_agree_check.xml

@@ -5,23 +5,17 @@
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
-  android:paddingBottom="14dp"
   android:gravity="center_vertical"
   android:orientation="horizontal"
+  android:paddingBottom="14dp"
   >
 
   <CheckBox
     android:id="@+id/agree_check"
+    style="@style/CommonCheckBox"
     android:layout_width="0dp"
     android:layout_height="wrap_content"
     android:layout_weight="1"
-    android:background="@null"
-    android:button="@null"
-    android:drawableLeft="@drawable/custom_check_box"
-    android:drawablePadding="8dp"
-    android:lineSpacingExtra="5sp"
-    android:textColor="#000000"
-    android:textSize="14sp"
     tools:text="@string/agree_option"
     />
 

+ 5 - 24
app/src/main/res/layout/setting_user_information_layout.xml

@@ -83,10 +83,10 @@
               android:layout_height="wrap_content"
               android:background="@null"
               android:hint="@string/setting_register_email"
+              android:inputType="text"
+              android:maxLines="1"
               android:paddingTop="10dp"
               android:textSize="14sp"
-              android:maxLines="1"
-              android:inputType="text"
               app:layout_constraintEnd_toStartOf="@+id/text_complete"
               app:layout_constraintStart_toStartOf="parent"
               />
@@ -309,16 +309,10 @@
 
         <CheckBox
           android:id="@+id/agree_check_all"
+          style="@style/CommonCheckBox"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
-          android:background="@null"
-          android:button="@null"
-          android:drawableStart="@drawable/custom_check_box"
-          android:drawablePadding="8dp"
-          android:lineSpacingExtra="6sp"
           android:text="@string/setting_all_agree_message"
-          android:textColor="@color/C000000"
-          android:textSize="14sp"
           />
       </LinearLayout>
 
@@ -396,17 +390,10 @@
 
         <CheckBox
           android:id="@+id/check_agree_email"
+          style="@style/CommonCheckBox"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
-          android:layout_weight="9"
-          android:background="@null"
-          android:button="@null"
-          android:drawableStart="@drawable/custom_check_box"
-          android:drawablePadding="8dp"
-          android:lineSpacingExtra="6sp"
           android:text="@string/email"
-          android:textColor="@color/C000000"
-          android:textSize="14sp"
           />
       </LinearLayout>
 
@@ -420,16 +407,10 @@
 
         <CheckBox
           android:id="@+id/check_agree_sms"
+          style="@style/CommonCheckBox"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
-          android:background="@null"
-          android:button="@null"
-          android:drawableLeft="@drawable/custom_check_box"
-          android:drawablePadding="8dp"
-          android:lineSpacingExtra="5sp"
           android:text="@string/sms"
-          android:textColor="#000000"
-          android:textSize="14sp"
           />
       </LinearLayout>
 

+ 9 - 40
app/src/main/res/layout/sign_up_auth_view.xml

@@ -245,18 +245,11 @@
 
       <CheckBox
         android:id="@+id/checkbox_all_agree"
+        style="@style/CommonCheckBox"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_weight="1"
-        android:background="@null"
-        android:button="@null"
-        android:drawableLeft="@drawable/custom_check_box"
-        android:drawablePadding="8dp"
-        android:lineSpacingExtra="5sp"
         android:text="@string/phone_identify_all_agree"
-        android:textColor="@color/C000000"
-        android:textIsSelectable="false"
-        android:textSize="14sp"
         />
 
       <LinearLayout
@@ -319,17 +312,11 @@
 
         <CheckBox
           android:id="@+id/checkbox_agree1"
+          style="@style/CommonCheckBox"
           android:layout_width="0dp"
           android:layout_height="wrap_content"
           android:layout_weight="1"
-          android:background="@null"
-          android:button="@null"
-          android:drawableLeft="@drawable/custom_check_box"
-          android:drawablePadding="8dp"
-          android:lineSpacingExtra="5sp"
           android:text="@string/phone_identify_agree1"
-          android:textColor="@color/C000000"
-          android:textSize="14sp"
           />
 
         <ImageView
@@ -352,17 +339,11 @@
 
         <CheckBox
           android:id="@+id/checkbox_agree2"
+          style="@style/CommonCheckBox"
           android:layout_width="0dp"
           android:layout_height="wrap_content"
           android:layout_weight="1"
-          android:background="@null"
-          android:button="@null"
-          android:drawableLeft="@drawable/custom_check_box"
-          android:drawablePadding="8dp"
-          android:lineSpacingExtra="5sp"
           android:text="@string/phone_identify_agree2"
-          android:textColor="@color/C000000"
-          android:textSize="14sp"
           />
 
         <ImageView
@@ -385,17 +366,11 @@
 
         <CheckBox
           android:id="@+id/checkbox_agree3"
+          style="@style/CommonCheckBox"
           android:layout_width="0dp"
           android:layout_height="wrap_content"
           android:layout_weight="1"
-          android:background="@null"
-          android:button="@null"
-          android:drawableLeft="@drawable/custom_check_box"
-          android:drawablePadding="8dp"
-          android:lineSpacingExtra="5sp"
           android:text="@string/phone_identify_agree3"
-          android:textColor="@color/C000000"
-          android:textSize="14sp"
           />
 
         <ImageView
@@ -418,17 +393,11 @@
 
         <CheckBox
           android:id="@+id/checkbox_agree4"
+          style="@style/CommonCheckBox"
           android:layout_width="0dp"
           android:layout_height="wrap_content"
           android:layout_weight="1"
-          android:background="@null"
-          android:button="@null"
-          android:drawableLeft="@drawable/custom_check_box"
-          android:drawablePadding="8dp"
-          android:lineSpacingExtra="5sp"
           android:text="@string/phone_identify_agree4"
-          android:textColor="@color/C000000"
-          android:textSize="14sp"
           />
 
         <ImageView
@@ -581,8 +550,8 @@
           android:textColor="@color/CF12815"
           android:textSize="10sp"
           android:visibility="gone"
-          tools:visibility="visible"
           tools:text="asdasdflkjasdlfkjalksdfjklasdf"
+          tools:visibility="visible"
           />
 
       </LinearLayout>
@@ -592,8 +561,8 @@
       android:id="@+id/layout_input_auth_number"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
-      android:visibility="gone"
       android:paddingTop="16dp"
+      android:visibility="gone"
       tools:visibility="visible"
       >
 
@@ -689,13 +658,13 @@
           android:id="@+id/text_authorized_number_validation"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
+          android:layout_marginTop="7dp"
           android:lineSpacingExtra="3sp"
           android:textColor="@color/CF12815"
           android:textSize="10sp"
-          android:layout_marginTop="7dp"
           android:visibility="gone"
-          tools:visibility="visible"
           tools:text="adfasdfkljlg alkasdfklj"
+          tools:visibility="visible"
           />
       </LinearLayout>
 

+ 8 - 0
app/src/main/res/values/styles.xml

@@ -73,4 +73,12 @@
     <item name="android:textOff">""</item>
     <item name="android:textOn">""</item>
   </style>
+
+  <style name="CommonCheckBox" parent="@style/Widget.AppCompat.CompoundButton.CheckBox">
+    <item name="android:background">@null</item>
+    <item name="android:paddingLeft">8dp</item>
+    <item name="android:button">@drawable/custom_check_box</item>
+    <item name="android:textColor">@color/C000000</item>
+    <item name="android:textSize">14sp</item>
+  </style>
 </resources>