代码拉取完成,页面将自动刷新
android Layout布局自定义圆角角度
api "com.gitee.hljdrl:clip:1.0.1"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
app:titleTextColor="@android:color/white" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/tool_bar">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:background="@android:color/darker_gray"
android:padding="4dp"
android:text="clipRadius=20dp" />
<com.gitee.hljdrl.clip.RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
app:clipRadius="20dp">
<View
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#03A9F4" />
<View
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:background="#673AB7" />
<View
android:layout_alignParentBottom="true"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#FF5722" />
<View
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:background="#FFEB3B" />
</com.gitee.hljdrl.clip.RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@android:color/darker_gray"
android:padding="4dp"
android:text="topLeftRadius" />
<com.gitee.hljdrl.clip.RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
app:topLeftRadius="50dp">
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#00ff00" />
</com.gitee.hljdrl.clip.RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@android:color/darker_gray"
android:padding="4dp"
android:text="topRightRadius" />
<com.gitee.hljdrl.clip.RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
app:topRightRadius="50dp">
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#00ff00" />
</com.gitee.hljdrl.clip.RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@android:color/darker_gray"
android:padding="4dp"
android:text="bottomLeftRadius" />
<com.gitee.hljdrl.clip.RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
app:bottomLeftRadius="50dp">
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#00ff00" />
</com.gitee.hljdrl.clip.RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@android:color/darker_gray"
android:padding="4dp"
android:text="bottomRightRadius" />
<com.gitee.hljdrl.clip.RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
app:bottomRightRadius="50dp">
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#00ff00" />
</com.gitee.hljdrl.clip.RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。