File tree Expand file tree Collapse file tree 4 files changed +12
-162
lines changed Expand file tree Collapse file tree 4 files changed +12
-162
lines changed Original file line number Diff line number Diff line change 36
36
<string name =" ani_time2" >500</string >
37
37
<string name =" ani_timestartof" >150</string >
38
38
39
- <string name =" no_network" >请检查网络设置! </string >
39
+ <string name =" no_network" >请检查网络设置</string >
40
40
<string name =" network_exception" >网络异常,请稍后再试</string >
41
- <string name =" no_update" >暂无更新! </string >
41
+ <string name =" no_update" >暂无更新</string >
42
42
43
43
<string-array name =" save_days" >
44
44
<item >3天</item >
55
55
<string name =" hourago" >小时前</string >
56
56
<string name =" dayago" >天前</string >
57
57
58
+ <string name =" bg_switch_success" >设置成功</string >
59
+
58
60
</resources >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -262,7 +262,8 @@ private void switchMode()
262
262
if (isNight )
263
263
{
264
264
isNight = false ;
265
- bgLayout .setBackgroundResource (R .drawable .home_bg_default );
265
+ int resid = AppContext .getPrefrences (this ).getInt ("home_bg" , R .drawable .home_bg_default );
266
+ bgLayout .setBackgroundResource (resid );
266
267
switchModeBtn .setImageResource (R .drawable .composer_sun );
267
268
Toast .makeText (Main .this , R .string .switch2Day , Toast .LENGTH_SHORT ).show ();
268
269
}
@@ -342,7 +343,11 @@ private void initView()
342
343
switchModeBtn = (ImageButton ) findViewById (R .id .composer_btn_moon );
343
344
pageTv = (TextView ) findViewById (R .id .home_page_tv );
344
345
homeLoadingLayout = (RelativeLayout ) findViewById (R .id .home_loading_layout );
346
+
345
347
bgLayout = (RelativeLayout ) findViewById (R .id .home_bg_layout );
348
+ int resid = AppContext .getPrefrences (this ).getInt ("home_bg" , R .drawable .home_bg_default );
349
+ bgLayout .setBackgroundResource (resid );
350
+
346
351
mPager = (ViewPager ) findViewById (R .id .home_pager );
347
352
mPager .setOnPageChangeListener (new OnPageChangeListener ()
348
353
{
Original file line number Diff line number Diff line change @@ -45,9 +45,8 @@ public void onCreate(Bundle savedInstanceState)
45
45
{
46
46
super .onCreate (savedInstanceState );
47
47
requestWindowFeature (Window .FEATURE_NO_TITLE );
48
-
49
48
setContentView (R .layout .switch_bg );
50
-
49
+
51
50
mSwitcher = (ImageSwitcher ) findViewById (R .id .switcher );
52
51
mSwitcher .setFactory (this );
53
52
mSwitcher .setInAnimation (AnimationUtils .loadAnimation (this ,
@@ -83,7 +82,7 @@ public void onClick(View v)
83
82
intent .setAction (SWITCH_HOME_BG );
84
83
intent .putExtra ("home_bg_id" , mImageIds [selectedPosition ]);
85
84
sendBroadcast (intent );
86
- Toast .makeText (SwitchBg .this , "设置成功!" , Toast .LENGTH_SHORT ).show ();
85
+ Toast .makeText (SwitchBg .this , R . string . bg_switch_success , Toast .LENGTH_SHORT ).show ();
87
86
}
88
87
});
89
88
}
You can’t perform that action at this time.
0 commit comments