0
時,這是很難用語言來解釋,所以我會告訴你的圖像來說明問題的ImageButton填充添加比例
正如你看到的,paddingTop和paddingBottom來已縮放的ImageView後添加作爲「centerInside」。
我不喜歡它,因爲這樣我就失去了設計的控制。
我知道我可以把android:marginTop =「 - 5dp」,但它不是一個好的解決方案,因爲它可能不適用於每個設備。
這裏是ImageButton的
<ImageButton
android:id="@+id/login_button_twitter"
android:src="@drawable/login_twitter_button_es"
android:layout_above="@+id/login_button_account"
android:background="@null"
android:text="@string/access_twitter"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:scaleType="centerInside"
/>
做的,你知道,如果我已經設置了layout_height和layout_width作爲WRAP_CONTENT它爲什麼增加這個空間的代碼?
非常感謝!