<ImageView
android:layout_width="match_parent"
android:layout_height="10dp"
android:layout_width="match_parent"
android:layout_height="10dp"
android:srcc="@drawable/actionbar_shadow" />
actionbar_shadow是.9图片,上述写法达不到预期效果,需要把src改为background,.9图片只能用作背景
<ImageView
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="@drawable/actionbar_shadow" />
本文介绍了在Android开发中正确使用ImageView显示.9图片的方法。指出当使用.9图片作为背景时,应将属性src替换为background以确保图片正确拉伸。
2043

被折叠的 条评论
为什么被折叠?



