2 Commity 567cf28c3b ... f38bc34327

Autor SHA1 Wiadomość Data
  e f38bc34327 merg 6 lat temu
  e ba691e2787 换肤 6 lat temu
26 zmienionych plików z 375 dodań i 64 usunięć
  1. 13 16
      app/src/main/java/com/kuxuan/moneynote/base/BaseFragmentActivity.java
  2. 11 0
      app/src/main/java/com/kuxuan/moneynote/common/Constant.java
  3. 17 1
      app/src/main/java/com/kuxuan/moneynote/ui/activitys/MainActivity.java
  4. 16 0
      app/src/main/java/com/kuxuan/moneynote/ui/adapter/SkinAdapter.java
  5. 83 4
      app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialFragment.java
  6. 68 5
      app/src/main/java/com/kuxuan/moneynote/ui/weight/NavigationLayout.java
  7. BIN
      app/src/main/res/drawable-xhdpi/check_skin.png
  8. BIN
      app/src/main/res/drawable-xhdpi/remember_one.png
  9. BIN
      app/src/main/res/drawable-xhdpi/skin_icon.png
  10. BIN
      app/src/main/res/drawable-xxhdpi/check_skin.png
  11. BIN
      app/src/main/res/drawable-xxhdpi/remember_one.png
  12. BIN
      app/src/main/res/drawable-xxhdpi/skin_icon.png
  13. 45 0
      app/src/main/res/drawable/progressbar_my.xml
  14. 14 0
      app/src/main/res/drawable/skin_coner.xml
  15. 1 0
      app/src/main/res/layout/fragment_detial.xml
  16. 2 3
      app/src/main/res/layout/homeskin_popwindow.xml
  17. 5 4
      app/src/main/res/layout/layout_head.xml
  18. 5 4
      app/src/main/res/layout/layout_head_complex_first.xml
  19. 5 4
      app/src/main/res/layout/layout_head_complex_second.xml
  20. 5 4
      app/src/main/res/layout/layout_head_simple_first.xml
  21. 15 10
      app/src/main/res/layout/layout_navigation.xml
  22. 39 6
      app/src/main/res/layout/skinadapter_item.xml
  23. 7 1
      app/src/main/res/values-v19/styles.xml
  24. 7 0
      app/src/main/res/values-v21/styles.xml
  25. 6 2
      app/src/main/res/values/colors.xml
  26. 11 0
      app/src/main/res/values/styles.xml

+ 13 - 16
app/src/main/java/com/kuxuan/moneynote/base/BaseFragmentActivity.java

@@ -13,9 +13,6 @@ import android.view.WindowManager;
13 13
 
14 14
 import com.kuxuan.moneynote.R;
15 15
 import com.kuxuan.moneynote.utils.StatusBarUtil;
16
-import com.kuxuan.moneynote.utils.StatusBarUtil_One;
17
-
18
-import java.lang.reflect.Field;
19 16
 
20 17
 import butterknife.ButterKnife;
21 18
 
@@ -34,20 +31,20 @@ public abstract class BaseFragmentActivity extends MyAutoActivity {
34 31
         super.onCreate(savedInstanceState);
35 32
 
36 33
 
37
-        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
38
-            try {
39
-                Class decorViewClazz = Class.forName("com.android.internal.policy.DecorView");
40
-                Field field = decorViewClazz.getDeclaredField("mSemiTransparentStatusBarColor");
41
-                field.setAccessible(true);
42
-                field.setInt(getWindow().getDecorView(), Color.TRANSPARENT);  //改为透明
43
-                getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
44
-            } catch (Exception e) {}
45
-        }else{
46
-            StatusBarUtil_One.translucentStatusBar(this);
47
-            StatusBarUtil.StatusBarLightMode(this);
48
-        }
34
+//        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
35
+//            try {
36
+//                Class decorViewClazz = Class.forName("com.android.internal.policy.DecorView");
37
+//                Field field = decorViewClazz.getDeclaredField("mSemiTransparentStatusBarColor");
38
+//                field.setAccessible(true);
39
+//                field.setInt(getWindow().getDecorView(), Color.TRANSPARENT);  //改为透明
40
+//                getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
41
+//            } catch (Exception e) {}
42
+//        }else{
43
+//            StatusBarUtil_One.translucentStatusBar(this);
44
+//            StatusBarUtil.StatusBarLightMode(this);
45
+//        }
49 46
 
50
-//        initWidows();
47
+        initWidows();
51 48
 
52 49
 
53 50
 

+ 11 - 0
app/src/main/java/com/kuxuan/moneynote/common/Constant.java

@@ -86,6 +86,17 @@ public class Constant {
86 86
     }
87 87
 
88 88
 
89
+    public  static  class Skin{
90
+
91
+        public static final String CHECKED = "checked";
92
+
93
+        public static final String LOADED = "loaded";
94
+
95
+
96
+    }
97
+
98
+
99
+
89 100
     public static class Code_Request {
90 101
         public static final int SUCCESS_CODE = 0;
91 102
         /**

+ 17 - 1
app/src/main/java/com/kuxuan/moneynote/ui/activitys/MainActivity.java

@@ -17,6 +17,7 @@ import com.kuxuan.moneynote.db.CategoryDaoOperator;
17 17
 import com.kuxuan.moneynote.json.BaseJson;
18 18
 import com.kuxuan.moneynote.json.UploadBeanJson;
19 19
 import com.kuxuan.moneynote.json.UploadDbjson;
20
+import com.kuxuan.moneynote.json.netbody.SkinBean;
20 21
 import com.kuxuan.moneynote.servier.ServiceUtil;
21 22
 import com.kuxuan.moneynote.ui.activitys.account.AccountActivity;
22 23
 import com.kuxuan.moneynote.ui.activitys.home.DataGenerator;
@@ -29,6 +30,9 @@ import com.kuxuan.moneynote.utils.TimeUtlis;
29 30
 import com.umeng.analytics.MobclickAgent;
30 31
 import com.umeng.socialize.UMShareAPI;
31 32
 
33
+import org.greenrobot.eventbus.EventBus;
34
+import org.greenrobot.eventbus.Subscribe;
35
+
32 36
 import java.util.ArrayList;
33 37
 
34 38
 import butterknife.Bind;
@@ -99,8 +103,13 @@ public class MainActivity extends BaseFragmentActivity {
99 103
         }
100 104
 //        getTitleView(0).setTitle(getResources().getString(R.string.app_name));
101 105
 
102
-        //开启上传服务(更新的时候)
106
+        EventBus.getDefault().register(this);
107
+    }
103 108
 
109
+    @Override
110
+    protected void onDestroy() {
111
+        EventBus.getDefault().unregister(this);
112
+        super.onDestroy();
104 113
     }
105 114
 
106 115
     /**
@@ -264,6 +273,13 @@ public class MainActivity extends BaseFragmentActivity {
264 273
     }
265 274
 
266 275
 
276
+    @Subscribe
277
+    public void onMessageEvent(SkinBean skinBean) {
278
+        navigationLayout.refresh(0);
279
+        navigationLayout.setCenter_CIColor(skinBean.getCode());
280
+    }
281
+
282
+
267 283
     private void
268 284
     onTabItemSelected(int position) {
269 285
         Fragment fragment = null;

+ 16 - 0
app/src/main/java/com/kuxuan/moneynote/ui/adapter/SkinAdapter.java

@@ -1,10 +1,16 @@
1 1
 package com.kuxuan.moneynote.ui.adapter;
2 2
 
3 3
 import android.support.annotation.Nullable;
4
+import android.view.View;
5
+import android.widget.ImageView;
4 6
 
5 7
 import com.chad.library.adapter.base.BaseQuickAdapter;
6 8
 import com.chad.library.adapter.base.BaseViewHolder;
9
+import com.kuxuan.moneynote.R;
10
+import com.kuxuan.moneynote.common.Constant;
7 11
 import com.kuxuan.moneynote.json.netbody.RES;
12
+import com.kuxuan.moneynote.utils.GlideUtil;
13
+import com.kuxuan.moneynote.utils.SPUtil;
8 14
 
9 15
 import java.util.List;
10 16
 
@@ -29,7 +35,17 @@ public class SkinAdapter extends BaseQuickAdapter<RES,BaseViewHolder> {
29 35
     @Override
30 36
     protected void convert(BaseViewHolder helper, RES item) {
31 37
 
38
+        helper.getView(R.id.view).setVisibility(View.VISIBLE);
39
+        helper.getView(R.id.iv_check).setVisibility(View.GONE);
32 40
 
41
+        int checked = (int) SPUtil.get(mContext, Constant.Skin.CHECKED,-1);
42
+
43
+        if(helper.getPosition() == checked){
44
+        helper.getView(R.id.iv_check).setVisibility(View.VISIBLE);
45
+        }
46
+
47
+        ImageView iv_skin = helper.getView(R.id.iv_skin);
48
+        GlideUtil.setImageWithNoCache(mContext,item.getPreview_img(),iv_skin);
33 49
 
34 50
 
35 51
     }

+ 83 - 4
app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialFragment.java

@@ -13,10 +13,12 @@ import android.view.View;
13 13
 import android.widget.ImageView;
14 14
 import android.widget.LinearLayout;
15 15
 import android.widget.PopupWindow;
16
+import android.widget.ProgressBar;
16 17
 import android.widget.RelativeLayout;
17 18
 import android.widget.TextView;
18 19
 
19 20
 import com.bumptech.glide.Glide;
21
+import com.chad.library.adapter.base.BaseQuickAdapter;
20 22
 import com.classic.common.MultipleStatusView;
21 23
 import com.kuxuan.moneynote.R;
22 24
 import com.kuxuan.moneynote.base.BaseFragmentActivity;
@@ -24,6 +26,7 @@ import com.kuxuan.moneynote.base.mvpbase.MVPFragment;
24 26
 import com.kuxuan.moneynote.common.Constant;
25 27
 import com.kuxuan.moneynote.json.TimeJson;
26 28
 import com.kuxuan.moneynote.json.TypeDataJson;
29
+import com.kuxuan.moneynote.json.netbody.RES;
27 30
 import com.kuxuan.moneynote.json.netbody.SkinBean;
28 31
 import com.kuxuan.moneynote.ui.activitys.SearchActivity;
29 32
 import com.kuxuan.moneynote.ui.activitys.edit.EditBillActivity;
@@ -34,6 +37,7 @@ import com.kuxuan.moneynote.ui.activitys.eventbus.NetworkEvent;
34 37
 import com.kuxuan.moneynote.ui.activitys.eventbus.RefreshEvent;
35 38
 import com.kuxuan.moneynote.ui.activitys.login.LoginActivity;
36 39
 import com.kuxuan.moneynote.ui.activitys.login.PhoneLoginActivity;
40
+import com.kuxuan.moneynote.ui.adapter.SkinAdapter;
37 41
 import com.kuxuan.moneynote.ui.weight.ScoreDialog;
38 42
 import com.kuxuan.moneynote.utils.DisplayUtil;
39 43
 import com.kuxuan.moneynote.utils.JavaFormatUtils;
@@ -48,6 +52,9 @@ import org.greenrobot.eventbus.EventBus;
48 52
 import org.greenrobot.eventbus.Subscribe;
49 53
 import org.greenrobot.eventbus.ThreadMode;
50 54
 
55
+import java.util.ArrayList;
56
+import java.util.List;
57
+
51 58
 import butterknife.Bind;
52 59
 import butterknife.OnClick;
53 60
 
@@ -102,6 +109,9 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
102 109
         activity = (BaseFragmentActivity) getActivity();
103 110
         mPresenter.initRecyclerView(getActivity(), mRecyclerView);
104 111
         mPresenter.initRefreshLayout(getActivity(), refreshLayout);
112
+        mPresenter.initListener(fragmentDetialYear);
113
+        mPresenter.initListener(fragmentDetialMonth);
114
+        mPresenter.InitPopWindow();
105 115
         mPresenter.initListener(time_layout);
106 116
         initMiluView();
107 117
         checkNet();
@@ -313,10 +323,15 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
313 323
         startActivity(intent);
314 324
     }
315 325
 
326
+
327
+    SkinBean skinBean;
328
+
316 329
     @Override
317 330
     public void showSkinData(SkinBean skinBean) {
318 331
 
319 332
 
333
+        this.skinBean = skinBean;
334
+
320 335
     }
321 336
 
322 337
 
@@ -337,6 +352,9 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
337 352
         checkNet();
338 353
     }
339 354
 
355
+    BaseQuickAdapter adapter;
356
+
357
+
340 358
 
341 359
     @OnClick(R.id.iv_skinicon)
342 360
     public void click() {
@@ -344,6 +362,7 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
344 362
         showPopWindow();
345 363
 
346 364
     }
365
+    ProgressBar progressBar;
347 366
 
348 367
     @OnClick(R.id.iv_search)
349 368
     public void searchClick() {
@@ -372,17 +391,62 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
372 391
         // 第三和第四个参数分别是PopupWindow相对父View的x、y偏移
373 392
         popupWindow.showAtLocation(relativeLayout, Gravity.BOTTOM, 0, 0);
374 393
 
375
-
376
-        RecyclerView recyclerView = contentView.findViewById(R.id.recyclerview);
377
-
394
+        final RecyclerView recyclerView = contentView.findViewById(R.id.recyclerview);
378 395
         LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
379 396
         linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
380 397
         recyclerView.setLayoutManager(linearLayoutManager);
381
-//        recyclerView.setAdapter(new SkinAdapter());
398
+        adapter = new SkinAdapter(R.layout.skinadapter_item);
399
+        recyclerView.setAdapter(adapter);
400
+
401
+        adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
402
+            @Override
403
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
404
+
405
+                ImageView iv_check = view.findViewById(R.id.iv_check);
406
+                if(iv_check.getVisibility()==View.VISIBLE){
407
+                    return;
408
+                }
382 409
 
410
+                View background = view.findViewById(R.id.view);
411
+
412
+                if(background.getVisibility()==View.VISIBLE){
413
+
414
+                    progressBar  = view.findViewById(R.id.progressbar);
415
+                    progressBar.setMax(1000);
416
+                    if(progressBar.getVisibility()==View.GONE){
417
+                        progressBar.setVisibility(View.VISIBLE);
418
+                    }
419
+
420
+                    for (int i=0;i<1000;i++){
421
+                        progressBar.setProgress(i);
422
+                    }
423
+//                    progressBar.setVisibility(View.GONE);
424
+                    background.setVisibility(View.GONE);
425
+                }else {
426
+                    SPUtil.putAndApply(getContext(), Constant.Skin.CHECKED,position);
427
+                    adapter.notifyDataSetChanged();
428
+                    SkinBean  mskinBean = new SkinBean();
429
+                    mskinBean.setCode(position);
430
+                    EventBus.getDefault().post(mskinBean);
431
+                }
432
+
433
+
434
+
435
+
436
+            }
437
+        });
438
+
439
+
440
+        setSkinData();
383 441
 
384 442
         ImageView ivpop_close = contentView.findViewById(R.id.ivpop_close);
385 443
 
444
+       ivpop_close.setOnClickListener(new View.OnClickListener() {
445
+           @Override
446
+           public void onClick(View v) {
447
+               popupWindow.dismiss();
448
+           }
449
+       });
386 450
         ivpop_close.setOnClickListener(new View.OnClickListener() {
387 451
             @Override
388 452
             public void onClick(View v) {
@@ -391,6 +455,21 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
391 455
         });
392 456
         mPresenter.InitPopWindow();
393 457
 
458
+
459
+    }
460
+    List<RES> resList;
461
+    private void setSkinData() {
462
+
463
+        resList = new ArrayList<>();
464
+        resList.add(new RES());
465
+        resList.add(new RES());
466
+        resList.add(new RES());
467
+        resList.add(new RES());
468
+        resList.add(new RES());
469
+        resList.add(new RES());
470
+        adapter.setNewData(resList);
471
+
472
+//        adapter.setNewData(skinBean.getRes());
394 473
     }
395 474
 
396 475
 

+ 68 - 5
app/src/main/java/com/kuxuan/moneynote/ui/weight/NavigationLayout.java

@@ -12,7 +12,9 @@ import android.widget.ImageView;
12 12
 import android.widget.TextView;
13 13
 
14 14
 import com.kuxuan.moneynote.R;
15
+import com.kuxuan.moneynote.common.Constant;
15 16
 import com.kuxuan.moneynote.ui.activitys.home.DataGenerator;
17
+import com.kuxuan.moneynote.utils.SPUtil;
16 18
 
17 19
 import de.hdodenhof.circleimageview.CircleImageView;
18 20
 
@@ -52,12 +54,14 @@ public class NavigationLayout extends FrameLayout implements View.OnClickListene
52 54
         initView(context);
53 55
     }
54 56
 
55
-
57
+    CircleImageView CI_enter;
56 58
     private void initView(Context context) {
57 59
         mContext = context;
58 60
         View view = LayoutInflater.from(context).inflate(R.layout.layout_navigation, this);
59 61
         String[] stringArray = context.getResources().getStringArray(R.array.navigation_title);
60 62
 
63
+        CI_enter = view.findViewById(R.id.CI_enter);
64
+
61 65
         mingxi_frame = view.findViewById(R.id.layout_mingxi);
62 66
         img[0] = view.findViewById(R.id.tab_mingxi_img);
63 67
         mingxi_text = view.findViewById(R.id.tab_mingxi_text);
@@ -154,30 +158,89 @@ public class NavigationLayout extends FrameLayout implements View.OnClickListene
154 158
             case 0:
155 159
                 img[0].setSelected(true);
156 160
                 mingxi_text.setSelected(true);
157
-                CI_imgarr[0].setImageResource(R.color.hometab_skin);
158 161
                 break;
159 162
             case 1:
160 163
                 baobiao_text.setSelected(true);
161 164
                 img[1].setSelected(true);
162
-                CI_imgarr[1].setImageResource(R.color.hometab_skin);
165
+                CI_imgarr[1].setImageResource(R.color.hometab_skin_2);
163 166
                 break;
164 167
             case 2:
165 168
                 faxian_text.setSelected(true);
166 169
                 img[2].setSelected(true);
167
-                CI_imgarr[2].setImageResource(R.color.hometab_skin);
170
+                CI_imgarr[2].setImageResource(R.color.hometab_skin_2);
168 171
                 break;
169 172
             case 3:
170 173
                 user_text.setSelected(true);
171 174
                 img[3].setSelected(true);
172
-                CI_imgarr[3].setImageResource(R.color.hometab_skin);
175
+                CI_imgarr[3].setImageResource(R.color.hometab_skin_2);
173 176
                 break;
174 177
         }
178
+        setColor(position);
175 179
         if(listener!=null) {
176 180
             listener.onClick(position);
177 181
         }
178 182
     }
179 183
 
180 184
 
185
+    private void setColor(int position) {
186
+
187
+        int checked = (int) SPUtil.get(mContext, Constant.Skin.CHECKED,2);
188
+
189
+        switch (checked) {
190
+            case 0:
191
+                CI_imgarr[position].setImageResource(R.color.hometab_skin_1);
192
+                break;
193
+            case 1:
194
+                CI_imgarr[position].setImageResource(R.color.hometab_skin_2);
195
+                break;
196
+            case 2:
197
+                CI_imgarr[position].setImageResource(R.color.hometab_skin_3);
198
+                break;
199
+            case 3:
200
+                CI_imgarr[position].setImageResource(R.color.hometab_skin_4);
201
+                break;
202
+            case 4:
203
+                CI_imgarr[position].setImageResource(R.color.hometab_skin_5);
204
+                break;
205
+            case 5:
206
+                CI_imgarr[position].setImageResource(R.color.hometab_skin_6);
207
+                break;
208
+        }
209
+
210
+    }
211
+
212
+
213
+    public void setCenter_CIColor(int Position){
214
+
215
+
216
+        switch (Position) {
217
+            case 0:
218
+                CI_enter.setImageResource(R.color.hometab_skin_1);
219
+                break;
220
+            case 1:
221
+                CI_enter.setImageResource(R.color.hometab_skin_2);
222
+                break;
223
+            case 2:
224
+                CI_enter.setImageResource(R.color.hometab_skin_3);
225
+                break;
226
+            case 3:
227
+                CI_enter.setImageResource(R.color.hometab_skin_4);
228
+                break;
229
+            case 4:
230
+                CI_enter.setImageResource(R.color.hometab_skin_5);
231
+                break;
232
+            case 5:
233
+                CI_enter.setImageResource(R.color.hometab_skin_6);
234
+                break;
235
+        }
236
+
237
+    }
238
+
239
+
240
+    public void refresh(int position){
241
+        setColor(position);
242
+    }
243
+
181 244
     public void setPosition(int position){
182 245
         initialization(position);
183 246
 //        selectPosition(position);

BIN
app/src/main/res/drawable-xhdpi/check_skin.png


BIN
app/src/main/res/drawable-xhdpi/remember_one.png


BIN
app/src/main/res/drawable-xhdpi/skin_icon.png


BIN
app/src/main/res/drawable-xxhdpi/check_skin.png


BIN
app/src/main/res/drawable-xxhdpi/remember_one.png


BIN
app/src/main/res/drawable-xxhdpi/skin_icon.png


+ 45 - 0
app/src/main/res/drawable/progressbar_my.xml

@@ -0,0 +1,45 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3
+
4
+    <item android:id="@android:id/background">
5
+
6
+        <shape >
7
+
8
+            <stroke android:color="#0d0f11" android:width="1dp"/>
9
+            <gradient
10
+                android:angle="270"
11
+                android:centerY="0.75"
12
+                android:endColor="#F5F5F5"
13
+                android:startColor="#BEBEBE" />
14
+        </shape>
15
+    </item>
16
+
17
+    <item android:id="@android:id/secondaryProgress">
18
+        <clip >
19
+            <shape >
20
+                <corners android:radius="0dip" />
21
+
22
+                <gradient
23
+                    android:angle="270"
24
+                    android:centerY="0.75"
25
+                    android:endColor="#165CBC"
26
+                    android:startColor="#85B0E9" />
27
+            </shape>
28
+        </clip>
29
+    </item>
30
+
31
+    <item android:id="@android:id/progress">
32
+
33
+        <clip >
34
+            <shape >
35
+                <gradient
36
+                    android:angle="270"
37
+                    android:centerY="0.75"
38
+                    android:endColor="#FE7F00"
39
+                    android:startColor="#FE7F00" />
40
+            </shape>
41
+        </clip>
42
+    </item>
43
+
44
+
45
+</layer-list>

+ 14 - 0
app/src/main/res/drawable/skin_coner.xml

@@ -0,0 +1,14 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
3
+
4
+
5
+    <corners
6
+        android:radius="10dp"
7
+        />
8
+
9
+    <size
10
+        android:width="80px"
11
+        android:height="50px"/>
12
+
13
+
14
+</shape>

+ 1 - 0
app/src/main/res/layout/fragment_detial.xml

@@ -21,6 +21,7 @@
21 21
         <com.zhy.autolayout.AutoRelativeLayout
22 22
             android:layout_width="match_parent"
23 23
             android:layout_height="wrap_content"
24
+            android:layout_marginTop="13px"
24 25
             android:padding="10dp">
25 26
 
26 27
             <LinearLayout

+ 2 - 3
app/src/main/res/layout/homeskin_popwindow.xml

@@ -40,12 +40,11 @@
40 40
     <android.support.v7.widget.RecyclerView
41 41
         android:id="@+id/recyclerview"
42 42
         android:layout_width="match_parent"
43
-        android:layout_height="50px"
44
-        android:layout_alignTop="@+id/iv_add"
43
+        android:layout_height="55px"
45 44
         android:layout_toRightOf="@+id/iv_add"
45
+        android:layout_alignBottom="@+id/iv_add"
46 46
         android:layout_marginLeft="10px"
47 47
         />
48 48
 
49 49
 
50
-
51 50
 </com.zhy.autolayout.AutoRelativeLayout>

+ 5 - 4
app/src/main/res/layout/layout_head.xml

@@ -1,11 +1,12 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
+<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
     android:id="@+id/header"
4 4
     android:layout_width="match_parent"
5 5
     android:layout_height="wrap_content"
6
+    android:paddingTop="23px"
6 7
     android:background="@color/bg_title_gray">
7 8
 
8
-    <RelativeLayout
9
+    <com.zhy.autolayout.AutoRelativeLayout
9 10
         android:id="@+id/header_title_layout"
10 11
         android:layout_width="match_parent"
11 12
         android:layout_height="50dp"
@@ -85,7 +86,7 @@
85 86
             android:paddingLeft="@dimen/head_text_paddinghorizontal"
86 87
            >
87 88
         </TextView>
88
-    </RelativeLayout>
89
+    </com.zhy.autolayout.AutoRelativeLayout>
89 90
 
90 91
 
91 92
     <RelativeLayout
@@ -186,4 +187,4 @@
186 187
     <!--android:textSize="14px"-->
187 188
     <!--android:visibility="visible" />-->
188 189
     <!--</RelativeLayout>-->
189
-</RelativeLayout>
190
+</com.zhy.autolayout.AutoRelativeLayout>

+ 5 - 4
app/src/main/res/layout/layout_head_complex_first.xml

@@ -1,11 +1,12 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
+<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
                 android:id="@+id/header"
4 4
                 android:layout_width="match_parent"
5 5
                 android:layout_height="wrap_content"
6
+                android:paddingTop="23px"
6 7
                 android:background="@color/bg_title_gray">
7 8
 
8
-    <RelativeLayout
9
+    <com.zhy.autolayout.AutoRelativeLayout
9 10
         android:id="@+id/header_title_layout"
10 11
         android:layout_width="match_parent"
11 12
         android:layout_height="50dp"
@@ -87,5 +88,5 @@
87 88
             />
88 89
 
89 90
 
90
-    </RelativeLayout>
91
-</RelativeLayout>
91
+    </com.zhy.autolayout.AutoRelativeLayout>
92
+</com.zhy.autolayout.AutoRelativeLayout>

+ 5 - 4
app/src/main/res/layout/layout_head_complex_second.xml

@@ -1,11 +1,12 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
+<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
     android:id="@+id/header"
4 4
     android:layout_width="match_parent"
5 5
     android:layout_height="wrap_content"
6
+    android:paddingTop="23px"
6 7
     android:background="@color/bg_title_gray">
7 8
 
8
-    <RelativeLayout
9
+    <com.zhy.autolayout.AutoRelativeLayout
9 10
         android:id="@+id/header_edit_layout"
10 11
         android:layout_width="match_parent"
11 12
         android:layout_height="wrap_content"
@@ -46,7 +47,7 @@
46 47
 
47 48
 
48 49
 
49
-    </RelativeLayout>
50
+    </com.zhy.autolayout.AutoRelativeLayout>
50 51
 
51 52
     <!--<RelativeLayout-->
52 53
     <!--android:id="@+id/header_search_layout"-->
@@ -101,4 +102,4 @@
101 102
     <!--android:textSize="14px"-->
102 103
     <!--android:visibility="visible" />-->
103 104
     <!--</RelativeLayout>-->
104
-</RelativeLayout>
105
+</com.zhy.autolayout.AutoRelativeLayout>

+ 5 - 4
app/src/main/res/layout/layout_head_simple_first.xml

@@ -1,11 +1,12 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
+<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
     android:id="@+id/header"
4 4
     android:layout_width="match_parent"
5 5
     android:layout_height="wrap_content"
6
+    android:paddingTop="23px"
6 7
     android:background="@color/bg_title_gray">
7 8
 
8
-    <RelativeLayout
9
+    <com.zhy.autolayout.AutoRelativeLayout
9 10
         android:id="@+id/header_title_layout"
10 11
         android:layout_width="match_parent"
11 12
         android:layout_height="50dp"
@@ -27,6 +28,6 @@
27 28
             android:text="@string/app_name"
28 29
             android:textColor="@android:color/black"
29 30
             android:textSize="@dimen/text_big_size" />
30
-    </RelativeLayout>
31
+    </com.zhy.autolayout.AutoRelativeLayout>
31 32
 
32
-</RelativeLayout>
33
+</com.zhy.autolayout.AutoRelativeLayout>

+ 15 - 10
app/src/main/res/layout/layout_navigation.xml

@@ -148,7 +148,6 @@
148 148
                 android:layout_marginRight="2dp"
149 149
                 />
150 150
 
151
-
152 151
             <ImageView
153 152
                 android:id="@+id/tab_user_img"
154 153
                 android:layout_width="wrap_content"
@@ -177,28 +176,34 @@
177 176
         >
178 177
 
179 178
         <RelativeLayout
180
-            android:layout_marginBottom="20dp"
179
+            android:layout_marginBottom="5dp"
181 180
             android:id="@+id/center_click"
182 181
             android:layout_width="wrap_content"
183 182
             android:layout_height="wrap_content"
184 183
             android:layout_gravity="center_horizontal">
185 184
 
185
+
186
+            <de.hdodenhof.circleimageview.CircleImageView
187
+                android:id="@+id/CI_enter"
188
+                android:layout_width="35dp"
189
+                android:layout_height="35dp"
190
+                android:layout_centerInParent="true"
191
+                android:layout_marginTop="4dp"
192
+                android:src="@color/hometab_skin_2"
193
+                />
194
+
186 195
             <ImageView
187 196
                 android:id="@+id/center_img"
188 197
                 android:layout_width="wrap_content"
189 198
                 android:layout_height="wrap_content"
190 199
                 android:layout_centerInParent="true"
191
-                android:src="@drawable/bottom_add_normal"/>
200
+                android:src="@drawable/remember_one"
201
+                />
202
+
203
+
192 204
 
193 205
         </RelativeLayout>
194 206
 
195
-        <TextView
196
-            android:layout_width="wrap_content"
197
-            android:layout_height="wrap_content"
198
-            android:layout_gravity="bottom|center"
199
-            android:layout_marginBottom="2dp"
200
-            android:text="@string/addbill"
201
-            android:textSize="10dp"/>
202 207
     </FrameLayout>
203 208
 
204 209
 </FrameLayout>

+ 39 - 6
app/src/main/res/layout/skinadapter_item.xml

@@ -1,18 +1,51 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
+<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
               android:orientation="vertical"
4
-              android:layout_width="match_parent"
5
-              android:layout_height="match_parent">
4
+              android:layout_width="wrap_content"
5
+              android:layout_height="wrap_content">
6 6
 
7 7
 
8 8
     <ImageView
9
-        android:layout_width="match_parent"
10
-        android:layout_height="match_parent"
9
+        android:id="@+id/iv_skin"
10
+        android:layout_width="80px"
11
+        android:layout_height="50px"
12
+        android:layout_marginLeft="10px"
13
+        android:layout_marginRight="10px"
14
+        android:layout_marginTop="5px"
15
+        android:src="@drawable/skin_icon"
16
+        />
17
+
18
+    <View
19
+        android:id="@+id/view"
20
+        android:layout_width="80px"
21
+        android:layout_height="50px"
22
+        android:layout_marginLeft="10px"
23
+        android:layout_marginRight="10px"
24
+        android:layout_marginTop="5px"
25
+        android:background="#66000000"
26
+        />
11 27
 
12 28
 
29
+    <ProgressBar
30
+        android:id="@+id/progressbar"
31
+        android:layout_width="80px"
32
+        android:layout_height="3px"
33
+        android:progress="0"
34
+        style="@style/progressbar_my"
35
+        android:layout_centerInParent="true"
36
+        android:visibility="gone"
13 37
         />
14 38
 
15 39
 
16 40
 
41
+    <ImageView
42
+        android:id="@+id/iv_check"
43
+        android:layout_width="wrap_content"
44
+        android:layout_height="wrap_content"
45
+        android:src="@drawable/check_skin"
46
+        android:layout_marginLeft="82px"
47
+        android:visibility="invisible"
48
+        />
49
+
17 50
 
18
-</LinearLayout>
51
+</com.zhy.autolayout.AutoRelativeLayout>

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

@@ -13,5 +13,11 @@
13 13
         <item name="windowNoTitle">true</item>
14 14
     </style>
15 15
 
16
-
16
+    <style name="progressbar_my" parent="@android:style/Widget.ProgressBar.Horizontal">
17
+        <item name="android:maxHeight" >50px</item>
18
+        <item name="android:minHeight">8px</item>
19
+        <item name="android:indeterminateOnly">false</item>
20
+        <item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item>
21
+        <item name="android:progressDrawable">@drawable/progressbar_my</item>
22
+    </style>
17 23
 </resources>

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

@@ -14,4 +14,11 @@
14 14
         <item name="android:statusBarColor">@color/bg_title_gray</item>
15 15
     </style>
16 16
 
17
+    <style name="progressbar_my" parent="@android:style/Widget.ProgressBar.Horizontal">
18
+        <item name="android:maxHeight" >50px</item>
19
+        <item name="android:minHeight">8px</item>
20
+        <item name="android:indeterminateOnly">false</item>
21
+        <item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item>
22
+        <item name="android:progressDrawable">@drawable/progressbar_my</item>
23
+    </style>
17 24
 </resources>

+ 6 - 2
app/src/main/res/values/colors.xml

@@ -39,7 +39,11 @@
39 39
 
40 40
     <color name="textcolor">#222</color>
41 41
 
42
-    <color name="hometab_skin">#FFE500</color>
43
-
42
+    <color name="hometab_skin_1">#F74759</color>
43
+    <color name="hometab_skin_2">#ffc600</color>
44
+    <color name="hometab_skin_3">#2EB370</color>
45
+    <color name="hometab_skin_4">#F67BBE</color>
46
+    <color name="hometab_skin_5">#41C3D4</color>
47
+    <color name="hometab_skin_6">#FBAA03</color>
44 48
 
45 49
 </resources>

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

@@ -92,4 +92,15 @@
92 92
         <item name="android:windowBackground">@android:color/transparent</item>
93 93
     </style>
94 94
 
95
+    <style name="progressbar_my" parent="@android:style/Widget.ProgressBar.Horizontal">
96
+        <item name="android:maxHeight" >50px</item>
97
+        <item name="android:minHeight">8px</item>
98
+        <item name="android:indeterminateOnly">false</item>
99
+        <item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item>
100
+        <item name="android:progressDrawable">@drawable/progressbar_my</item>
101
+    </style>
102
+
103
+
104
+
105
+
95 106
 </resources>