4 次代碼提交 f4e4e4a976 ... dcc3bf4968

作者 SHA1 備註 提交日期
  e dcc3bf4968 换肤 6 年之前
  e 774e03c75c Merge branch 'MoneyNote3.0' of http://git.quyaqu.com/xieshengqi/MoneyMoreMoreNote into MoneyNote3.0 6 年之前
  e 77438d418a Merge branch 'MoneyNote3.0' of http://git.quyaqu.com/xieshengqi/MoneyMoreMoreNote into MoneyNote3.0 6 年之前
  e f20964d7dc 改图片 6 年之前
共有 40 個文件被更改,包括 508 次插入33 次删除
  1. 6 0
      app/build.gradle
  2. 9 2
      app/src/main/java/com/kuxuan/moneynote/api/ApiService.java
  3. 26 0
      app/src/main/java/com/kuxuan/moneynote/base/BaseFragmentActivity.java
  4. 51 0
      app/src/main/java/com/kuxuan/moneynote/json/netbody/RES.java
  5. 54 0
      app/src/main/java/com/kuxuan/moneynote/json/netbody/SkinBean.java
  6. 1 1
      app/src/main/java/com/kuxuan/moneynote/ui/activitys/category/CategoryModel.java
  7. 36 0
      app/src/main/java/com/kuxuan/moneynote/ui/adapter/SkinAdapter.java
  8. 9 0
      app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialContract.java
  9. 73 4
      app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialFragment.java
  10. 31 0
      app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialModel.java
  11. 23 0
      app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialPresent.java
  12. 1 0
      app/src/main/java/com/kuxuan/moneynote/ui/fragments/mine/MineFragment.java
  13. 21 1
      app/src/main/java/com/kuxuan/moneynote/ui/weight/NavigationLayout.java
  14. 二進制
      app/src/main/res/drawable-xhdpi/bottom_chart_normal.png
  15. 二進制
      app/src/main/res/drawable-xhdpi/bottom_detail_normal.png
  16. 二進制
      app/src/main/res/drawable-xhdpi/bottom_find_normal.png
  17. 二進制
      app/src/main/res/drawable-xhdpi/bottom_me_normal.png
  18. 二進制
      app/src/main/res/drawable-xhdpi/home_background.png
  19. 二進制
      app/src/main/res/drawable-xhdpi/homeskin_add.png
  20. 二進制
      app/src/main/res/drawable-xhdpi/icon_search.png
  21. 二進制
      app/src/main/res/drawable-xhdpi/icon_skin.png
  22. 二進制
      app/src/main/res/drawable-xhdpi/mine_skin.png
  23. 二進制
      app/src/main/res/drawable-xhdpi/popskin_close.png
  24. 二進制
      app/src/main/res/drawable-xxhdpi/bottom_chart_normal.png
  25. 二進制
      app/src/main/res/drawable-xxhdpi/bottom_detail_normal.png
  26. 二進制
      app/src/main/res/drawable-xxhdpi/bottom_find_normal.png
  27. 二進制
      app/src/main/res/drawable-xxhdpi/bottom_me_normal.png
  28. 二進制
      app/src/main/res/drawable-xxhdpi/home_background.png
  29. 二進制
      app/src/main/res/drawable-xxhdpi/homeskin_add.png
  30. 二進制
      app/src/main/res/drawable-xxhdpi/icon_search.png
  31. 二進制
      app/src/main/res/drawable-xxhdpi/icon_skin.png
  32. 二進制
      app/src/main/res/drawable-xxhdpi/mine_skin.png
  33. 二進制
      app/src/main/res/drawable-xxhdpi/popskin_close.png
  34. 2 1
      app/src/main/res/layout/activity_main.xml
  35. 44 19
      app/src/main/res/layout/fragment_detial.xml
  36. 1 1
      app/src/main/res/layout/fragment_mine.xml
  37. 51 0
      app/src/main/res/layout/homeskin_popwindow.xml
  38. 45 4
      app/src/main/res/layout/layout_navigation.xml
  39. 18 0
      app/src/main/res/layout/skinadapter_item.xml
  40. 6 0
      app/src/main/res/values/colors.xml

+ 6 - 0
app/build.gradle

@@ -92,6 +92,12 @@ android {
92 92
         }
93 93
 
94 94
 
95
+        atext{
96
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2000"]
97
+            buildConfigField 'String', 'CHANNLE', '"2000"'
98
+        }
99
+
100
+
95 101
     }
96 102
 }
97 103
 

+ 9 - 2
app/src/main/java/com/kuxuan/moneynote/api/ApiService.java

@@ -15,7 +15,6 @@ import com.kuxuan.moneynote.json.NewChartData;
15 15
 import com.kuxuan.moneynote.json.UploadBeanJson;
16 16
 import com.kuxuan.moneynote.json.UserAllBillJson;
17 17
 import com.kuxuan.moneynote.json.UserJson;
18
-import com.kuxuan.moneynote.json.netbody.AllCategoryBody;
19 18
 import com.kuxuan.moneynote.json.netbody.BillBody;
20 19
 import com.kuxuan.moneynote.json.netbody.CategoryBody;
21 20
 import com.kuxuan.moneynote.json.netbody.ChartBody;
@@ -28,6 +27,7 @@ import com.kuxuan.moneynote.json.netbody.MessageBody;
28 27
 import com.kuxuan.moneynote.json.netbody.NewChartBody;
29 28
 import com.kuxuan.moneynote.json.netbody.PersonBody;
30 29
 import com.kuxuan.moneynote.json.netbody.RegisterBody;
30
+import com.kuxuan.moneynote.json.netbody.SkinBean;
31 31
 import com.kuxuan.moneynote.json.netbody.UpDataBody;
32 32
 import com.kuxuan.moneynote.json.netbody.UserAllBillBody;
33 33
 import com.kuxuan.moneynote.json.netbody.WeChatJson;
@@ -198,12 +198,19 @@ public interface ApiService {
198 198
     /**
199 199
      * 获取全部类别
200 200
      *
201
-     * @param allCategoryBody 所有类别实体类
201
+     * @param type 所有类别实体类
202 202
      * @return object
203 203
      */
204 204
     @GET("allcategorys")
205 205
     Observable<BaseJson<CategoryJson>> getCategoryData(@Query("type") String type);
206 206
 
207
+
208
+
209
+    @POST("getSkin")
210
+    Observable<SkinBean> getSkinData();
211
+
212
+
213
+
207 214
     /**
208 215
      * 移除记账类别
209 216
      *

+ 26 - 0
app/src/main/java/com/kuxuan/moneynote/base/BaseFragmentActivity.java

@@ -8,6 +8,8 @@ import android.os.Build;
8 8
 import android.os.Bundle;
9 9
 import android.view.LayoutInflater;
10 10
 import android.view.View;
11
+import android.view.Window;
12
+import android.view.WindowManager;
11 13
 
12 14
 import com.kuxuan.moneynote.R;
13 15
 import com.kuxuan.moneynote.utils.StatusBarUtil;
@@ -44,6 +46,12 @@ public abstract class BaseFragmentActivity extends MyAutoActivity {
44 46
             StatusBarUtil_One.translucentStatusBar(this);
45 47
             StatusBarUtil.StatusBarLightMode(this);
46 48
         }
49
+
50
+//        initWidows();
51
+
52
+
53
+
54
+
47 55
 //        AppManager.getAppManager().addActivity(this);
48 56
      //   mInstance = this;
49 57
 //        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
@@ -102,6 +110,24 @@ public abstract class BaseFragmentActivity extends MyAutoActivity {
102 110
         }
103 111
     }
104 112
 
113
+    /**
114
+     * 初始化窗口
115
+     */
116
+    protected void initWidows() {
117
+        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
118
+            Window window = getWindow();
119
+            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
120
+                    | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
121
+            window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
122
+                    | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
123
+                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
124
+            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
125
+            window.setStatusBarColor(Color.TRANSPARENT);
126
+            window.setNavigationBarColor(Color.TRANSPARENT);
127
+        }
128
+        StatusBarUtil.StatusBarLightMode(this);
129
+    }
130
+
105 131
     public int getStatusBarHeight(Context context) {
106 132
         int result = 0;
107 133
         int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen",

+ 51 - 0
app/src/main/java/com/kuxuan/moneynote/json/netbody/RES.java

@@ -0,0 +1,51 @@
1
+package com.kuxuan.moneynote.json.netbody;
2
+
3
+/**
4
+ * Created by Allence on 2018/4/25 0025.
5
+ */
6
+
7
+public class RES {
8
+
9
+    //        {
10
+    //               "banner": "http://adminsuishouji.oss-cn-beijing.aliyuncs.com/Uploads/20171228/1514446901392766.png",
11
+    //                "color": "0x578FFA ",
12
+    //                "mine_banner": "http://adminsuishouji.oss-cn-beijing.aliyuncs.com/Uploads/20171227/1514346854943974.png",
13
+    //                "preview_img": "http://adminsuishouji.oss-cn-beijing.aliyuncs.com/Uploads/20171228/1514448652986807.png"
14
+    //        }
15
+    String banner;
16
+    String color;
17
+    String mine_banner;
18
+    String preview_img;
19
+
20
+    public String getBanner() {
21
+        return banner;
22
+    }
23
+
24
+    public void setBanner(String banner) {
25
+        this.banner = banner;
26
+    }
27
+
28
+    public String getColor() {
29
+        return color;
30
+    }
31
+
32
+    public void setColor(String color) {
33
+        this.color = color;
34
+    }
35
+
36
+    public String getMine_banner() {
37
+        return mine_banner;
38
+    }
39
+
40
+    public void setMine_banner(String mine_banner) {
41
+        this.mine_banner = mine_banner;
42
+    }
43
+
44
+    public String getPreview_img() {
45
+        return preview_img;
46
+    }
47
+
48
+    public void setPreview_img(String preview_img) {
49
+        this.preview_img = preview_img;
50
+    }
51
+}

+ 54 - 0
app/src/main/java/com/kuxuan/moneynote/json/netbody/SkinBean.java

@@ -0,0 +1,54 @@
1
+package com.kuxuan.moneynote.json.netbody;
2
+
3
+import java.util.List;
4
+
5
+/**
6
+ * Created by Allence on 2018/4/25 0025.
7
+ */
8
+
9
+public class SkinBean {
10
+
11
+//    {
12
+//        "res": [
13
+//        {
14
+//               "banner": "http://adminsuishouji.oss-cn-beijing.aliyuncs.com/Uploads/20171228/1514446901392766.png",
15
+//                "color": "0x578FFA ",
16
+//                "mine_banner": "http://adminsuishouji.oss-cn-beijing.aliyuncs.com/Uploads/20171227/1514346854943974.png",
17
+//                "preview_img": "http://adminsuishouji.oss-cn-beijing.aliyuncs.com/Uploads/20171228/1514448652986807.png"
18
+//        }
19
+//    ],
20
+//        "message": [
21
+//        "成功"
22
+//    ],
23
+//        "code": 0
24
+//    }
25
+
26
+    List<String> message;
27
+    int code;
28
+    List<RES> res;
29
+
30
+
31
+    public List<String> getMessage() {
32
+        return message;
33
+    }
34
+
35
+    public void setMessage(List<String> message) {
36
+        this.message = message;
37
+    }
38
+
39
+    public int getCode() {
40
+        return code;
41
+    }
42
+
43
+    public void setCode(int code) {
44
+        this.code = code;
45
+    }
46
+
47
+    public List<RES> getRes() {
48
+        return res;
49
+    }
50
+
51
+    public void setRes(List<RES> res) {
52
+        this.res = res;
53
+    }
54
+}

+ 1 - 1
app/src/main/java/com/kuxuan/moneynote/ui/activitys/category/CategoryModel.java

@@ -121,7 +121,7 @@ public class CategoryModel implements CategoryContract.CategoryModel {
121 121
     }
122 122
 
123 123
     @Override
124
-    public void checkBillCategory(final MVPListener<Object> listMVPListener, final int type) {
124
+    public void checkBillCategory(final MVPListener<Boolean> listMVPListener, final int type) {
125 125
 //        RetrofitClient.getApiService().checkBillByCategoryId(category_id).subscribeOn(Schedulers.io())
126 126
 //                .observeOn(AndroidSchedulers.mainThread())
127 127
 //                .subscribe(new MyObsever<BaseJson<Object>>() {

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

@@ -0,0 +1,36 @@
1
+package com.kuxuan.moneynote.ui.adapter;
2
+
3
+import android.support.annotation.Nullable;
4
+
5
+import com.chad.library.adapter.base.BaseQuickAdapter;
6
+import com.chad.library.adapter.base.BaseViewHolder;
7
+import com.kuxuan.moneynote.json.netbody.RES;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * Created by Allence on 2018/4/25 0025.
13
+ */
14
+
15
+public class SkinAdapter extends BaseQuickAdapter<RES,BaseViewHolder> {
16
+
17
+    public SkinAdapter(int layoutResId, @Nullable List<RES> data) {
18
+        super(layoutResId, data);
19
+    }
20
+
21
+    public SkinAdapter(@Nullable List<RES> data) {
22
+        super(data);
23
+    }
24
+
25
+    public SkinAdapter(int layoutResId) {
26
+        super(layoutResId);
27
+    }
28
+
29
+    @Override
30
+    protected void convert(BaseViewHolder helper, RES item) {
31
+
32
+
33
+
34
+
35
+    }
36
+}

+ 9 - 0
app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialContract.java

@@ -9,6 +9,7 @@ import com.kuxuan.moneynote.base.mvpbase.BasePresent;
9 9
 import com.kuxuan.moneynote.base.mvpbase.BaseView;
10 10
 import com.kuxuan.moneynote.json.TypeDataJson;
11 11
 import com.kuxuan.moneynote.json.UserAllBillJson;
12
+import com.kuxuan.moneynote.json.netbody.SkinBean;
12 13
 import com.kuxuan.moneynote.listener.MVPListener;
13 14
 import com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout;
14 15
 
@@ -57,6 +58,9 @@ public interface DetialContract {
57 58
 
58 59
 
59 60
         void goToEdit(TypeDataJson dayDataEntity);
61
+
62
+        void showSkinData(SkinBean skinBean);
63
+
60 64
     }
61 65
 
62 66
 
@@ -65,6 +69,8 @@ public interface DetialContract {
65 69
         void getDataLists(String year, String month, MVPListener<UserAllBillJson> listMVPListener);
66 70
 
67 71
 
72
+        void getPopWindowData(MVPListener<SkinBean> listMvpListener);
73
+
68 74
         void getDataListsForDB(String year, String month, HashMap<String,Integer> maps,MVPListener<UserAllBillJson> listMVPListener);
69 75
 
70 76
     }
@@ -84,6 +90,9 @@ public interface DetialContract {
84 90
 
85 91
         abstract void  loginCheck();
86 92
 
93
+
94
+        abstract void InitPopWindow();
95
+
87 96
     }
88 97
 
89 98
 }

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

@@ -1,12 +1,19 @@
1 1
 package com.kuxuan.moneynote.ui.fragments.details;
2 2
 
3 3
 import android.content.Intent;
4
+import android.graphics.Color;
5
+import android.graphics.drawable.ColorDrawable;
4 6
 import android.os.Bundle;
5 7
 import android.provider.Settings;
8
+import android.support.v7.widget.LinearLayoutManager;
6 9
 import android.support.v7.widget.RecyclerView;
10
+import android.view.Gravity;
11
+import android.view.LayoutInflater;
7 12
 import android.view.View;
8 13
 import android.widget.ImageView;
9 14
 import android.widget.LinearLayout;
15
+import android.widget.PopupWindow;
16
+import android.widget.RelativeLayout;
10 17
 import android.widget.TextView;
11 18
 
12 19
 import com.bumptech.glide.Glide;
@@ -16,6 +23,7 @@ import com.kuxuan.moneynote.base.BaseFragmentActivity;
16 23
 import com.kuxuan.moneynote.base.mvpbase.MVPFragment;
17 24
 import com.kuxuan.moneynote.json.TimeJson;
18 25
 import com.kuxuan.moneynote.json.TypeDataJson;
26
+import com.kuxuan.moneynote.json.netbody.SkinBean;
19 27
 import com.kuxuan.moneynote.ui.activitys.edit.EditBillActivity;
20 28
 import com.kuxuan.moneynote.ui.activitys.eventbus.LoginEvent;
21 29
 import com.kuxuan.moneynote.ui.activitys.eventbus.LoginOutEvent;
@@ -24,6 +32,7 @@ import com.kuxuan.moneynote.ui.activitys.eventbus.RefreshEvent;
24 32
 import com.kuxuan.moneynote.ui.activitys.login.LoginActivity;
25 33
 import com.kuxuan.moneynote.ui.activitys.login.PhoneLoginActivity;
26 34
 import com.kuxuan.moneynote.ui.weight.ScoreDialog;
35
+import com.kuxuan.moneynote.utils.DisplayUtil;
27 36
 import com.kuxuan.moneynote.utils.JavaFormatUtils;
28 37
 import com.kuxuan.moneynote.utils.NetWorkUtil;
29 38
 import com.kuxuan.moneynote.utils.TextSetUtil;
@@ -36,6 +45,7 @@ import org.greenrobot.eventbus.Subscribe;
36 45
 import org.greenrobot.eventbus.ThreadMode;
37 46
 
38 47
 import butterknife.Bind;
48
+import butterknife.OnClick;
39 49
 
40 50
 /**
41 51
  * 首页-明细
@@ -62,6 +72,9 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
62 72
     @Bind(R.id.empty_view)
63 73
     LinearLayout noData_layout;
64 74
 
75
+    @Bind(R.id.relativelayout)
76
+    RelativeLayout relativeLayout;
77
+
65 78
     //无网络和无登录时候的布局
66 79
     @Bind(R.id.layout_nologinornet_layout)
67 80
     LinearLayout nologin_layout;
@@ -74,8 +87,10 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
74 87
     @Override
75 88
     public void initView() {
76 89
         EventBus.getDefault().register(this);
77
-        getTitleView(0).setTitle(getString(R.string.app_name));
90
+//        getTitleView(0).setTitle(getString(R.string.app_name));
78 91
 //        getTitleView(0).setTitle("钱多随手记账");
92
+
93
+
79 94
         activity = (BaseFragmentActivity) getActivity();
80 95
         initTime();
81 96
         mPresenter.initRecyclerView(getActivity(), mRecyclerView);
@@ -264,8 +279,6 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
264 279
         TextSetUtil.setTextForMonth(currentTime.getMonth() + "", fragmentDetialMonth);
265 280
         TextSetUtil.setTextForMoey("0.00", fragmentDetialMoneyin);
266 281
         TextSetUtil.setTextForMoey("0.00", fragmentDetialMoneyout);
267
-
268
-
269 282
     }
270 283
 
271 284
     @Override
@@ -275,12 +288,18 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
275 288
         startActivity(intent);
276 289
     }
277 290
 
291
+    @Override
292
+    public void showSkinData(SkinBean skinBean) {
293
+
294
+
295
+
296
+    }
297
+
278 298
 
279 299
     @Subscribe(threadMode = ThreadMode.MAIN)
280 300
     public void onMessageEvent(RefreshEvent event) {
281 301
         mPresenter.getDataLists(mPresenter.getCurrentYear() + "", mPresenter.getCurrentMonth() + "");
282 302
 //      mPresenter.loginCheck();
283
-
284 303
     }
285 304
 
286 305
     /**
@@ -295,6 +314,56 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
295 314
     }
296 315
 
297 316
 
317
+
318
+
319
+    @OnClick(R.id.iv_skinicon)
320
+    public void click(){
321
+
322
+        showPopWindow();
323
+
324
+    }
325
+    PopupWindow popupWindow;
326
+    private void showPopWindow() {
327
+
328
+
329
+        View contentView= LayoutInflater.from(getContext()).inflate(R.layout.homeskin_popwindow, null, false);
330
+
331
+        popupWindow = new PopupWindow(contentView, LinearLayout.LayoutParams.MATCH_PARENT, DisplayUtil.dip2px(138),true);
332
+        popupWindow.setBackgroundDrawable(new ColorDrawable(Color.WHITE));
333
+        // 设置PopupWindow是否能响应外部点击事件
334
+        popupWindow.setOutsideTouchable(true);
335
+         // 设置PopupWindow是否能响应点击事件
336
+        popupWindow.setTouchable(true);
337
+         // 显示PopupWindow,其中:
338
+         // 第一个参数是PopupWindow的锚点,第二和第三个参数分别是PopupWindow相对锚点的x、y偏移
339
+//        popupWindow.showAsDropDown(anchor, xoff, yoff);
340
+         // 或者也可以调用此方法显示PopupWindow,其中:
341
+         // 第一个参数是PopupWindow的父View,第二个参数是PopupWindow相对父View的位置,
342
+         // 第三和第四个参数分别是PopupWindow相对父View的x、y偏移
343
+        popupWindow.showAtLocation(relativeLayout, Gravity.BOTTOM,0,0);
344
+
345
+
346
+        RecyclerView recyclerView = contentView.findViewById(R.id.recyclerview);
347
+
348
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
349
+        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
350
+        recyclerView.setLayoutManager(linearLayoutManager);
351
+//        recyclerView.setAdapter(new SkinAdapter());
352
+
353
+
354
+       ImageView ivpop_close = contentView.findViewById(R.id.ivpop_close);
355
+
356
+       ivpop_close.setOnClickListener(new View.OnClickListener() {
357
+           @Override
358
+           public void onClick(View v) {
359
+               popupWindow.dismiss();
360
+           }
361
+       });
362
+       mPresenter.InitPopWindow();
363
+
364
+    }
365
+
366
+
298 367
     /**
299 368
      * 登出刷新数据
300 369
      */

+ 31 - 0
app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialModel.java

@@ -6,6 +6,7 @@ import com.kuxuan.moneynote.api.RetrofitClient;
6 6
 import com.kuxuan.moneynote.common.Constant;
7 7
 import com.kuxuan.moneynote.json.BaseJson;
8 8
 import com.kuxuan.moneynote.json.UserAllBillJson;
9
+import com.kuxuan.moneynote.json.netbody.SkinBean;
9 10
 import com.kuxuan.moneynote.json.netbody.UserAllBillBody;
10 11
 import com.kuxuan.moneynote.listener.MVPListener;
11 12
 
@@ -45,6 +46,36 @@ public class DetialModel implements DetialContract.DetialModel {
45 46
     }
46 47
 
47 48
     @Override
49
+    public void getPopWindowData(final MVPListener<SkinBean> listMvpListener) {
50
+
51
+        RetrofitClient.getApiService().getSkinData().subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new MyObsever<SkinBean>() {
52
+            @Override
53
+            public void onError(ExceptionHandle.ResponeThrowable e) {
54
+
55
+
56
+
57
+            }
58
+
59
+            @Override
60
+            public void onSuccess(SkinBean skinBean) {
61
+
62
+                int code = skinBean.getCode();
63
+
64
+                if(code == 0){
65
+                    listMvpListener.onSuccess(skinBean);
66
+                }else {
67
+                    listMvpListener.onFail(skinBean.getMessage().get(0));
68
+                }
69
+
70
+
71
+
72
+            }
73
+        });
74
+
75
+
76
+    }
77
+
78
+    @Override
48 79
     public void getDataListsForDB(final String year, final String month, final HashMap<String, Integer> maps, final MVPListener<UserAllBillJson> listMVPListener) {
49 80
         io.reactivex.Observable.create(new ObservableOnSubscribe<UserAllBillJson>() {
50 81
             @Override

+ 23 - 0
app/src/main/java/com/kuxuan/moneynote/ui/fragments/details/DetialPresent.java

@@ -15,6 +15,7 @@ import com.kuxuan.moneynote.json.TimeJson;
15 15
 import com.kuxuan.moneynote.json.TypeDataJson;
16 16
 import com.kuxuan.moneynote.json.UserAllBillJson;
17 17
 import com.kuxuan.moneynote.json.YearData;
18
+import com.kuxuan.moneynote.json.netbody.SkinBean;
18 19
 import com.kuxuan.moneynote.listener.MVPListener;
19 20
 import com.kuxuan.moneynote.ui.adapter.DetialAdapter;
20 21
 import com.kuxuan.moneynote.ui.weight.KuxuanLoadMoreView;
@@ -328,6 +329,28 @@ public class DetialPresent extends DetialContract.DetialPresent implements View.
328 329
         view.getDataFirst();
329 330
     }
330 331
 
332
+    @Override
333
+    void InitPopWindow() {
334
+
335
+        mModel.getPopWindowData(new MVPListener<SkinBean>() {
336
+            @Override
337
+            public void onSuccess(SkinBean content) {
338
+
339
+                view.showSkinData(content);
340
+
341
+            }
342
+
343
+            @Override
344
+            public void onFail(String msg) {
345
+
346
+
347
+
348
+            }
349
+        });
350
+
351
+
352
+    }
353
+
331 354
 
332 355
     @Override
333 356
     public void onClick(View view) {

+ 1 - 0
app/src/main/java/com/kuxuan/moneynote/ui/fragments/mine/MineFragment.java

@@ -431,6 +431,7 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
431 431
             }
432 432
 //刷新账单
433 433
             setBillData();
434
+
434 435
         }
435 436
     }
436 437
 

+ 21 - 1
app/src/main/java/com/kuxuan/moneynote/ui/weight/NavigationLayout.java

@@ -14,6 +14,8 @@ import android.widget.TextView;
14 14
 import com.kuxuan.moneynote.R;
15 15
 import com.kuxuan.moneynote.ui.activitys.home.DataGenerator;
16 16
 
17
+import de.hdodenhof.circleimageview.CircleImageView;
18
+
17 19
 /**
18 20
  * Created by xieshengqi on 2017/10/18.
19 21
  */
@@ -25,7 +27,10 @@ public class NavigationLayout extends FrameLayout implements View.OnClickListene
25 27
     private ImageView mingxi_img, baobiao_img, faxian_img, user_img;
26 28
     private TextView mingxi_text, baobiao_text, faxian_text, user_text;
27 29
 
30
+    private CircleImageView CI_detail,CI_chart,CI_find,CI_me;
31
+
28 32
     private ImageView[] img = {mingxi_img,baobiao_img,faxian_img,user_img};
33
+    private CircleImageView[] CI_imgarr = {CI_detail,CI_chart,CI_find,CI_me};
29 34
     private TextView[] text = {mingxi_text,baobiao_text,faxian_text,user_text};
30 35
     private int currentPosition = 0;
31 36
 
@@ -56,18 +61,24 @@ public class NavigationLayout extends FrameLayout implements View.OnClickListene
56 61
         mingxi_frame = view.findViewById(R.id.layout_mingxi);
57 62
         img[0] = view.findViewById(R.id.tab_mingxi_img);
58 63
         mingxi_text = view.findViewById(R.id.tab_mingxi_text);
64
+        CI_imgarr[0] = view.findViewById(R.id.CI_detail);
65
+
66
+
59 67
 
60 68
         baobiao_frame = view.findViewById(R.id.layout_baobiao);
61 69
         img[1] = view.findViewById(R.id.tab_baobiao_img);
62 70
         baobiao_text = view.findViewById(R.id.tab_baobiao_text);
71
+        CI_imgarr[1] = view.findViewById(R.id.CI_chart);
63 72
 
64 73
         faxian_frame = view.findViewById(R.id.layout_faxian);
65 74
         img[2] = view.findViewById(R.id.tab_faxian_img);
66 75
         faxian_text = view.findViewById(R.id.tab_faxian_text);
76
+        CI_imgarr[2] = view.findViewById(R.id.CI_find);
67 77
 
68 78
         user_frame = view.findViewById(R.id.layout_user);
69 79
         img[3] = view.findViewById(R.id.tab_user_img);
70 80
         user_text = view.findViewById(R.id.tab_user_text);
81
+        CI_imgarr[3] = view.findViewById(R.id.CI_me);
71 82
 
72 83
         center_frame = view.findViewById(R.id.layout_center);
73 84
 
@@ -92,7 +103,6 @@ public class NavigationLayout extends FrameLayout implements View.OnClickListene
92 103
                 break;
93 104
             case R.id.layout_baobiao:
94 105
                 initialization(1);
95
-
96 106
                 break;
97 107
             case R.id.layout_faxian:
98 108
                 initialization(2);
@@ -128,6 +138,12 @@ public class NavigationLayout extends FrameLayout implements View.OnClickListene
128 138
         img[2].setSelected(false);
129 139
         user_text.setSelected(false);
130 140
         img[3].setSelected(false);
141
+
142
+        CI_imgarr[0].setImageResource(0);
143
+        CI_imgarr[1].setImageResource(0);
144
+        CI_imgarr[2].setImageResource(0);
145
+        CI_imgarr[3].setImageResource(0);
146
+
131 147
         selectPosition(position);
132 148
 //        replace(position);
133 149
     }
@@ -138,18 +154,22 @@ public class NavigationLayout extends FrameLayout implements View.OnClickListene
138 154
             case 0:
139 155
                 img[0].setSelected(true);
140 156
                 mingxi_text.setSelected(true);
157
+                CI_imgarr[0].setImageResource(R.color.hometab_skin);
141 158
                 break;
142 159
             case 1:
143 160
                 baobiao_text.setSelected(true);
144 161
                 img[1].setSelected(true);
162
+                CI_imgarr[1].setImageResource(R.color.hometab_skin);
145 163
                 break;
146 164
             case 2:
147 165
                 faxian_text.setSelected(true);
148 166
                 img[2].setSelected(true);
167
+                CI_imgarr[2].setImageResource(R.color.hometab_skin);
149 168
                 break;
150 169
             case 3:
151 170
                 user_text.setSelected(true);
152 171
                 img[3].setSelected(true);
172
+                CI_imgarr[3].setImageResource(R.color.hometab_skin);
153 173
                 break;
154 174
         }
155 175
         if(listener!=null) {

二進制
app/src/main/res/drawable-xhdpi/bottom_chart_normal.png


二進制
app/src/main/res/drawable-xhdpi/bottom_detail_normal.png


二進制
app/src/main/res/drawable-xhdpi/bottom_find_normal.png


二進制
app/src/main/res/drawable-xhdpi/bottom_me_normal.png


二進制
app/src/main/res/drawable-xhdpi/home_background.png


二進制
app/src/main/res/drawable-xhdpi/homeskin_add.png


二進制
app/src/main/res/drawable-xhdpi/icon_search.png


二進制
app/src/main/res/drawable-xhdpi/icon_skin.png


二進制
app/src/main/res/drawable-xhdpi/mine_skin.png


二進制
app/src/main/res/drawable-xhdpi/popskin_close.png


二進制
app/src/main/res/drawable-xxhdpi/bottom_chart_normal.png


二進制
app/src/main/res/drawable-xxhdpi/bottom_detail_normal.png


二進制
app/src/main/res/drawable-xxhdpi/bottom_find_normal.png


二進制
app/src/main/res/drawable-xxhdpi/bottom_me_normal.png


二進制
app/src/main/res/drawable-xxhdpi/home_background.png


二進制
app/src/main/res/drawable-xxhdpi/homeskin_add.png


二進制
app/src/main/res/drawable-xxhdpi/icon_search.png


二進制
app/src/main/res/drawable-xxhdpi/icon_skin.png


二進制
app/src/main/res/drawable-xxhdpi/mine_skin.png


二進制
app/src/main/res/drawable-xxhdpi/popskin_close.png


+ 2 - 1
app/src/main/res/layout/activity_main.xml

@@ -2,7 +2,8 @@
2 2
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
     android:layout_width="match_parent"
4 4
     android:clipChildren="false"
5
-    android:layout_height="match_parent">
5
+    android:layout_height="match_parent"
6
+    >
6 7
 
7 8
 
8 9
     <FrameLayout

+ 44 - 19
app/src/main/res/layout/fragment_detial.xml

@@ -1,25 +1,49 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
+<com.zhy.autolayout.AutoLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
     xmlns:app="http://schemas.android.com/apk/res-auto"
4 4
     android:layout_width="match_parent"
5 5
     android:layout_height="match_parent"
6 6
     android:background="@color/bg_gray"
7 7
     android:orientation="vertical">
8 8
 
9
-    <include layout="@layout/layout_head_simple_first" />
9
+    <!--<include layout="@layout/layout_head_simple_first" />-->
10 10
 
11
-    <LinearLayout
11
+    <com.zhy.autolayout.AutoLinearLayout
12
+        android:id="@+id/lin_homeskin"
12 13
         android:layout_width="match_parent"
13
-        android:layout_height="wrap_content"
14
-        android:background="@color/bg_title_gray"
14
+        android:layout_height="197px"
15
+        android:background="@drawable/home_background"
15 16
         android:orientation="vertical"
16
-        android:paddingBottom="5dp"
17
-        android:paddingLeft="10dp"
18
-        android:paddingRight="10dp"
19
-        android:paddingTop="5dp">
17
+        >
20 18
 
21 19
 
22
-        <LinearLayout
20
+        <com.zhy.autolayout.AutoRelativeLayout
21
+            android:layout_width="match_parent"
22
+            android:layout_height="wrap_content"
23
+            >
24
+
25
+            <ImageView
26
+                android:id="@+id/iv_skinicon"
27
+                android:layout_width="wrap_content"
28
+                android:layout_height="wrap_content"
29
+                android:src="@drawable/icon_skin"
30
+                android:layout_alignParentRight="true"
31
+                android:layout_marginRight="10px"
32
+                />
33
+
34
+            <ImageView
35
+                android:layout_width="wrap_content"
36
+                android:layout_height="wrap_content"
37
+                android:src="@drawable/icon_search"
38
+                android:layout_toLeftOf="@+id/iv_skinicon"
39
+                android:layout_marginRight="14px"
40
+                />
41
+
42
+        </com.zhy.autolayout.AutoRelativeLayout>
43
+
44
+
45
+
46
+        <com.zhy.autolayout.AutoLinearLayout
23 47
             android:layout_width="match_parent"
24 48
             android:layout_height="wrap_content"
25 49
             android:orientation="horizontal">
@@ -47,15 +71,15 @@
47 71
                 android:text="支出"
48 72
                 android:textSize="@dimen/text_normal_size" />
49 73
 
50
-        </LinearLayout>
74
+        </com.zhy.autolayout.AutoLinearLayout>
51 75
 
52
-        <LinearLayout
76
+        <com.zhy.autolayout.AutoLinearLayout
53 77
             android:layout_width="match_parent"
54 78
             android:layout_height="30dp"
55 79
             android:layout_marginTop="5dp"
56 80
             android:orientation="horizontal">
57 81
 
58
-            <RelativeLayout
82
+            <com.zhy.autolayout.AutoRelativeLayout
59 83
                 android:layout_width="0dp"
60 84
                 android:layout_height="wrap_content"
61 85
                 android:layout_weight="1">
@@ -87,7 +111,7 @@
87 111
                     android:layout_marginLeft="10dp"
88 112
                     android:layout_toRightOf="@+id/image_xiala"
89 113
                     android:background="@android:color/black" />
90
-            </RelativeLayout>
114
+            </com.zhy.autolayout.AutoRelativeLayout>
91 115
 
92 116
             <TextView
93 117
                 android:id="@+id/fragment_detial_moneyin"
@@ -108,8 +132,8 @@
108 132
                 android:text="100.00" />
109 133
 
110 134
 
111
-        </LinearLayout>
112
-    </LinearLayout>
135
+        </com.zhy.autolayout.AutoLinearLayout>
136
+    </com.zhy.autolayout.AutoLinearLayout>
113 137
 
114 138
 
115 139
     <include
@@ -117,7 +141,8 @@
117 141
         android:visibility="gone" />
118 142
 
119 143
 
120
-    <RelativeLayout
144
+    <com.zhy.autolayout.AutoRelativeLayout
145
+        android:id="@+id/relativelayout"
121 146
         android:layout_width="match_parent"
122 147
         android:layout_height="match_parent">
123 148
 
@@ -165,6 +190,6 @@
165 190
             android:layout_alignParentBottom="true"
166 191
             android:layout_alignParentRight="true" />
167 192
 
168
-    </RelativeLayout>
193
+    </com.zhy.autolayout.AutoRelativeLayout>
169 194
 
170
-</LinearLayout>
195
+</com.zhy.autolayout.AutoLinearLayout>

+ 1 - 1
app/src/main/res/layout/fragment_mine.xml

@@ -16,7 +16,7 @@
16 16
             android:layout_height="wrap_content"
17 17
             android:layout_alignParentBottom="true"
18 18
             android:layout_alignParentEnd="true"
19
-            android:background="@color/bg_title_gray"
19
+            android:background="@drawable/mine_skin"
20 20
             android:gravity="center_horizontal"
21 21
             android:orientation="vertical"
22 22
             android:paddingBottom="@dimen/len_20"

+ 51 - 0
app/src/main/res/layout/homeskin_popwindow.xml

@@ -0,0 +1,51 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+                android:layout_width="match_parent"
4
+                android:layout_height="138px">
5
+
6
+
7
+    <TextView
8
+        android:id="@+id/tv_background"
9
+        android:layout_width="wrap_content"
10
+        android:layout_height="wrap_content"
11
+        android:text="背景图"
12
+        android:textSize="14px"
13
+        android:textColor="@color/textcolor"
14
+        android:layout_centerHorizontal="true"
15
+        android:layout_marginTop="14px"
16
+        />
17
+
18
+
19
+    <ImageView
20
+        android:id="@+id/ivpop_close"
21
+        android:layout_width="wrap_content"
22
+        android:layout_height="wrap_content"
23
+        android:src="@drawable/popskin_close"
24
+        android:layout_alignParentRight="true"
25
+        android:layout_marginRight="12px"
26
+        android:layout_marginTop="8px"
27
+        />
28
+
29
+    <ImageView
30
+        android:id="@+id/iv_add"
31
+        android:layout_width="80px"
32
+        android:layout_height="50px"
33
+        android:layout_below="@+id/tv_background"
34
+        android:layout_marginTop="30px"
35
+        android:layout_marginLeft="10px"
36
+        android:src="@drawable/homeskin_add"
37
+        />
38
+
39
+
40
+    <android.support.v7.widget.RecyclerView
41
+        android:id="@+id/recyclerview"
42
+        android:layout_width="match_parent"
43
+        android:layout_height="50px"
44
+        android:layout_alignTop="@+id/iv_add"
45
+        android:layout_toRightOf="@+id/iv_add"
46
+        android:layout_marginLeft="10px"
47
+        />
48
+
49
+
50
+
51
+</com.zhy.autolayout.AutoRelativeLayout>

+ 45 - 4
app/src/main/res/layout/layout_navigation.xml

@@ -29,13 +29,24 @@
29 29
             android:layout_height="48dp"
30 30
             android:layout_weight="1">
31 31
 
32
+
33
+            <de.hdodenhof.circleimageview.CircleImageView
34
+                android:id="@+id/CI_detail"
35
+                android:layout_width="15dp"
36
+                android:layout_height="15dp"
37
+                android:layout_marginTop="5dp"
38
+                android:layout_gravity="center|top"
39
+                android:layout_marginRight="2dp"
40
+                />
41
+
42
+
32 43
             <ImageView
33 44
                 android:id="@+id/tab_mingxi_img"
34 45
                 android:layout_width="wrap_content"
35 46
                 android:layout_height="wrap_content"
36 47
                 android:layout_gravity="top|center"
37 48
                 android:layout_marginTop="5dp"
38
-                android:src="@drawable/bottom_detail"/>
49
+                android:src="@drawable/bottom_detail_normal"/>
39 50
 
40 51
             <TextView
41 52
                 android:id="@+id/tab_mingxi_text"
@@ -54,13 +65,22 @@
54 65
             android:layout_marginRight="10dp"
55 66
             android:layout_weight="1">
56 67
 
68
+            <de.hdodenhof.circleimageview.CircleImageView
69
+                android:id="@+id/CI_chart"
70
+                android:layout_width="15dp"
71
+                android:layout_height="15dp"
72
+                android:layout_marginTop="5dp"
73
+                android:layout_gravity="center|top"
74
+                android:layout_marginRight="2dp"
75
+                />
76
+
57 77
             <ImageView
58 78
                 android:id="@+id/tab_baobiao_img"
59 79
                 android:layout_width="wrap_content"
60 80
                 android:layout_height="wrap_content"
61 81
                 android:layout_gravity="top|center"
62 82
                 android:layout_marginTop="5dp"
63
-                android:src="@drawable/bottom_chart"/>
83
+                android:src="@drawable/bottom_chart_normal"/>
64 84
 
65 85
             <TextView
66 86
                 android:id="@+id/tab_baobiao_text"
@@ -84,13 +104,24 @@
84 104
             android:layout_marginLeft="10dp"
85 105
             android:layout_weight="1">
86 106
 
107
+
108
+            <de.hdodenhof.circleimageview.CircleImageView
109
+                android:id="@+id/CI_find"
110
+                android:layout_width="15dp"
111
+                android:layout_height="15dp"
112
+                android:layout_marginTop="5dp"
113
+                android:layout_gravity="center|top"
114
+                android:layout_marginRight="2dp"
115
+                />
116
+
117
+
87 118
             <ImageView
88 119
                 android:id="@+id/tab_faxian_img"
89 120
                 android:layout_width="wrap_content"
90 121
                 android:layout_height="wrap_content"
91 122
                 android:layout_gravity="top|center"
92 123
                 android:layout_marginTop="5dp"
93
-                android:src="@drawable/bottom_find"/>
124
+                android:src="@drawable/bottom_find_normal"/>
94 125
 
95 126
             <TextView
96 127
                 android:id="@+id/tab_faxian_text"
@@ -108,13 +139,23 @@
108 139
             android:layout_height="48dp"
109 140
             android:layout_weight="1">
110 141
 
142
+            <de.hdodenhof.circleimageview.CircleImageView
143
+                android:id="@+id/CI_me"
144
+                android:layout_width="15dp"
145
+                android:layout_height="15dp"
146
+                android:layout_marginTop="5dp"
147
+                android:layout_gravity="center|top"
148
+                android:layout_marginRight="2dp"
149
+                />
150
+
151
+
111 152
             <ImageView
112 153
                 android:id="@+id/tab_user_img"
113 154
                 android:layout_width="wrap_content"
114 155
                 android:layout_height="wrap_content"
115 156
                 android:layout_gravity="top|center"
116 157
                 android:layout_marginTop="5dp"
117
-                android:src="@drawable/bottom_me"/>
158
+                android:src="@drawable/bottom_me_normal"/>
118 159
 
119 160
             <TextView
120 161
                 android:id="@+id/tab_user_text"

+ 18 - 0
app/src/main/res/layout/skinadapter_item.xml

@@ -0,0 +1,18 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+              android:orientation="vertical"
4
+              android:layout_width="match_parent"
5
+              android:layout_height="match_parent">
6
+
7
+
8
+    <ImageView
9
+        android:layout_width="match_parent"
10
+        android:layout_height="match_parent"
11
+
12
+
13
+        />
14
+
15
+
16
+
17
+
18
+</LinearLayout>

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

@@ -36,4 +36,10 @@
36 36
     <color name="actionsheet_blue">#037BFF</color>
37 37
     <color name="actionsheet_red">#FD4A2E</color>
38 38
     <color name="actionsheet_gray">#8F8F8F</color>
39
+
40
+    <color name="textcolor">#222</color>
41
+
42
+    <color name="hometab_skin">#FFE500</color>
43
+
44
+
39 45
 </resources>