自定义圆角控件

Posted Android-kongqw

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自定义圆角控件相关的知识,希望对你有一定的参考价值。

自定义圆角控件

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-k47qEEHW-1644394890665)(https://jitpack.io/v/kongqw/CustomCornerView.svg)]

How to

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects 
	repositories 
		...
		maven  url 'https://jitpack.io' 
	

Step 2. Add the dependency

dependencies 
	implementation 'com.github.kongqw:CustomCornerView:1.0.0'

使用

<com.kongqw.view.CustomCornerView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:cornerRadius="30dp"
    app:cornerDirection="top"
    android:layout_margin="20dp">

    <WebView
        android:id="@+id/web_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</com.kongqw.view.CustomCornerView>

以上是关于自定义圆角控件的主要内容,如果未能解决你的问题,请参考以下文章

自定义圆角控件

自定义圆角控件

Android学习笔记圆角矩形ImageView自定义控件的实现与使用

Android自定义圆角矩形进度条2

Android Shape自定义纯色圆角按钮

WPF自定义控件の扩展控件