天天看點

FlycoRoundView 自定義TextViewFlycoRoundView

FlycoRoundView

A library helps Android built-in views easy and convenient to set round rectangle background and accordingly related shape resources can be reduced.

一個擴充原生控件支援圓角矩形框背景的庫,可以減少相關shape資源檔案使用.

Demo

FlycoRoundView 自定義TextViewFlycoRoundView

Gradle

dependencies{
    compile 'com.flyco.roundview:FlycoRoundView_Lib:[email protected]'
}
           

支援屬性 Attributes

name format description
rv_backgroundColor color background color 背景色
rv_backgroundPressColor color background press color 按下後的背景色
rv_cornerRadius dimension background rectangle corner radius,unit dp 圓角弧度
rv_strokeWidth dimension background rectangle stroke width,unit dp 描邊寬度
rv_strokeColor color background rectangle stroke color 描邊顔色
rv_strokePressColor color background rectangle stroke press color 按下後的描邊顔色
rv_textPressColor color text press color 按下後的文本顔色
rv_isRadiusHalfHeight boolean corner radius is half of height 圓角是否為高度的一半
rv_isWidthHeightEqual boolean width and height is the same size which is the max value of them 是否寬高相等,取最大值
rv_cornerRadius_TL dimension corner radius top left,unit dp 左上圓角
rv_cornerRadius_TR dimension corner radius top right,unit dp 右上圓角
rv_cornerRadius_BL dimension corner radius bottom left,unit dp 左下圓角
rv_cornerRadius_BR dimension corner radius bottom right,unit dp 右下圓角
rv_isRippleEnable boolean is ripple effect enable for Api21+ 點選是否有水波紋,支援Android 5.0以上