Skip to content

Commit d609d03

Browse files
authored
魔法-修复
1 parent 7eed7c1 commit d609d03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ChaosCrystal/ActionBar/为ActionBar添加返回按钮.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 为 ActionBar 添加返回按钮
22

3-
在 AndroidManifest.xml 文件中配置
3+
**在 AndroidManifest.xml 文件中配置**
44

55
``` xml
66
<activity android:name="com.gcssloop.test.viewsupport.TestCustomViewActivity"
@@ -11,15 +11,15 @@
1111
android:value="com.gcssloop.test.MainActivity" />
1212
</activity>
1313
```
14-
在 onCrate 中设置
14+
**在 onCrate 中设置**
1515

1616
``` java
1717
// 3.0+
1818
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
1919
// If your minSdkVersion is 11 or higher, instead use:
2020
// getActionBar().setDisplayHomeAsUpEnabled(true);
2121
```
22-
监听返回按钮事件
22+
**监听返回按钮事件**
2323

2424
> 它的 id 是 home,可以使用重载 `onOptionsItemSelected` 的方式进行监听。
2525

0 commit comments

Comments
 (0)