File tree Expand file tree Collapse file tree
common/src/main/java/com/guiying/common/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 * HttpsUtils来自于鸿洋的: https://github.com/hongyangAndroid/okhttputils;
3636 * 增加了主机名校验方法getHostnameVerifier();
3737 * 其他参考的文章有:http://android.jobbole.com/83787/;
38- * <p>
38+ *
3939 * Android 4.X 对TLS1.1、TLS1.2的支持参考了http://blog.csdn.net/joye123/article/details/53888252
4040 */
4141public class HttpsUtil {
Original file line number Diff line number Diff line change 66 android : name =" debug.GirlsApplication"
77 android : allowBackup =" true"
88 android : icon =" @mipmap/ic_launcher"
9- android : label =" @string/app_name "
9+ android : label =" @string/girls_name "
1010 android : supportsRtl =" true"
1111 android : theme =" @style/AppTheme" >
1212 <activity
Original file line number Diff line number Diff line change 11package com .guiying .girls ;
22
33import android .os .Bundle ;
4+ import android .support .v7 .app .ActionBar ;
45
56import com .github .mzule .activityrouter .annotation .Router ;
67import com .guiying .common .base .BaseActivity ;
@@ -12,5 +13,20 @@ public class GirlsActivity extends BaseActivity {
1213 protected void onCreate (Bundle savedInstanceState ) {
1314 super .onCreate (savedInstanceState );
1415 setContentView (R .layout .activity_girls );
16+
17+ //标题栏设置
18+ ActionBar actionBar = getSupportActionBar ();
19+ if (actionBar != null ) {
20+ actionBar .setDisplayHomeAsUpEnabled (true );
21+ actionBar .setTitle (R .string .girls_activity_title );
22+ }
23+ }
24+
25+
26+ @ Override
27+ public boolean onSupportNavigateUp () {
28+ onBackPressed ();
29+ return true ;
1530 }
31+
1632}
Original file line number Diff line number Diff line change 11<resources >
2- <string name =" app_name" >Girls</string >
2+ <string name =" girls_name" >Girls</string >
3+
4+ <string name =" girls_activity_title" >Girls</string >
5+
36</resources >
Original file line number Diff line number Diff line change 66 android : name =" debug.NewsApplication"
77 android : allowBackup =" true"
88 android : icon =" @mipmap/ic_launcher"
9- android : label =" @string/app_name "
9+ android : label =" @string/news_name "
1010 android : supportsRtl =" true"
1111 android : theme =" @style/AppTheme" >
1212 <activity
Original file line number Diff line number Diff line change 11package com .guiying .news ;
22
33import android .os .Bundle ;
4+ import android .support .v7 .app .ActionBar ;
45
56import com .github .mzule .activityrouter .annotation .Router ;
67import com .guiying .common .base .BaseActivity ;
@@ -12,5 +13,19 @@ public class NewsActivity extends BaseActivity {
1213 protected void onCreate (Bundle savedInstanceState ) {
1314 super .onCreate (savedInstanceState );
1415 setContentView (R .layout .activity_news );
16+
17+ //标题栏设置
18+ ActionBar actionBar = getSupportActionBar ();
19+ if (actionBar != null ) {
20+ actionBar .setDisplayHomeAsUpEnabled (true );
21+ actionBar .setTitle (R .string .news_activity_title );
22+ }
23+ }
24+
25+
26+ @ Override
27+ public boolean onSupportNavigateUp () {
28+ onBackPressed ();
29+ return true ;
1530 }
1631}
Original file line number Diff line number Diff line change 11<resources >
2- <string name =" app_name" >News</string >
2+ <string name =" news_name" >News</string >
3+
4+ <string name =" news_activity_title" >News</string >
5+
36</resources >
You can’t perform that action at this time.
0 commit comments