Skip to content

Commit 5f996ea

Browse files
committed
1:修改回退键按钮。
1 parent f9b0e31 commit 5f996ea

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

lib_common/src/main/java/com/guiying/common/base/BaseActionBarActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import android.support.annotation.StringRes;
1212
import android.support.v7.app.ActionBar;
1313

14+
import com.guiying.common.R;
15+
1416
/**
1517
* BaseActionBarActivity继承于BaseActivity,封装了actionBar的逻辑;
1618
* 继承于ActionBarBaseActivity的Activity都将默认带有ActionBar,并且只能使用AppTheme主题;
@@ -51,6 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
5153
//标题栏设置
5254
mActionBar = getSupportActionBar();
5355
if (mActionBar != null) {
56+
mActionBar.setHomeAsUpIndicator(R.drawable.ic_arrow_back);
5457
mActionBar.setDisplayHomeAsUpEnabled(true);
5558
mActionBar.setHomeButtonEnabled(true);
5659
mActionBar.setTitle(setTitleId());

lib_common/src/main/java/com/guiying/common/base/BaseActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import android.support.v7.widget.Toolbar;
88
import android.view.View;
99

10+
import com.guiying.common.R;
11+
1012
/**
1113
* <p>Activity基类 </p>
1214
*
@@ -26,6 +28,7 @@ protected void setupToolBar(Toolbar toolbar, boolean hideTitle) {
2628
setSupportActionBar(toolbar);
2729
ActionBar actionBar = getSupportActionBar();
2830
if (actionBar != null) {
31+
actionBar.setHomeAsUpIndicator(R.drawable.ic_arrow_back);
2932
actionBar.setDisplayHomeAsUpEnabled(true);
3033
actionBar.setDisplayShowHomeEnabled(true);
3134
if (hideTitle) {
486 Bytes
Loading

0 commit comments

Comments
 (0)