[英]How to create Circular View with shadow
要么使用FrameLayout,然后将其添加为最后一个图像视图,并为此视图指定右侧和顶部布局边距,并为基础布局添加一些稍大的右侧边距。
或者是RelativeLayout,您可以使用( layout_alignParentRight="true"
)并使用上边距将该视图与父右边对齐,如上例所示。
尝试模仿您的布局的示例,根据需要调整边距和图像:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#bbbb00"
android:layout_marginRight="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#888899"
android:layout_margin="20dp">
</LinearLayout>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="80dp"
android:src="@drawable/test"/>
</FrameLayout>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.