在我的android应用程序中,我只需要四个角落的边框,如图(白色)所示。Android:边框只在角落
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="6">
<VideoView
android:id="@+id/video1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center" />
<View
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_centerInParent="true"
android:background="@drawable/cornerbg" />
</RelativeLayout>
cornerbg.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<solid android:color="@color/transparent" />
<stroke
android:width="1dp"
android:color="@color/btn_border"
android:dashWidth="50dp" // I tried this but not getting expected
android:dashGap="60dp"/>
</shape>
</item>
</layer-list>
我如何编写XML的呢?
请帮帮忙,谢谢
你需要这些可见的角落,在里面的照片或作为边界? –
创建该四角图像的9.png,并将其放置在图像的布局前面 –
@fremmedehenvendelser在边框内。但我可以管理它,我不会将它写入xml。我将用axml和xml更新我的问题 –