Преглед на файлове

配合vivo渠道审核修改

Xieshengqi преди 5 години
родител
ревизия
7e8b83310a

+ 2 - 2
app/build.gradle

@@ -15,8 +15,8 @@ android {
15 15
         applicationId "com.smileflowpig.money"
16 16
         minSdkVersion 19
17 17
         targetSdkVersion 28
18
-        versionCode 13
19
-        versionName "2.2.0"
18
+        versionCode 14
19
+        versionName "2.2.1"
20 20
         multiDexEnabled true
21 21
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
22 22
     }

BIN
app/src/main/assets/fonts/text_one.ttf


+ 4 - 0
app/src/main/java/com/smileflowpig/money/moneyplatfrom/Adapter/MyAdapter.java

@@ -1,6 +1,7 @@
1 1
 package com.smileflowpig.money.moneyplatfrom.Adapter;
2 2
 
3 3
 import android.content.Context;
4
+import android.graphics.Typeface;
4 5
 import android.support.v4.view.PagerAdapter;
5 6
 import android.view.LayoutInflater;
6 7
 import android.view.View;
@@ -55,6 +56,8 @@ public class MyAdapter extends PagerAdapter {
55 56
         GlideUtil.setImageViewCrop(context,list.get(position%list.size()).icon,icon);
56 57
 //        Glide.with(context).load(list.get(position%list.size()).icon).into(icon);
57 58
         name.setText(list.get(position%list.size()).name);
59
+        Typeface typeface = Typeface.createFromAsset(context.getAssets(), "fonts/text_one.ttf");
60
+        money.setTypeface(typeface);
58 61
         money.setText(list.get(position%list.size()).upper_amount+"-"+list.get(position%list.size()).lower_amount);
59 62
         goset.setOnClickListener(new View.OnClickListener() {
60 63
             @Override
@@ -63,6 +66,7 @@ public class MyAdapter extends PagerAdapter {
63 66
                 DetailActivity.show(context, list.get(position%list.size()).id+"","notice",0,5);
64 67
             }
65 68
         });
69
+
66 70
         container.addView(inflate);
67 71
         return inflate;
68 72
     }

+ 12 - 0
app/src/main/java/com/smileflowpig/money/moneyplatfrom/Adapter/PlatformAdapter.java

@@ -52,6 +52,13 @@ public class PlatformAdapter extends RecyclerView.Adapter<PlatformAdapter.MyView
52 52
         holder.money.setText(list.get(position).upper_amount + "-" + list.get(position).lower_amount);
53 53
         holder.day.setText(list.get(position).term);
54 54
         String applicants = list.get(position).applicants;
55
+        String show_day = list.get(position).show_day;
56
+        holder.lilv_tv.setText("参考" + show_day);
57
+        if (show_day.equals("日利率")) {
58
+            holder.lilv_value_tv.setText(list.get(position).day_rate + "%");
59
+        } else {
60
+            holder.lilv_value_tv.setText(list.get(position).monthly_rate + "%");
61
+        }
55 62
         double v = Double.parseDouble(applicants);
56 63
         double v1 = v / 10000;
57 64
         String format = String.format("%.2f", v1);
@@ -94,6 +101,7 @@ public class PlatformAdapter extends RecyclerView.Adapter<PlatformAdapter.MyView
94 101
 
95 102
     /**
96 103
      * 设置标签背景
104
+     *
97 105
      * @param textView
98 106
      * @param content
99 107
      */
@@ -134,6 +142,8 @@ public class PlatformAdapter extends RecyclerView.Adapter<PlatformAdapter.MyView
134 142
         private final ImageView icon;
135 143
         private final TextView title;
136 144
         private final TextView title2;
145
+        public TextView lilv_tv;
146
+        public TextView lilv_value_tv;
137 147
 
138 148
         public MyViewHolder(View itemView) {
139 149
             super(itemView);
@@ -147,6 +157,8 @@ public class PlatformAdapter extends RecyclerView.Adapter<PlatformAdapter.MyView
147 157
             people = (TextView) itemView.findViewById(R.id.hot_people);
148 158
             title = (TextView) itemView.findViewById(R.id.pri_title);
149 159
             title2 = (TextView) itemView.findViewById(R.id.pri_title2);
160
+            lilv_tv = itemView.findViewById(R.id.item_hotadapter_lilv_tv);
161
+            lilv_value_tv = itemView.findViewById(R.id.lilv_text);
150 162
 
151 163
         }
152 164
     }

+ 37 - 22
app/src/main/java/com/smileflowpig/money/moneyplatfrom/Adapter/SerchAdapter.java

@@ -38,7 +38,7 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
38 38
     @Override
39 39
     public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
40 40
         View inflate = LayoutInflater.from(context).inflate(R.layout.serch_adapter_layout, null);
41
-        MyViewHolder myViewHolder=new MyViewHolder(inflate);
41
+        MyViewHolder myViewHolder = new MyViewHolder(inflate);
42 42
         return myViewHolder;
43 43
     }
44 44
 
@@ -46,17 +46,24 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
46 46
     @Override
47 47
     public void onBindViewHolder(MyViewHolder holder, final int position) {
48 48
 
49
-        GlideUtil.setImageViewCrop(context,list.get(position).icon,holder.icon);
49
+        GlideUtil.setImageViewCrop(context, list.get(position).icon, holder.icon);
50 50
 //        Glide.with(context).load(list.get(position).icon).into(holder.icon);
51 51
         holder.name.setText(list.get(position).name);
52 52
         holder.destroy.setText(list.get(position).description);
53
-        holder.money.setText(list.get(position).upper_amount+"-"+list.get(position).lower_amount);
53
+        holder.money.setText(list.get(position).upper_amount + "-" + list.get(position).lower_amount);
54 54
         holder.day.setText(list.get(position).term);
55 55
         String applicants = list.get(position).applicants;
56
+        String show_day = list.get(position).show_day;
57
+        holder.lilv_tv.setText("参考" + show_day);
58
+        if (show_day.equals("日利率")) {
59
+            holder.lilv_value_tv.setText(list.get(position).day_rate + "%");
60
+        } else {
61
+            holder.lilv_value_tv.setText(list.get(position).monthly_rate + "%");
62
+        }
56 63
         double v = Double.parseDouble(applicants);
57 64
         double v1 = v / 10000;
58 65
         String format = String.format("%.2f", v1);
59
-        holder.people.setText(format+"万人申请成功");
66
+        holder.people.setText(format + "万人申请成功");
60 67
 
61 68
         holder.itemView.setOnClickListener(new View.OnClickListener() {
62 69
             @Override
@@ -65,54 +72,56 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
65 72
             }
66 73
         });
67 74
 
68
-        try{
75
+        try {
69 76
             if (list.get(position).prod_title == null || list.get(position).prod_title.size() == 0) {
70 77
                 holder.title.setVisibility(View.GONE);
71 78
                 holder.title2.setVisibility(View.GONE);
72 79
             } else {
73
-                if(list.get(position).prod_title.size()<3){
74
-                    if(list.get(position).prod_title.size()==1){
80
+                if (list.get(position).prod_title.size() < 3) {
81
+                    if (list.get(position).prod_title.size() == 1) {
75 82
                         holder.title.setVisibility(View.VISIBLE);
76 83
                         holder.title.setText(list.get(position).prod_title.get(0));
77
-                        setShape(holder.title,list.get(position).prod_title.get(0));
84
+                        setShape(holder.title, list.get(position).prod_title.get(0));
78 85
                         holder.title2.setVisibility(View.GONE);
79
-                    }else if(list.get(position).prod_title.size()==2){
86
+                    } else if (list.get(position).prod_title.size() == 2) {
80 87
                         holder.title.setVisibility(View.VISIBLE);
81 88
                         holder.title.setText(list.get(position).prod_title.get(0));
82
-                        setShape(holder.title,list.get(position).prod_title.get(0));
89
+                        setShape(holder.title, list.get(position).prod_title.get(0));
83 90
                         holder.title2.setVisibility(View.VISIBLE);
84 91
                         holder.title2.setText(list.get(position).prod_title.get(1));
85
-                        setShape(holder.title2,list.get(position).prod_title.get(1));
92
+                        setShape(holder.title2, list.get(position).prod_title.get(1));
86 93
                     }
87 94
 
88
-                }else {
95
+                } else {
89 96
                     holder.title.setVisibility(View.VISIBLE);
90 97
                     holder.title.setText(list.get(position).prod_title.get(0));
91
-                    setShape(holder.title,list.get(position).prod_title.get(0));
98
+                    setShape(holder.title, list.get(position).prod_title.get(0));
92 99
                     holder.title2.setVisibility(View.VISIBLE);
93 100
                     holder.title2.setText(list.get(position).prod_title.get(1));
94
-                    setShape(holder.title2,list.get(position).prod_title.get(1));
101
+                    setShape(holder.title2, list.get(position).prod_title.get(1));
95 102
                 }
96 103
 
97 104
             }
98
-        }catch (Exception e){
105
+        } catch (Exception e) {
99 106
             holder.title.setVisibility(View.GONE);
100 107
             holder.title2.setVisibility(View.GONE);
101 108
         }
102 109
 
103
-        if(list.get(position).is_quality!=null){
104
-            if(list.get(position).is_quality.equals("0")){
110
+        if (list.get(position).is_quality != null) {
111
+            if (list.get(position).is_quality.equals("0")) {
105 112
                 holder.hotgo.setVisibility(View.GONE);
106
-            }else {
113
+            } else {
107 114
                 holder.hotgo.setVisibility(View.VISIBLE);
108 115
             }
109
-        }else {
116
+        } else {
110 117
             holder.hotgo.setVisibility(View.GONE);
111 118
         }
112 119
 
113 120
     }
121
+
114 122
     /**
115 123
      * 设置标签背景
124
+     *
116 125
      * @param textView
117 126
      * @param content
118 127
      */
@@ -136,6 +145,7 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
136 145
         textView.setBackgroundDrawable(drawable);
137 146
 
138 147
     }
148
+
139 149
     @Override
140 150
     public int getItemCount() {
141 151
         return list.size();
@@ -152,6 +162,8 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
152 162
         private final ImageView icon;
153 163
         private final TextView title;
154 164
         private final TextView title2;
165
+        public TextView lilv_tv;
166
+        public TextView lilv_value_tv;
155 167
 
156 168
         public MyViewHolder(View itemView) {
157 169
             super(itemView);
@@ -165,15 +177,18 @@ public class SerchAdapter extends RecyclerView.Adapter<SerchAdapter.MyViewHolder
165 177
             people = (TextView) itemView.findViewById(R.id.hot_people);
166 178
             title = (TextView) itemView.findViewById(R.id.pri_title);
167 179
             title2 = (TextView) itemView.findViewById(R.id.pri_title2);
180
+            lilv_tv = itemView.findViewById(R.id.item_searchadapter_lilv_tv);
181
+            lilv_value_tv = itemView.findViewById(R.id.lilv_text);
168 182
 
169 183
         }
170 184
     }
171 185
 
172
-    public interface getItempostion{
186
+    public interface getItempostion {
173 187
 
174 188
         void success(int pos);
175 189
     }
176
-    public void setItempostion(getItempostion getItempostion){
177
-        this.getItempostion=getItempostion;
190
+
191
+    public void setItempostion(getItempostion getItempostion) {
192
+        this.getItempostion = getItempostion;
178 193
     }
179 194
 }

+ 88 - 43
app/src/main/java/com/smileflowpig/money/moneyplatfrom/activities/DetailActivity.java

@@ -35,6 +35,7 @@ import android.widget.TextView;
35 35
 import android.widget.Toast;
36 36
 
37 37
 import com.bumptech.glide.Glide;
38
+import com.smileflowpig.money.BuildConfig;
38 39
 import com.smileflowpig.money.moneyplatfrom.Adapter.Detail_popAdapter;
39 40
 import com.smileflowpig.money.moneyplatfrom.Bean.CheckGuidJson;
40 41
 import com.smileflowpig.money.moneyplatfrom.Bean.NoteEntity;
@@ -324,7 +325,7 @@ public class DetailActivity extends PresenterActivity<DetailContract.Presenter>
324 325
             backDialog.setOnDialogClickListener(new DetialDialog.OnDialogClickListener() {
325 326
                 @Override
326 327
                 public void onFinish() {
327
-                    MobclickAgent.onEvent(DetailActivity.this,"detialback_true");
328
+                    MobclickAgent.onEvent(DetailActivity.this, "detialback_true");
328 329
                     finish();
329 330
                     if (!TextUtils.isEmpty(flag)) {
330 331
                         MainActivity.show(DetailActivity.this);
@@ -333,7 +334,7 @@ public class DetailActivity extends PresenterActivity<DetailContract.Presenter>
333 334
 
334 335
                 @Override
335 336
                 public void cancle() {
336
-                    MobclickAgent.onEvent(DetailActivity.this,"detialback_false");
337
+                    MobclickAgent.onEvent(DetailActivity.this, "detialback_false");
337 338
                     backDialog.dismiss();
338 339
                 }
339 340
             });
@@ -596,17 +597,32 @@ public class DetailActivity extends PresenterActivity<DetailContract.Presenter>
596 597
         obser.setText(product.getLend_time());
597 598
         num = product.getId();
598 599
         type.setText(product.getShow_day());
599
-        if (product.getShow_day().equals("参考月利率")) {
600
-            lilv.setText(product.getMonthly_rate() + "%");
601
-            myfust.setText("参考月利率" + product.getMonthly_rate() + "%");
602
-            //timetype.setText("每月还款金额");
603
-        } else if(product.getShow_day().equals("参考日利率")){
604
-            lilv.setText(product.getDay_rate() + "%");
605
-            myfust.setText("参考日利率" + product.getDay_rate() + "%");
606
-            //timetype.setText("每日还款金额");
607
-        }else if(product.getShow_day().equals("参考年利率")){
600
+//        if (BuildConfig.CHANNLE.equals("1003")) {
601
+//            type.setText("参考年利率");
602
+//            //vivo渠道只能显示年利率
603
+//            // TODO: 2019/6/3 显示年利率
604
+//            lilv.setText(product.getYear_rate() + "%");
605
+//            myfust.setText("参考年利率" + product.getYear_rate() + "%");
606
+//
607
+//            List<Dialogs> loan_periods = new ArrayList<>();
608
+//            loan_periods.add(new Dialogs("1", "1年", false));
609
+//            loan_periods.add(new Dialogs("2", "2年", false));
610
+//            loan_periods.add(new Dialogs("3", "3年", false));
611
+//            product.setLoan_period(loan_periods);
612
+//
613
+//        } else {
614
+            if (product.getShow_day().equals("参考月利率")) {
615
+                lilv.setText(product.getMonthly_rate() + "%");
616
+                myfust.setText("参考月利率" + product.getMonthly_rate() + "%");
617
+                //timetype.setText("每月还款金额");
608 618
 
609
-        }
619
+            } else {
620
+                lilv.setText(product.getDay_rate() + "%");
621
+                myfust.setText("参考日利率" + product.getDay_rate() + "%");
622
+                //timetype.setText("每日还款金额");
623
+            }
624
+
625
+//        }
610 626
 
611 627
         success.setText("成功放款人数" + product.getApplicants() + "人");
612 628
         cond.setText(product.getRequirements());
@@ -737,22 +753,31 @@ public class DetailActivity extends PresenterActivity<DetailContract.Presenter>
737 753
                     double v2 = Double.parseDouble(product.getLoan_period().get(num2).getK());
738 754
                     double v1 = Double.parseDouble(trim);
739 755
                     if (!TextUtils.isEmpty(trim)) {
740
-                        if (product.getShow_day().equals("参考日利率")) {
741
-                            double c = Double.parseDouble(product.getDay_rate());
742
-                            if (s1.substring(s1.length() - 1, s1.length()).equals("月")) {
743
-                                v2 = v2 * 30;
756
+//                        if (BuildConfig.CHANNLE.equals("1003")) {
757
+//                            double c = Double.parseDouble(product.getYear_rate());
758
+//                            double ben = v1 + v1 * v2 * c / 100;
759
+//                            double v3 = v1 * v2 * c / 100;
760
+//                            contver.setText(String.format("%.2f", v3));
761
+//                            fuast.setText(String.format("%.2f", ben));
762
+//                        } else {
763
+                            if (product.getShow_day().equals("参考日利率")) {
764
+                                double c = Double.parseDouble(product.getDay_rate());
765
+                                if (s1.substring(s1.length() - 1, s1.length()).equals("月")) {
766
+                                    v2 = v2 * 30;
767
+                                }
768
+                                double ben = v1 + v1 * v2 * c / 100;
769
+                                double v3 = v1 * v2 * c / 100;
770
+                                contver.setText(String.format("%.2f", v3));
771
+                                fuast.setText(String.format("%.2f", ben));
772
+                            } else {
773
+                                double c = Double.parseDouble(product.getMonthly_rate());
774
+                                double ben = v1 + v1 * v2 * c / 100;
775
+                                double v3 = v1 * v2 * c / 100;
776
+                                contver.setText(String.format("%.2f", v3));
777
+                                fuast.setText(String.format("%.2f", ben));
744 778
                             }
745
-                            double ben = v1 + v1 * v2 * c / 100;
746
-                            double v3 = v1 * v2 * c / 100;
747
-                            contver.setText(String.format("%.2f", v3));
748
-                            fuast.setText(String.format("%.2f", ben));
749
-                        } else {
750
-                            double c = Double.parseDouble(product.getMonthly_rate());
751
-                            double ben = v1 + v1 * v2 * c / 100;
752
-                            double v3 = v1 * v2 * c / 100;
753
-                            contver.setText(String.format("%.2f", v3));
754
-                            fuast.setText(String.format("%.2f", ben));
755
-                        }
779
+//                        }
780
+
756 781
                     }
757 782
                 } else {
758 783
                     fuast.setText(String.format("%.2f", 0.0));
@@ -787,23 +812,39 @@ public class DetailActivity extends PresenterActivity<DetailContract.Presenter>
787 812
             Pattern p = Pattern.compile("\\d+");
788 813
             Matcher m = p.matcher(s);
789 814
             m.find();
815
+            //贷款期限
790 816
             double b = Double.parseDouble(product.getLoan_period().get(pos).getK());
791
-            if (product.getShow_day().equals("参考日利率")) {
792
-                double c = Double.parseDouble(product.getDay_rate());
793
-                if (s.substring(s.length() - 1, s.length()).equals("月")) {
794
-                    b = b * 30;
817
+//            if (BuildConfig.CHANNLE.equals("1003")) {
818
+//                //vivo渠道必须显示年利率
819
+//                //年利率
820
+//                double c = Double.parseDouble(product.getYear_rate());
821
+//                //应还利息
822
+//                double v = a * c * b / 100;
823
+//                //总还金额
824
+//                double ben = a + b * c * a / 100;
825
+//                contver.setText(String.format("%.2f", v));
826
+//                fuast.setText(String.format("%.2f", ben));
827
+//            } else {
828
+                if (product.getShow_day().equals("参考日利率")) {
829
+                    double c = Double.parseDouble(product.getDay_rate());
830
+                    if (s.substring(s.length() - 1, s.length()).equals("月")) {
831
+                        b = b * 30;
832
+                    }
833
+                    double ben = a + b * c * a / 100;
834
+                    double v = b * c * a / 100;
835
+                    contver.setText(String.format("%.2f", v));
836
+                    fuast.setText(String.format("%.2f", ben));
837
+                } else {
838
+                    double c = Double.parseDouble(product.getMonthly_rate());
839
+
840
+
841
+                    double v = b * c * a / 100;
842
+                    double ben = a + b * c * a / 100;
843
+                    contver.setText(String.format("%.2f", v));
844
+                    fuast.setText(String.format("%.2f", ben));
795 845
                 }
796
-                double ben = a + b * c * a / 100;
797
-                double v = b * c * a / 100;
798
-                contver.setText(String.format("%.2f", v));
799
-                fuast.setText(String.format("%.2f", ben));
800
-            } else {
801
-                double c = Double.parseDouble(product.getMonthly_rate());
802
-                double v = b * c * a / 100;
803
-                double ben = a + b * c * a / 100;
804
-                contver.setText(String.format("%.2f", v));
805
-                fuast.setText(String.format("%.2f", ben));
806
-            }
846
+//            }
847
+
807 848
         }
808 849
     }
809 850
 
@@ -1219,7 +1260,11 @@ public class DetailActivity extends PresenterActivity<DetailContract.Presenter>
1219 1260
     public void light(float t) {
1220 1261
         WindowManager.LayoutParams lp = getWindow().getAttributes();
1221 1262
         lp.alpha = t;
1222
-        getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
1263
+        if (t == 1.0f) {
1264
+            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
1265
+        } else {
1266
+            getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
1267
+        }
1223 1268
         getWindow().setAttributes(lp);
1224 1269
     }
1225 1270
 

+ 0 - 1
app/src/main/java/com/smileflowpig/money/moneyplatfrom/frags/main/state/HuaHomeFragment.java

@@ -663,7 +663,6 @@ public class HuaHomeFragment extends PresenterFragment implements View.OnClickLi
663 663
                     Intent intent11 = new Intent(getActivity(), AccountActivity.class);
664 664
                     startActivityForResult(intent11, Constant.Code.REQUEST_CODE);
665 665
                 }
666
-
667 666
                 break;
668 667
             case R.id.appraisal:
669 668
                 if(liulang){

+ 35 - 31
app/src/main/java/com/smileflowpig/money/moneyplatfrom/frags/main/state/PigHomeFragment.java

@@ -374,37 +374,41 @@ public class PigHomeFragment extends PresenterFragment implements View.OnClickLi
374 374
     }
375 375
 
376 376
     public void gettitle() {
377
-        Observable<PigTitleBean> pigTitleBeanObservable = new NetRequestUtils().bucuo().getbaseretrofit().getpigtitle().subscribeOn(Schedulers.io())
378
-                .observeOn(AndroidSchedulers.mainThread());
379
-        pigTitleBeanObservable.subscribe(new Observer<PigTitleBean>() {
380
-            @Override
381
-            public void onSubscribe(Disposable d) {
382
-
383
-            }
384
-
385
-            @Override
386
-            public void onNext(PigTitleBean pigTitleBean) {
387
-                try {
388
-                    rstBean = pigTitleBean.rst;
389
-                    titleone.setText(rstBean._$1);
390
-                    titletwo.setText(rstBean._$2);
391
-                    titlethree.setText(rstBean._$3);
392
-                } catch (Exception e) {
393
-
394
-                }
395
-
396
-            }
397
-
398
-            @Override
399
-            public void onError(Throwable e) {
400
-
401
-            }
402
-
403
-            @Override
404
-            public void onComplete() {
405
-
406
-            }
407
-        });
377
+        fourTab_layout.setVisibility(View.GONE);
378
+//        Observable<PigTitleBean> pigTitleBeanObservable = new NetRequestUtils().bucuo().getbaseretrofit().getpigtitle().subscribeOn(Schedulers.io())
379
+//                .observeOn(AndroidSchedulers.mainThread());
380
+//        pigTitleBeanObservable.subscribe(new Observer<PigTitleBean>() {
381
+//            @Override
382
+//            public void onSubscribe(Disposable d) {
383
+//
384
+//            }
385
+//
386
+//            @Override
387
+//            public void onNext(PigTitleBean pigTitleBean) {
388
+//                try {
389
+//                    if(fourTab_layout.getVisibility()!=View.VISIBLE)
390
+//                    fourTab_layout.setVisibility(View.VISIBLE);
391
+//                    rstBean = pigTitleBean.rst;
392
+//                    titleone.setText(rstBean._$1);
393
+//                    titletwo.setText(rstBean._$2);
394
+//                    titlethree.setText(rstBean._$3);
395
+//                } catch (Exception e) {
396
+//                    fourTab_layout.setVisibility(View.GONE);
397
+//
398
+//                }
399
+//
400
+//            }
401
+//
402
+//            @Override
403
+//            public void onError(Throwable e) {
404
+//                fourTab_layout.setVisibility(View.GONE);
405
+//            }
406
+//
407
+//            @Override
408
+//            public void onComplete() {
409
+//
410
+//            }
411
+//        });
408 412
     }
409 413
 
410 414
     public void getclose() {

+ 67 - 40
app/src/main/res/layout/hot_adapter_layout.xml

@@ -3,18 +3,18 @@
3 3
     xmlns:app="http://schemas.android.com/apk/res-auto"
4 4
     android:layout_width="match_parent"
5 5
     android:layout_height="117px"
6
+    android:layout_marginRight="12px"
6 7
     android:background="@color/white"
7 8
     android:orientation="horizontal"
8
-    android:paddingTop="20px"
9
-    android:paddingBottom="20px"
10 9
     android:paddingLeft="30px"
11
-    android:layout_marginRight="12px">
10
+    android:paddingTop="20px"
11
+    android:paddingBottom="20px">
12 12
 
13 13
     <LinearLayout
14
-        android:layout_width="240px"
14
+        android:layout_width="260px"
15 15
         android:layout_height="wrap_content"
16
-        android:paddingLeft="10px"
17
-        android:orientation="vertical">
16
+        android:orientation="vertical"
17
+        android:paddingLeft="10px">
18 18
 
19 19
         <RelativeLayout
20 20
             android:layout_width="match_parent"
@@ -23,24 +23,25 @@
23 23
             android:orientation="horizontal">
24 24
 
25 25
 
26
-
27 26
             <RelativeLayout
28 27
                 android:id="@+id/hot_icon_layout"
29 28
                 android:layout_width="40px"
30 29
                 android:layout_height="40px">
31
-            <ImageView
32
-                android:id="@+id/hot_icon"
33
-                android:layout_width="match_parent"
34
-                android:layout_height="match_parent"
35
-                android:layout_centerVertical="true"
36
-                android:scaleType="centerInside"
37
-                android:src="@mipmap/ic_flowpig" />
30
+
31
+                <ImageView
32
+                    android:id="@+id/hot_icon"
33
+                    android:layout_width="match_parent"
34
+                    android:layout_height="match_parent"
35
+                    android:layout_centerVertical="true"
36
+                    android:scaleType="centerInside"
37
+                    android:src="@mipmap/ic_flowpig" />
38 38
             </RelativeLayout>
39
+
39 40
             <RelativeLayout
40 41
                 android:layout_width="wrap_content"
41 42
                 android:layout_height="match_parent"
42
-                android:layout_marginLeft="10px"
43 43
                 android:layout_centerVertical="true"
44
+                android:layout_marginLeft="10px"
44 45
                 android:layout_toRightOf="@id/hot_icon_layout">
45 46
 
46 47
                 <LinearLayout
@@ -54,9 +55,9 @@
54 55
                         android:id="@+id/hot_name"
55 56
                         android:layout_width="wrap_content"
56 57
                         android:layout_height="wrap_content"
57
-                        android:text="花无尽消费贷"
58 58
                         android:layout_gravity="center_vertical"
59 59
                         android:gravity="center_vertical"
60
+                        android:text="花无尽消费贷"
60 61
                         android:textColor="@color/text_black"
61 62
                         android:textSize="14px"
62 63
                         android:textStyle="bold" />
@@ -65,32 +66,32 @@
65 66
                         android:id="@+id/pri_title"
66 67
                         android:layout_width="wrap_content"
67 68
                         android:layout_height="wrap_content"
68
-                        android:layout_marginLeft="9px"
69 69
                         android:layout_gravity="center_vertical"
70
+                        android:layout_marginLeft="9px"
70 71
                         android:gravity="center"
71
-                        android:textStyle="bold"
72 72
                         android:paddingLeft="5px"
73 73
                         android:paddingTop="2px"
74
-                        android:paddingBottom="2px"
75 74
                         android:paddingRight="5px"
75
+                        android:paddingBottom="2px"
76 76
                         android:textColor="@color/white"
77 77
                         android:textSize="10px"
78
+                        android:textStyle="bold"
78 79
                         android:visibility="gone" />
79 80
 
80 81
                     <TextView
81 82
                         android:id="@+id/pri_title2"
82 83
                         android:layout_width="wrap_content"
83 84
                         android:layout_height="wrap_content"
85
+                        android:layout_gravity="center_vertical"
84 86
                         android:layout_marginLeft="9px"
85 87
                         android:gravity="center"
86
-                        android:layout_gravity="center_vertical"
87
-                        android:textStyle="bold"
88
-                        android:paddingTop="2px"
89
-                        android:paddingBottom="2px"
90 88
                         android:paddingLeft="5px"
89
+                        android:paddingTop="2px"
91 90
                         android:paddingRight="5px"
91
+                        android:paddingBottom="2px"
92 92
                         android:textColor="@color/white"
93 93
                         android:textSize="10px"
94
+                        android:textStyle="bold"
94 95
                         android:visibility="gone" />
95 96
                 </LinearLayout>
96 97
 
@@ -98,8 +99,8 @@
98 99
                     android:id="@+id/hot_destory"
99 100
                     android:layout_width="match_parent"
100 101
                     android:layout_height="wrap_content"
101
-                    android:layout_marginTop="3px"
102 102
                     android:layout_below="@+id/hot_adapter_title_layout"
103
+                    android:layout_marginTop="3px"
103 104
                     android:ellipsize="end"
104 105
                     android:maxLines="1"
105 106
                     android:text="随时随地,想借就借"
@@ -119,9 +120,9 @@
119 120
 
120 121
             <LinearLayout
121 122
                 android:layout_width="0dp"
122
-                android:layout_weight="1"
123 123
                 android:layout_height="wrap_content"
124 124
                 android:layout_centerVertical="true"
125
+                android:layout_weight="1"
125 126
                 android:gravity="center_vertical"
126 127
                 android:orientation="vertical">
127 128
 
@@ -130,8 +131,8 @@
130 131
                     android:layout_height="wrap_content"
131 132
                     android:text="额度 (元)"
132 133
                     android:textColor="#666666"
133
-                    android:textStyle="bold"
134
-                    android:textSize="12px" />
134
+                    android:textSize="12px"
135
+                    android:textStyle="bold" />
135 136
 
136 137
                 <TextView
137 138
                     android:id="@+id/hot_money"
@@ -145,23 +146,23 @@
145 146
 
146 147
             <RelativeLayout
147 148
                 android:layout_width="0dp"
148
-                android:layout_weight="1"
149 149
                 android:layout_height="wrap_content"
150 150
                 android:layout_alignParentRight="true"
151
-               >
151
+                android:layout_weight="1">
152 152
 
153 153
                 <LinearLayout
154 154
                     android:layout_width="wrap_content"
155 155
                     android:layout_height="wrap_content"
156 156
                     android:layout_marginLeft="15px"
157 157
                     android:orientation="vertical">
158
+
158 159
                     <TextView
159 160
                         android:layout_width="wrap_content"
160 161
                         android:layout_height="wrap_content"
161 162
                         android:text="期限"
162
-                        android:textStyle="bold"
163 163
                         android:textColor="#666666"
164
-                        android:textSize="12px" />
164
+                        android:textSize="12px"
165
+                        android:textStyle="bold" />
165 166
 
166 167
                     <TextView
167 168
                         android:id="@+id/hot_day"
@@ -219,14 +220,12 @@
219 220
 
220 221
 
221 222
     <RelativeLayout
222
-        android:layout_width="135px"
223
-        android:layout_height="match_parent"
224
-       >
223
+        android:layout_width="wrap_content"
224
+        android:layout_height="match_parent">
225 225
 
226 226
         <LinearLayout
227 227
             android:layout_width="wrap_content"
228 228
             android:layout_height="wrap_content"
229
-            android:layout_alignParentBottom="true"
230 229
             android:orientation="vertical">
231 230
 
232 231
             <TextView
@@ -236,21 +235,49 @@
236 235
                 android:layout_gravity="center_horizontal"
237 236
                 android:background="@mipmap/icon_shenqin"
238 237
                 android:gravity="center"
239
-                android:paddingBottom="3px"
240
-                android:text="立即申请"
241
-                android:textStyle="bold"
242 238
                 android:paddingLeft="13px"
243 239
                 android:paddingRight="13px"
240
+                android:paddingBottom="3px"
241
+                android:text="立即申请"
244 242
                 android:textColor="@color/text_black"
245
-                android:textSize="14px" />
243
+                android:textSize="14px"
244
+                android:textStyle="bold" />
246 245
 
246
+            <LinearLayout
247
+                android:layout_width="wrap_content"
248
+                android:layout_height="wrap_content"
249
+                android:layout_gravity="center_horizontal"
250
+                android:layout_marginTop="10px"
251
+                android:orientation="vertical">
252
+
253
+                <TextView
254
+                    android:id="@+id/item_hotadapter_lilv_tv"
255
+                    android:layout_width="wrap_content"
256
+                    android:layout_height="wrap_content"
257
+                    android:text="参考日利率"
258
+                    android:textColor="#666666"
259
+                    android:textSize="12px"
260
+                    android:textStyle="bold" />
261
+
262
+                <TextView
263
+                    android:id="@+id/lilv_text"
264
+                    android:layout_width="wrap_content"
265
+                    android:layout_height="wrap_content"
266
+                    android:layout_marginTop="3px"
267
+                    android:singleLine="true"
268
+                    android:text="0.59%"
269
+                    android:textColor="@color/text_yellow_color"
270
+                    android:textSize="14px"
271
+                    android:textStyle="bold" />
272
+            </LinearLayout>
247 273
 
248 274
             <LinearLayout
249 275
                 android:layout_width="wrap_content"
250 276
                 android:layout_height="wrap_content"
251 277
                 android:layout_marginTop="5px"
252 278
                 android:gravity="center"
253
-                android:orientation="vertical">
279
+                android:orientation="vertical"
280
+                android:visibility="gone">
254 281
 
255 282
                 <TextView
256 283
                     android:layout_width="wrap_content"

+ 30 - 2
app/src/main/res/layout/serch_adapter_layout.xml

@@ -7,7 +7,7 @@
7 7
     android:orientation="horizontal">
8 8
 
9 9
     <LinearLayout
10
-        android:layout_width="220px"
10
+        android:layout_width="240px"
11 11
         android:layout_height="match_parent"
12 12
         android:layout_marginLeft="15px"
13 13
         android:layout_marginTop="15px"
@@ -213,7 +213,7 @@
213 213
         android:layout_width="135px"
214 214
         android:layout_height="match_parent"
215 215
         android:orientation="horizontal"
216
-        android:paddingBottom="15px">
216
+        android:layout_marginBottom="15px">
217 217
 
218 218
 
219 219
         <ImageView
@@ -225,11 +225,39 @@
225 225
             android:scaleType="fitXY"
226 226
             android:src="@mipmap/quality" />
227 227
 
228
+        <LinearLayout
229
+            android:layout_width="wrap_content"
230
+            android:layout_height="wrap_content"
231
+            android:layout_centerHorizontal="true"
232
+            android:layout_gravity="center_horizontal"
233
+            android:layout_alignParentBottom="true"
234
+            android:orientation="vertical">
235
+
236
+            <TextView
237
+                android:id="@+id/item_searchadapter_lilv_tv"
238
+                android:layout_width="wrap_content"
239
+                android:layout_height="match_parent"
240
+                android:text="参考日利率"
241
+                android:textColor="#666666"
242
+                android:textSize="12px"
243
+                android:textStyle="bold" />
228 244
 
245
+            <TextView
246
+                android:id="@+id/lilv_text"
247
+                android:layout_width="wrap_content"
248
+                android:layout_height="wrap_content"
249
+                android:layout_marginTop="3px"
250
+                android:singleLine="true"
251
+                android:text="0.59%"
252
+                android:textColor="@color/text_yellow_color"
253
+                android:textSize="14px"
254
+                android:textStyle="bold" />
255
+        </LinearLayout>
229 256
         <LinearLayout
230 257
             android:layout_width="wrap_content"
231 258
             android:layout_height="wrap_content"
232 259
             android:layout_alignParentBottom="true"
260
+            android:visibility="gone"
233 261
             android:layout_centerHorizontal="true"
234 262
             android:layout_marginRight="3px"
235 263
             android:gravity="center"

+ 11 - 0
factory/src/main/java/com/smileflowpig/money/factory/model/api/product/ProductDetail.java

@@ -49,6 +49,17 @@ public class ProductDetail {
49 49
     private int is_collection;
50 50
     private String is_quality;
51 51
 
52
+    private String year_rate;
53
+
54
+
55
+    public String getYear_rate() {
56
+        return year_rate;
57
+    }
58
+
59
+    public void setYear_rate(String year_rate) {
60
+        this.year_rate = year_rate;
61
+    }
62
+
52 63
     public String getCustomer_service_number() {
53 64
         return customer_service_number;
54 65
     }