[英]Android title and home button as single back button
Simply set the button to go back to the previous activity/intent. 只需设置按钮即可返回上一个活动/意图。 If this isn't what you wanted, I'm not sure I understood your question properly.
如果这不是您想要的,则不确定我是否正确理解了您的问题。
Use Android: Go back to previous activity if that's what you wanted. 使用Android:如果需要的话,请返回上一个活动 。
<Button
android:id="@+id/back"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:text="set_your_title"
android:drawableLeft="@android:drawable/back"
android:textSize="24sp"/>
You can set the layout width according to your layout requirements. 您可以根据布局要求设置布局宽度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.