e 6 年 前
コミット
ba691e2787
共有25 個のファイルを変更した360 個の追加62 個の削除を含む
  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. 73 6
      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_second.xml
  19. 5 4
      app/src/main/res/layout/layout_head_simple_first.xml
  20. 15 10
      app/src/main/res/layout/layout_navigation.xml
  21. 39 6
      app/src/main/res/layout/skinadapter_item.xml
  22. 7 1
      app/src/main/res/values-v19/styles.xml
  23. 7 0
      app/src/main/res/values-v21/styles.xml
  24. 6 2
      app/src/main/res/values/colors.xml
  25. 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

@@ -77,6 +77,17 @@ public class Constant {
77 77
     }
78 78
 
79 79
 
80
+    public  static  class Skin{
81
+
82
+        public static final String CHECKED = "checked";
83
+
84
+        public static final String LOADED = "loaded";
85
+
86
+
87
+    }
88
+
89
+
90
+
80 91
     public static class Code_Request {
81 92
         public static final int SUCCESS_CODE = 0;
82 93
         /**

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

@@ -18,6 +18,7 @@ import com.kuxuan.moneynote.db.CategoryDaoOperator;
18 18
 import com.kuxuan.moneynote.json.BeanNewJson;
19 19
 import com.kuxuan.moneynote.json.UploadBeanJson;
20 20
 import com.kuxuan.moneynote.json.UploadDbjson;
21
+import com.kuxuan.moneynote.json.netbody.SkinBean;
21 22
 import com.kuxuan.moneynote.servier.ServiceUtil;
22 23
 import com.kuxuan.moneynote.ui.activitys.account.AccountActivity;
23 24
 import com.kuxuan.moneynote.ui.activitys.home.DataGenerator;
@@ -30,6 +31,9 @@ import com.kuxuan.moneynote.utils.TimeUtlis;
30 31
 import com.umeng.analytics.MobclickAgent;
31 32
 import com.umeng.socialize.UMShareAPI;
32 33
 
34
+import org.greenrobot.eventbus.EventBus;
35
+import org.greenrobot.eventbus.Subscribe;
36
+
33 37
 import java.util.ArrayList;
34 38
 
35 39
 import butterknife.Bind;
@@ -100,8 +104,13 @@ public class MainActivity extends BaseFragmentActivity {
100 104
         }
101 105
 //        getTitleView(0).setTitle(getResources().getString(R.string.app_name));
102 106
 
103
-        //开启上传服务(更新的时候)
107
+        EventBus.getDefault().register(this);
108
+    }
104 109
 
110
+    @Override
111
+    protected void onDestroy() {
112
+        EventBus.getDefault().unregister(this);
113
+        super.onDestroy();
105 114
     }
106 115
 
107 116
     /**
@@ -283,6 +292,13 @@ public class MainActivity extends BaseFragmentActivity {
283 292
     }
284 293
 
285 294
 
295
+    @Subscribe
296
+    public void onMessageEvent(SkinBean skinBean) {
297
+        navigationLayout.refresh(0);
298
+        navigationLayout.setCenter_CIColor(skinBean.getCode());
299
+    }
300
+
301
+
286 302
     private void
287 303
     onTabItemSelected(int position) {
288 304
         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
     }

+ 73 - 6
app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialFragment.java

@@ -13,16 +13,20 @@ 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;
23 25
 import com.kuxuan.moneynote.base.mvpbase.MVPFragment;
26
+import com.kuxuan.moneynote.common.Constant;
24 27
 import com.kuxuan.moneynote.json.TimeJson;
25 28
 import com.kuxuan.moneynote.json.TypeDataJson;
29
+import com.kuxuan.moneynote.json.netbody.RES;
26 30
 import com.kuxuan.moneynote.json.netbody.SkinBean;
27 31
 import com.kuxuan.moneynote.ui.activitys.edit.EditBillActivity;
28 32
 import com.kuxuan.moneynote.ui.activitys.eventbus.LoginEvent;
@@ -31,10 +35,12 @@ import com.kuxuan.moneynote.ui.activitys.eventbus.NetworkEvent;
31 35
 import com.kuxuan.moneynote.ui.activitys.eventbus.RefreshEvent;
32 36
 import com.kuxuan.moneynote.ui.activitys.login.LoginActivity;
33 37
 import com.kuxuan.moneynote.ui.activitys.login.PhoneLoginActivity;
38
+import com.kuxuan.moneynote.ui.adapter.SkinAdapter;
34 39
 import com.kuxuan.moneynote.ui.weight.ScoreDialog;
35 40
 import com.kuxuan.moneynote.utils.DisplayUtil;
36 41
 import com.kuxuan.moneynote.utils.JavaFormatUtils;
37 42
 import com.kuxuan.moneynote.utils.NetWorkUtil;
43
+import com.kuxuan.moneynote.utils.SPUtil;
38 44
 import com.kuxuan.moneynote.utils.TextSetUtil;
39 45
 import com.kuxuan.moneynote.utils.TimeUtlis;
40 46
 import com.kuxuan.moneynote.utils.UIHelper;
@@ -44,6 +50,9 @@ import org.greenrobot.eventbus.EventBus;
44 50
 import org.greenrobot.eventbus.Subscribe;
45 51
 import org.greenrobot.eventbus.ThreadMode;
46 52
 
53
+import java.util.ArrayList;
54
+import java.util.List;
55
+
47 56
 import butterknife.Bind;
48 57
 import butterknife.OnClick;
49 58
 
@@ -97,6 +106,7 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
97 106
         mPresenter.initRefreshLayout(getActivity(), refreshLayout);
98 107
         mPresenter.initListener(fragmentDetialYear);
99 108
         mPresenter.initListener(fragmentDetialMonth);
109
+        mPresenter.InitPopWindow();
100 110
         initMiluView();
101 111
         checkNet();
102 112
         nologin_layout.setOnClickListener(new View.OnClickListener() {
@@ -288,10 +298,14 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
288 298
         startActivity(intent);
289 299
     }
290 300
 
301
+
302
+    SkinBean skinBean;
303
+
291 304
     @Override
292 305
     public void showSkinData(SkinBean skinBean) {
293 306
 
294 307
 
308
+        this.skinBean = skinBean;
295 309
 
296 310
     }
297 311
 
@@ -313,7 +327,7 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
313 327
         checkNet();
314 328
     }
315 329
 
316
-
330
+    BaseQuickAdapter adapter;
317 331
 
318 332
 
319 333
     @OnClick(R.id.iv_skinicon)
@@ -322,6 +336,7 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
322 336
         showPopWindow();
323 337
 
324 338
     }
339
+    ProgressBar progressBar;
325 340
     PopupWindow popupWindow;
326 341
     private void showPopWindow() {
327 342
 
@@ -342,14 +357,52 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
342 357
          // 第三和第四个参数分别是PopupWindow相对父View的x、y偏移
343 358
         popupWindow.showAtLocation(relativeLayout, Gravity.BOTTOM,0,0);
344 359
 
345
-
346
-        RecyclerView recyclerView = contentView.findViewById(R.id.recyclerview);
347
-
360
+        final RecyclerView recyclerView = contentView.findViewById(R.id.recyclerview);
348 361
         LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
349 362
         linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
350 363
         recyclerView.setLayoutManager(linearLayoutManager);
351
-//        recyclerView.setAdapter(new SkinAdapter());
364
+        adapter = new SkinAdapter(R.layout.skinadapter_item);
365
+        recyclerView.setAdapter(adapter);
352 366
 
367
+        adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
368
+            @Override
369
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
370
+
371
+                ImageView iv_check = view.findViewById(R.id.iv_check);
372
+                if(iv_check.getVisibility()==View.VISIBLE){
373
+                    return;
374
+                }
375
+
376
+                View background = view.findViewById(R.id.view);
377
+
378
+                if(background.getVisibility()==View.VISIBLE){
379
+
380
+                    progressBar  = view.findViewById(R.id.progressbar);
381
+                    if(progressBar.getVisibility()==View.GONE){
382
+                        progressBar.setVisibility(View.VISIBLE);
383
+                    }
384
+                    progressBar.setMax(1000);
385
+                    for (int i=0;i<1000;i++){
386
+                        progressBar.setProgress(i);
387
+                    }
388
+//                    progressBar.setVisibility(View.GONE);
389
+                    background.setVisibility(View.GONE);
390
+                }else {
391
+                    SPUtil.putAndApply(getContext(), Constant.Skin.CHECKED,position);
392
+                    adapter.notifyDataSetChanged();
393
+                    SkinBean  mskinBean = new SkinBean();
394
+                    mskinBean.setCode(position);
395
+                    EventBus.getDefault().post(mskinBean);
396
+                }
397
+
398
+
399
+
400
+
401
+            }
402
+        });
403
+
404
+
405
+        setSkinData();
353 406
 
354 407
        ImageView ivpop_close = contentView.findViewById(R.id.ivpop_close);
355 408
 
@@ -359,8 +412,22 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
359 412
                popupWindow.dismiss();
360 413
            }
361 414
        });
362
-       mPresenter.InitPopWindow();
363 415
 
416
+
417
+    }
418
+    List<RES> resList;
419
+    private void setSkinData() {
420
+
421
+        resList = new ArrayList<>();
422
+        resList.add(new RES());
423
+        resList.add(new RES());
424
+        resList.add(new RES());
425
+        resList.add(new RES());
426
+        resList.add(new RES());
427
+        resList.add(new RES());
428
+        adapter.setNewData(resList);
429
+
430
+//        adapter.setNewData(skinBean.getRes());
364 431
     }
365 432
 
366 433
 

+ 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

@@ -20,6 +20,7 @@
20 20
         <com.zhy.autolayout.AutoRelativeLayout
21 21
             android:layout_width="match_parent"
22 22
             android:layout_height="wrap_content"
23
+            android:layout_marginTop="23px"
23 24
             >
24 25
 
25 26
             <ImageView

+ 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_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>