drawable bg_ring_d7_top:
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transparent" />
<corners
android:topLeftRadius="13dp"
android:topRightRadius="13dp" />
<stroke
android:width="1dp"
android:color="@color/text_d7" />
</shape>
layout布局:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white">
<ImageView
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="@color/transparent"
android:src="@drawable/bg_ring_d7_top" />
</RelativeLayout>
小米和华为荣耀10手机显示随机亮边,如图: