We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7eed7c1 commit d609d03Copy full SHA for d609d03
ChaosCrystal/ActionBar/为ActionBar添加返回按钮.md
@@ -1,6 +1,6 @@
1
# 为 ActionBar 添加返回按钮
2
3
-在 AndroidManifest.xml 文件中配置
+**在 AndroidManifest.xml 文件中配置**
4
5
``` xml
6
<activity android:name="com.gcssloop.test.viewsupport.TestCustomViewActivity"
@@ -11,15 +11,15 @@
11
android:value="com.gcssloop.test.MainActivity" />
12
</activity>
13
```
14
-在 onCrate 中设置
+**在 onCrate 中设置**
15
16
``` java
17
// 3.0+
18
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
19
// If your minSdkVersion is 11 or higher, instead use:
20
// getActionBar().setDisplayHomeAsUpEnabled(true);
21
22
-监听返回按钮事件
+**监听返回按钮事件**
23
24
> 它的 id 是 home,可以使用重载 `onOptionsItemSelected` 的方式进行监听。
25
0 commit comments