Tag: android shape

如何在带有圆angular的android中查看视图

我正在尝试使用圆angular边缘在Android中的视图。 我目前find的解决scheme是定义一个圆angular的形状,并将其用作该视图的背景。 这是我做的,定义一个drawable如下所示 <padding android:top="2dp" android:bottom="2dp"/> <corners android:bottomRightRadius="20dp" android:bottomLeftRadius="20dp" android:topLeftRadius="20dp" android:topRightRadius="20dp"/> 现在我用这个作为我的布局的背景如下 <LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginBottom="10dp" android:clipChildren="true" android:background="@drawable/rounded_corner"> 这工作非常好,我可以看到,视图圆润的边缘。 但是我的布局在其中有很多其他的子视图说一个ImageView或一个MapView。 当我在上面的布局中放置一个ImageView时,图像的angular落不会被剪切/裁剪,而会显得满了。 我已经看到了其他的解决方法,使它像这里解释的工作。 但有没有一种方法来设置一个视图的圆angular,所有的子视图都包含在那个圆angular的主视图中? 谢谢。