更新时间:2023-01-10 10:31:03
如果您的项目中有支持库,则可以在应用程序中的任何位置创建后退按钮,如下所示:
If you have the support library in your project, you can make a back button in any place in your applicaction like this:
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?attr/homeAsUpIndicator"
android:background="?attr/selectableItemBackgroundBorderless"/>
具体来说,后退箭头的资源是?attr/homeAsUpIndicator
.
Specifically the resource for the back arrow is ?attr/homeAsUpIndicator
.