我試圖用導航按鈕和工具欄的標題分別對齊圖標和文本字段。如何與工具欄的標題對齊?
根據設計規範,標題是72dp從左側邊緣走:
如果我使用72dp,像下面,我沒有得到一個對準
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:layout_width="56dp"
android:layout_height="56dp"
android:padding="16dp"
android:id="@+id/icon"/>
<EditText android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:id="@+id/text"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"/>
</merge>
有誰知道什麼可能是錯的?
感謝
UPDATE定製工具欄按@麥克的建議是:
您的添加填充到您的ImageView,這是拋出對齊以及...啓用在您的開發人員設置中繪製佈局邊界太多,這將幫助您看到您的imageView邊界正在移動 –