【发布时间】:2016-10-18 17:05:50
【问题描述】:
我在这个圆形的 LinearLayout 中有一些图像视图。这是我的简单代码:
<LinearLayout
android:layout_width="128dp"
android:layout_height="128dp"
android:id="@+id/point_image_table1"
android:orientation="vertical"
android:drawable="@drawable/image_view_style"
android:layout_below="@+id/repoint_p_name"
android:weightSum="4">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="centerCrop"
android:id="@+id/imageView61"
android:layout_marginBottom="1dp"
android:src="@color/realRed"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/imageView71"
android:layout_marginRight="1dp"
android:layout_marginEnd="1dp"
android:scaleType="centerCrop"
android:src="@drawable/pinpoint_logo_large"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/imageView51"
android:scaleType="centerCrop"
android:src="@drawable/pinpoint_logo_large"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginLeft="1dp"
android:layout_marginStart="1dp"
android:scaleType="centerCrop"
android:id="@+id/imageView81"
android:src="@drawable/pinpoint_logo_large"/>
</LinearLayout>
但是如果没有看到 LinearLayout,Images 角会覆盖 LinearLayout 角,最后是边框。
我该如何解决?我需要将一些图像视图设置为线性布局,还需要将边框和圆角设置为线性布局。
谢谢。
【问题讨论】:
-
所以基本上你想要一些带有容器圆角的图像拼贴?
-
@MohammedAtif 是的。类似的东西
标签: java android xml android-layout material-design