Forráskód Böngészése

优化民生信用卡与中信信用卡界面

zengjiebin 8 éve
szülő
commit
5dbec54cc3

+ 1 - 1
app/build.gradle

@@ -260,6 +260,6 @@ def releaseTime() {
 android.applicationVariants.all {
     variant ->
         variant.outputs.each {
-            output -> buildType.name == "realease" ? output.outputFile = new File(output.outputFile.parent, productFlavors[0].name + "_" + buildType.name + "_v" + android.defaultConfig.versionName  + "_" + android.defaultConfig.versionCode + "-${releaseTime()}.apk") : null
+            output -> buildType.name == "release" ? output.outputFile = new File(output.outputFile.parent, productFlavors[0].name + "_" + buildType.name + "_v" + android.defaultConfig.versionName  + "_" + android.defaultConfig.versionCode + "-${releaseTime()}.apk") : null
         }
 }

+ 0 - 8
app/src/main/AndroidManifest.xml

@@ -382,14 +382,6 @@
             android:screenOrientation="portrait"
             android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
 
-        <activity android:name="com.sheep.groups.creditcard.ApplyForCreditCardActivity"
-            android:screenOrientation="portrait"
-            >
-            <!--<intent-filter>-->
-                <!--<action android:name="android.intent.action.MAIN"/>-->
-                <!--<category android:name="android.intent.category.LAUNCHER"/>-->
-            <!--</intent-filter>-->
-        </activity>
         <activity android:name="com.sheep.groups.creditcard.CITICBankOtherInfoActivity"
             android:screenOrientation="portrait">
         </activity>

+ 1 - 8
app/src/main/java/com/sheep/groups/creditcard/ApplyForCardTabFragment.java

@@ -12,6 +12,7 @@ import com.kfzs.libs.widget.navigation.NavigationBar;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.UMConfigUtils;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 import butterknife.BindView;
 
@@ -26,8 +27,6 @@ public class ApplyForCardTabFragment extends SupportLoadingFragment implements O
     public static final int STEP_DETAILS = 1;
     public static final int STEP_COMMIT = 2;
 
-    @BindView(R.id.navigationbar)
-    NavigationBar navigationBar;
     @BindView(R.id.ll_credit_card_step1)
     LinearLayout llStep1;
     @BindView(R.id.ll_credit_card_step2)
@@ -48,12 +47,6 @@ public class ApplyForCardTabFragment extends SupportLoadingFragment implements O
     @Override
     public void setupViews(@Nullable Bundle savedInstanceState) {
 
-        navigationBar
-                .titleText("中国民生银行信用卡")
-                .titleTextSize(TypedValue.COMPLEX_UNIT_SP,17)
-                .titleTextColor(android.R.color.black)
-                .changeNavigationType(NavigationBar.IOS);
-
         llStep1.setSelected(true);
 
         basicInfoFragment = (ApplyForCreditCardBasicInfoFragment) getChildFragmentManager().findFragmentByTag(ApplyForCreditCardBasicInfoFragment.class.getSimpleName());

+ 1 - 1
app/src/main/java/com/sheep/groups/creditcard/ApplyForCreditCardBasicInfoFragment.java

@@ -51,7 +51,7 @@ public class ApplyForCreditCardBasicInfoFragment extends DaggerFragment implemen
     @BindView(R.id.tv_agreement)
     TextView tvAgreement;
     @BindView(R.id.btn_next)
-    Button btnNext;
+    TextView btnNext;
     @BindView(R.id.btn_card_normal)
     Button btnCardNormal;
     @BindView(R.id.btn_card_gold)

+ 6 - 0
app/src/main/java/com/sheep/groups/creditcard/ms/MinShengCreditActivity.java

@@ -5,6 +5,7 @@ import android.os.Bundle;
 
 import com.sheep.groups.creditcard.ApplyForCardTabFragment;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 public class MinShengCreditActivity extends AppCompatActivity {
 
@@ -13,6 +14,11 @@ public class MinShengCreditActivity extends AppCompatActivity {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_min_sheng_credit);
 
+        TitleBarUtils
+                .getInstance()
+                .setTitle(this, "中国民生银行信用卡")
+                .setTitleFinish(this);
+
         getSupportFragmentManager().beginTransaction().add(R.id.container,new ApplyForCardTabFragment()).commit();
 
     }

+ 5 - 8
app/src/main/java/com/sheep/groups/creditcard/zx/ZhongXinCreditStep1Activity.java

@@ -30,6 +30,7 @@ import com.sheep.groups.creditcard.RegexUtils;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 import java.util.Calendar;
 import java.util.HashMap;
@@ -45,8 +46,6 @@ public class ZhongXinCreditStep1Activity extends DaggerActivity implements ZXSte
     private static final String TAG = "ZhongXinCreditStep1";
     @Inject
     ZXStep1Presenter presenter;
-    @BindView(R.id.navigationbar)
-    NavigationBar navigationBar;
     @BindView(R.id.ll_agreement)
     LinearLayout llAgreement;
     @BindView(R.id.cb_agreement)
@@ -83,12 +82,10 @@ public class ZhongXinCreditStep1Activity extends DaggerActivity implements ZXSte
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_zhong_xin_credit);
         ButterKnife.bind(this);
-        navigationBar
-                .titleText("个人基本信息")
-                .titleTextSize(TypedValue.COMPLEX_UNIT_SP,17)
-                .titleTextColor(android.R.color.white)
-                .changeNavigationType(NavigationBar.IOS);
-
+        TitleBarUtils
+                .getInstance()
+                .setTitle(this, "个人基本信息")
+                .setTitleFinish(this);
 
         llAgreement.setOnClickListener(new View.OnClickListener() {
             @Override

+ 1 - 15
app/src/main/res/layout/activity_apply_for_credit_card.xml

@@ -1,19 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    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:background="#f3f3f3"
-    android:orientation="vertical"
-    tools:context="com.sheep.groups.creditcard.ApplyForCreditCardActivity">
-
-
-    <com.kfzs.libs.widget.navigation.NavigationBar
-        android:id="@+id/navigationbar"
-        android:layout_width="match_parent"
-        android:layout_height="45dp"
-        android:background="#ffffff" />
+    android:orientation="vertical">
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -88,9 +77,6 @@
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_weight="1"
-        android:paddingLeft="16dp"
-        android:paddingRight="16dp"
-        android:paddingTop="16dp"
         />
 
 </LinearLayout>

+ 11 - 5
app/src/main/res/layout/activity_min_sheng_credit.xml

@@ -1,9 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
+<LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:id="@+id/container"
-    tools:context="com.sheep.groups.creditcard.ms.MinShengCreditActivity"/>
+    android:orientation="vertical">
+
+    <include layout="@layout/title" />
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/bg_class_grey"
+        android:id="@+id/container"/>
+</LinearLayout>
 

+ 9 - 27
app/src/main/res/layout/activity_zhong_xin_credit.xml

@@ -1,17 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="#f0f0f0"
+    android:background="@color/bg_class_grey"
     android:orientation="vertical">
 
 
-    <com.kfzs.libs.widget.navigation.NavigationBar
-        android:id="@+id/navigationbar"
-        android:layout_width="match_parent"
-        android:layout_height="45dp"
-        android:background="#d40004" />
+    <include layout="@layout/title" />
 
     <ScrollView
         android:layout_width="match_parent"
@@ -23,8 +18,7 @@
             android:layout_height="0dp"
             android:layout_weight="1"
             android:orientation="vertical"
-            android:paddingTop="14dp"
-            android:paddingBottom="14dp"
+            android:padding="@dimen/content_padding_13"
             >
 
             <TextView
@@ -32,24 +26,20 @@
                 android:layout_height="wrap_content"
                 android:background="@drawable/gx_bg_credit_card_white_corner"
                 android:padding="10dp"
-                android:layout_marginRight="10dp"
-                android:layout_marginLeft="10dp"
                 android:text="@string/ms_top_str" />
 
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="带'*'为必填项,其他为非必填项"
-                android:layout_marginRight="10dp"
-                android:layout_marginLeft="10dp"
+                android:layout_marginTop="@dimen/content_padding_13"
                 android:padding="10dp"
                 android:textSize="11sp" />
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:padding="10dp">
+                android:orientation="vertical">
                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
@@ -65,12 +55,14 @@
                     <ImageView
                         android:layout_width="144dp"
                         android:layout_height="90dp"
+                        android:layout_marginTop="@dimen/content_padding"
                         android:layout_centerInParent="true"
                         android:src="@drawable/ic_zx_card" />
 
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/content_padding"
                         android:text="中信易卡(金卡)" />
 
                 </LinearLayout>
@@ -255,8 +247,6 @@
                 android:id="@+id/ll_agreement"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
                 >
                 <CheckBox
                     android:id="@+id/cb_agreement"
@@ -281,16 +271,8 @@
 
             <Button
                 android:id="@+id/btn_next"
-                android:layout_width="match_parent"
-                android:layout_height="50dp"
-                android:textColor="@android:color/white"
-                android:layout_marginLeft="12dp"
-                android:layout_marginRight="12dp"
-                android:layout_marginBottom="16dp"
-                android:textSize="15sp"
-                android:text="下一步>"
-                android:background="#3598fe"
-                />
+                style="@style/style_button"
+                android:text="下一步>"/>
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"

+ 35 - 37
app/src/main/res/layout/fragment_apply_for_credit_card_basic_info.xml

@@ -2,21 +2,21 @@
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="#f4f4f4"
     android:scrollbars="none">
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
-        android:paddingBottom="20dp">
+        android:paddingBottom="20dp"
+        android:paddingLeft="@dimen/content_padding_10"
+        android:paddingRight="@dimen/content_padding_10">
 
         <LinearLayout
             style="@style/creditCardInputGroupStyle"
-            android:layout_marginTop="0dp"
+            android:layout_marginTop="@dimen/content_padding_13"
             android:orientation="vertical"
-            android:paddingBottom="12dp"
-            >
+            android:paddingBottom="12dp">
 
             <TextView
                 style="@style/creditCardInputGroupTitleStyle"
@@ -28,48 +28,46 @@
 
                 <Button
                     android:id="@+id/btn_card_normal"
-                    android:text="普卡"
-                    style="@style/creditCardCardTypeBtnStyle" />
+                    style="@style/creditCardCardTypeBtnStyle"
+                    android:text="普卡" />
+
                 <Button
                     android:id="@+id/btn_card_gold"
-                    android:text="金卡"
+                    style="@style/creditCardCardTypeBtnStyle"
                     android:layout_marginLeft="25dp"
-                    style="@style/creditCardCardTypeBtnStyle" />
+                    android:text="金卡" />
             </LinearLayout>
 
             <FrameLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
                 android:id="@+id/fl_credit_card_display_container"
-                />
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
 
         </LinearLayout>
 
-    <LinearLayout
-        style="@style/creditCardInputGroupStyle"
-        android:orientation="horizontal"
-        android:paddingTop="5dp"
-        android:paddingBottom="5dp"
-        >
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:src="@drawable/ic_discounts"
-            />
-        <TextView
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:layout_gravity="center_vertical"
-            android:layout_marginLeft="10dp"
-            android:text="首年免年费,当年刷卡消费5笔免次年年费"
-            />
+        <LinearLayout
+            style="@style/creditCardInputGroupStyle"
+            android:paddingTop="@dimen/content_padding_10"
+            android:paddingBottom="@dimen/content_padding_10"
+            android:orientation="horizontal"
+            android:layout_marginTop="@dimen/content_padding_13">
 
-    </LinearLayout>
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@drawable/ic_discounts" />
 
-    <LinearLayout
-            style="@style/creditCardInputGroupStyle"
-            >
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="10dp"
+                android:layout_weight="1"
+                android:text="首年免年费,当年刷卡消费5笔免次年年费" />
+
+        </LinearLayout>
+
+        <LinearLayout style="@style/creditCardInputGroupStyle">
 
             <TextView
                 style="@style/creditCardInputGroupTitleStyle"
@@ -145,9 +143,9 @@
 
         </LinearLayout>
 
-        <com.kfzs.libs.widget.alpha.AlphaButton
+        <TextView
             android:id="@+id/btn_next"
-            style="@style/creditCardBtnGradientStyle"
+            style="@style/style_button"
             android:text="下一步" />
 
         <TextView

+ 1 - 1
app/src/main/res/values/styles.xml

@@ -134,7 +134,7 @@
         <item name="android:paddingRight">12dp</item>
         <item name="android:background">@drawable/gx_bg_credit_card_white_corner</item>
         <item name="android:orientation">vertical</item>
-        <item name="android:layout_marginTop">15dp</item>
+        <item name="android:layout_marginTop">@dimen/content_padding_13</item>
     </style>
 
     <style name="creditCardInputGroupTitleStyle">