|
@@ -4,11 +4,13 @@ import android.content.Intent;
|
4
|
4
|
import android.graphics.Color;
|
5
|
5
|
import android.os.Bundle;
|
6
|
6
|
import android.support.v4.app.FragmentActivity;
|
|
7
|
+import android.widget.ImageView;
|
7
|
8
|
import android.widget.LinearLayout;
|
8
|
9
|
import android.widget.TextView;
|
9
|
10
|
import android.widget.Toast;
|
10
|
11
|
|
11
|
12
|
import com.bumptech.glide.Glide;
|
|
13
|
+import com.kuxuan.moneynote.MyApplication;
|
12
|
14
|
import com.kuxuan.moneynote.R;
|
13
|
15
|
import com.kuxuan.moneynote.base.BaseFragmentActivity;
|
14
|
16
|
import com.kuxuan.moneynote.base.mvpbase.MVPFragment;
|
|
@@ -17,6 +19,7 @@ import com.kuxuan.moneynote.db.CategoryDaoOperator;
|
17
|
19
|
import com.kuxuan.moneynote.json.BillJson;
|
18
|
20
|
import com.kuxuan.moneynote.json.HeadImg;
|
19
|
21
|
import com.kuxuan.moneynote.json.MineJson;
|
|
22
|
+import com.kuxuan.moneynote.json.netbody.SkinBean;
|
20
|
23
|
import com.kuxuan.moneynote.ui.activitys.AboutActivity;
|
21
|
24
|
import com.kuxuan.moneynote.ui.activitys.alarm.AlarmActivity;
|
22
|
25
|
import com.kuxuan.moneynote.ui.activitys.bill.BillActivity;
|
|
@@ -33,6 +36,7 @@ import com.kuxuan.moneynote.ui.activitys.opinion.OptionActivity;
|
33
|
36
|
import com.kuxuan.moneynote.ui.activitys.person.PersonActivity;
|
34
|
37
|
import com.kuxuan.moneynote.ui.activitys.score.UserScoreActivity;
|
35
|
38
|
import com.kuxuan.moneynote.ui.weight.MyToast;
|
|
39
|
+import com.kuxuan.moneynote.utils.GlideUtil;
|
36
|
40
|
import com.kuxuan.moneynote.utils.LoginStatusUtil;
|
37
|
41
|
import com.kuxuan.moneynote.utils.NetWorkUtil;
|
38
|
42
|
import com.kuxuan.moneynote.utils.SPUtil;
|
|
@@ -53,6 +57,7 @@ import org.greenrobot.eventbus.EventBus;
|
53
|
57
|
import org.greenrobot.eventbus.Subscribe;
|
54
|
58
|
import org.greenrobot.eventbus.ThreadMode;
|
55
|
59
|
|
|
60
|
+import java.io.File;
|
56
|
61
|
import java.lang.ref.WeakReference;
|
57
|
62
|
import java.util.ArrayList;
|
58
|
63
|
import java.util.Calendar;
|
|
@@ -209,6 +214,16 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
|
209
|
214
|
@Override
|
210
|
215
|
public void initView() {
|
211
|
216
|
EventBus.getDefault().register(this);
|
|
217
|
+
|
|
218
|
+ int position = (int) SPUtil.get(getContext(),Constant.Skin.CHECKED,-1);
|
|
219
|
+ if(position>-1){
|
|
220
|
+ String fileheader = MyApplication.getInstance().getApplicationContext().getFilesDir().getPath()+"/"+"skin";
|
|
221
|
+ File file = new File(fileheader + Constant.Skin.MINE+position+".png");
|
|
222
|
+ GlideUtil.setImageWithNoCache(getContext(),file,iv_mineskin);
|
|
223
|
+ }
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
212
|
227
|
cal = Calendar.getInstance();
|
213
|
228
|
activity = (BaseFragmentActivity) getActivity();
|
214
|
229
|
mShareListener = new CustomShareListener(getActivity());
|
|
@@ -423,6 +438,18 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
|
423
|
438
|
}
|
424
|
439
|
|
425
|
440
|
|
|
441
|
+ @Bind(R.id.iv_mineskin)
|
|
442
|
+ ImageView iv_mineskin;
|
|
443
|
+ @Subscribe(threadMode = ThreadMode.MAIN)
|
|
444
|
+ public void onMessageEvent5(SkinBean skinBean){
|
|
445
|
+
|
|
446
|
+ String fileheader = MyApplication.getInstance().getApplicationContext().getFilesDir().getPath()+"/"+"skin";
|
|
447
|
+ File file = new File(fileheader + Constant.Skin.MINE+skinBean.getCode()+".png");
|
|
448
|
+ GlideUtil.setImageWithNoCache(getContext(),file,iv_mineskin);
|
|
449
|
+
|
|
450
|
+ }
|
|
451
|
+
|
|
452
|
+
|
426
|
453
|
/**
|
427
|
454
|
* 退出
|
428
|
455
|
*
|