【发布时间】:2012-07-15 19:28:09
【问题描述】:
我有一个线性布局和一个图像视图。线性布局具有圆角。我希望我的图像位于视图的最顶部,但是当图像出现时,角不再是圆形的。我能为此做些什么?我知道在 iOS 中有一个用于容器(UIView)的剪辑子视图选项。但不确定是否适用于 Android。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="top"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/cell_rounded_edges">
<ImageView
android:id="@+id/prodImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:gravity="top"
android:focusable="false"
android:clickable="false"
android:adjustViewBounds="true"
/>
.....and so on
【问题讨论】:
-
谢谢,我需要把图像的角落弄圆才能正常工作。谷歌需要解决这个问题。 clipChildren 应该可以工作,但不能。
标签: android imageview android-linearlayout