【发布时间】:2015-03-31 22:52:55
【问题描述】:
在横向模式下在工具栏中添加后退按钮时,后退按钮不在工具栏的垂直中心。
我唯一要做的就是在 android manifest 中:
<activity
android:name="tack.hardcode.com.tack.MainActivity"
android:label="@string/app_name"
android:screenOrientation="landscape">
这是我的工具栏代码
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#3F51B5">
</android.support.v7.widget.Toolbar>
我还实现了 v21.styles,并且在我的 mainActivity 中包含了工具栏。
我还能做什么?!
【问题讨论】:
-
你想实现后退箭头(即向上导航)还是让它位于垂直中心? @KiZo
-
已经实现了,我只想在app_bar的垂直中心
-
你能发布你的工具栏代码吗?我的意思是xml。
-
我已经发布了答案。