This repository was archived by the owner on Feb 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 18 files changed +260
-155
lines changed
java/com/xiecc/seeWeather Expand file tree Collapse file tree 18 files changed +260
-155
lines changed Original file line number Diff line number Diff line change 1- * .iml
2- .gradle
3- /local.properties
4- /.idea /workspace.xml
5- /.idea /libraries
1+ # built application files
2+ * .apk
3+ * .ap_
4+
5+
6+ # files for the dex VM
7+ * .dex
8+
9+
10+ # Java class files
11+ * .class
12+
13+
14+ # generated files
15+ bin /
16+ gen /
17+
18+
19+ # Local configuration file (sdk path, etc)
20+ local.properties
21+
22+
23+ # Windows thumbnail db
24+ Thumbs.db
25+
26+
27+ # OSX files
628.DS_Store
7- /build
8- /captures
29+
30+
31+ # Eclipse project files
32+ .classpath
33+ .project
34+
35+
36+ # Android Studio
37+ .idea
38+ # .idea/workspace.xml - remove # and delete .idea if it better suit your needs.
39+ .gradle
40+ build /
41+
42+
43+ # Signing files
44+ .signing /
45+
46+
47+ # User-specific configurations
48+ .idea /libraries /
49+ .idea /workspace.xml
50+ .idea /tasks.xml
51+ .idea /.name
52+ .idea /compiler.xml
53+ .idea /copyright /profiles_settings.xml
54+ .idea /encodings.xml
55+ .idea /misc.xml
56+ .idea /modules.xml
57+ .idea /scopes /scope_settings.xml
58+ .idea /vcs.xml
59+ * .iml
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ android {
99 minSdkVersion 19
1010 targetSdkVersion 23
1111 versionCode 3
12- versionName " 2.0.2 "
12+ versionName " 2.0.3 "
1313 }
1414 buildTypes {
1515 release {
Original file line number Diff line number Diff line change @@ -48,17 +48,26 @@ public class BaseActivity extends AppCompatActivity {
4848 */
4949 public void setStatusBarColor (int color ) {
5050 /**
51- * Android4.4以上可用
51+ * Android4.4以上 但是抽屉有点冲突,目前就重写一个方法暂时解决4.4的问题
5252 */
5353 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .KITKAT ) {
54-
55- getWindow ().addFlags (WindowManager .LayoutParams .FLAG_TRANSLUCENT_STATUS );
54+ this .getWindow ().addFlags (WindowManager .LayoutParams .FLAG_TRANSLUCENT_STATUS );
5655 SystemBarTintManager tintManager = new SystemBarTintManager (this );
56+ tintManager .setStatusBarTintEnabled (true );
5757 tintManager .setStatusBarTintResource (color );
58+ }
59+ }
60+
61+
62+ public void setStatusBarColorForKitkat (int color ) {
63+ /**
64+ * Android4.4
65+ */
66+ if (Build .VERSION .SDK_INT == Build .VERSION_CODES .KITKAT ) {
67+ this .getWindow ().addFlags (WindowManager .LayoutParams .FLAG_TRANSLUCENT_STATUS );
68+ SystemBarTintManager tintManager = new SystemBarTintManager (this );
5869 tintManager .setStatusBarTintEnabled (true );
59- //Window window = getWindow();
60- //window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
61- //window.setStatusBarColor(color);
70+ tintManager .setStatusBarTintResource (color );
6271 }
6372 }
6473}
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ public class BaseApplication extends Application {
1616 public static Context mAppContext = null ;
1717
1818
19-
2019 @ Override public void onCreate () {
2120 super .onCreate ();
2221 mAppContext = getApplicationContext ();
@@ -27,15 +26,12 @@ public class BaseApplication extends Application {
2726 /**
2827 * 如果存在SD卡则将缓存写入SD卡,否则写入手机内存
2928 */
30- try {
31- if (getApplicationContext ().getExternalCacheDir () != null && ExistSDCard ()) {
32- cacheDir = getApplicationContext ().getExternalCacheDir ().toString ();
33- Log .d ("sd卡" , cacheDir );
34- }
35- else {
36- cacheDir = getApplicationContext ().getCacheDir ().toString ();
37- }
38- } catch (Exception e ) {
29+
30+ if (getApplicationContext ().getExternalCacheDir () != null && ExistSDCard ()) {
31+ cacheDir = getApplicationContext ().getExternalCacheDir ().toString ();
32+
33+ }
34+ else {
3935 cacheDir = getApplicationContext ().getCacheDir ().toString ();
4036 }
4137 }
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ public List<Province> loadProvinces(SQLiteDatabase db) {
3333
3434 do {
3535 Province province = new Province ();
36- province .setProSort ( cursor .getInt (cursor .getColumnIndex ("ProSort" ) ));
37- province .setProName ( cursor .getString (cursor .getColumnIndex ("ProName" ) ));
36+ province .ProSort = cursor .getInt (cursor .getColumnIndex ("ProSort" ));
37+ province .ProName = cursor .getString (cursor .getColumnIndex ("ProName" ));
3838 list .add (province );
3939 } while (cursor .moveToNext ());
4040 }
Original file line number Diff line number Diff line change 11package com .xiecc .seeWeather .modules .domain ;
22
3+ import java .io .Serializable ;
4+
35/**
46 * Created by hugo on 2015/9/30 0030.
57 */
6- public class City {
8+ public class City implements Serializable {
79
810 public String CityName ;
911 public int ProID ;
1012
1113
12- public String getCityName () {
13- return CityName ;
14- }
15-
16- public int getProID () {
17- return ProID ;
18- }
19-
20- public void setCityName (String cityName ) {
21- CityName = cityName ;
22- }
23-
24- public void setProID (int proID ) {
25- ProID = proID ;
26- }
2714}
Original file line number Diff line number Diff line change 11package com .xiecc .seeWeather .modules .domain ;
22
3+ import java .io .Serializable ;
4+
35/**
46 * Created by hugo on 2015/9/30 0030.
57 */
6- public class Province {
7-
8- private String ProName ;
9- private int ProSort ;
10-
8+ public class Province implements Serializable {
119
12- public String getProName () {
13- return ProName ;
14- }
10+ public String ProName ;
11+ public int ProSort ;
1512
16- public int getProSort () {
17- return ProSort ;
18- }
1913
20- public void setProName (String proName ) {
21- ProName = proName ;
22- }
2314
24- public void setProSort (int proSort ) {
25- ProSort = proSort ;
26- }
2715}
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ public class Setting {
1515 public static final String AUTO_UPDATE = "change_update_time" ; //自动更新时长
1616 public static final String CITY_NAME = "城市" ;//选择城市
1717 public static final String HOUR = "小时" ;//当前小时
18+ public static final String HOUR_SELECT = "hour_select" ; //设置更新频率的联动-需要改进
1819
1920 public static final String API_TOKEN = "7db041d0c3013b63e4bed2a554f02d85" ;//fir.im api_token
2021 public static final String KEY = "282f3846df6b41178e4a2218ae083ea7" ;// 和风天气 key
You can’t perform that action at this time.
0 commit comments