0
這是我的問題:填充不起作用
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/my_image"
android:layout_width="32dp"
android:layout_height="32p"
android:padding="10dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
我裏面的RelativeLayout ImageView的不與任何填充顯示。它顯示爲填充爲0dp。我需要在右下角有這個圖像,它需要一些填充。我能做些什麼來完成?
嘗試設置'android:src = @drawable \ my_pic.png'並更改'android:layout_height =「32dp」'不是32p並檢查 – Sony
也許與layout_height =「wrap_content」有關?由於我不知道這個文件的上下文,所以可能用它與match_parent幫助 – droidpl
嘗試添加android:scaleType =「centerInside」 –