android make imageview背景帧src没有伸展到可用的大小

时间:2014-03-11 14:51:17

标签: android android-imageview

我想让imageview的背景像src周围的框架,同时保持imageview的宽度和高度为match_parent

问题是背景延伸到imageview的所有可用空间,如附带的屏幕截图

帮助将不胜感激:D

布局xml

<RelativeLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue"
android:padding="10dp" >

<ImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="5dp"
    android:background="@color/transparent_black"
    android:adjustViewBounds="true"
    android:contentDescription="@string/header"
    android:src="@drawable/albumart_mp_unknown" />

屏幕截图:

enter image description here

0 个答案:

没有答案