添加光标属性的支持

This commit is contained in:
yangjing
2018-11-01 11:15:58 +08:00
parent 88d66b068e
commit d2f0bd3ed4
4 changed files with 24 additions and 8 deletions

View File

@@ -18,6 +18,7 @@
- [x] **提供输入内容的监听器**
- [x] **高度自适配**
- [x] **属性自定义配置**
- [x] **光标属性自定义**
## 版本
名称|SlideMenuLayout
@@ -43,7 +44,7 @@ repositories {
```
第二步添加至module的build.gradle文件中
```gradle
compile 'com.justkiddingbaby:vercodeedittext:最新版本'
'com.justkiddingbaby:vercodeedittext:最新版本'
```
## 属性说明
@@ -55,6 +56,9 @@ compile 'com.justkiddingbaby:vercodeedittext:最新版本'
[bottomLineNormalColor](/vcedittext-lib/src/main/res/values/attrs.xml)|底线未选中状态下的颜色|reference
[bottomLineHeight](/vcedittext-lib/src/main/res/values/attrs.xml)|底线高度|dimension
[selectedBackgroundColor](/vcedittext-lib/src/main/res/values/attrs.xml)|选中的背景颜色|reference
[cursorDuration](/vcedittext-lib/src/main/res/values/attrs.xml)|光标闪烁间隔时间|integer
[cursorColor](/vcedittext-lib/src/main/res/values/attrs.xml)|光标颜色|integer
[cursorWidth](/vcedittext-lib/src/main/res/values/attrs.xml)|光标宽度|integer
## 方法说明
返回值|方法|说明
@@ -86,6 +90,8 @@ void|[setOnVerificationCodeChangedListener(OnVerificationCodeChangedListener lis
```
## 发布历史
#### v1.1.0 (2018/11/1)
1、添加光标属性的支持.
#### v1.0.5(2017/12/5)
1、修复在点击控件时候可以遇到的Bug
#### v1.0.4(2017/10/14)

View File

@@ -19,6 +19,7 @@ Prevent input overflow.
- [x] **Provide input value listener**
- [x] **Layout height is auto adjust**
- [x] **Attributes can be configured for customization**
- [x] **Custom cursor style**
## Version
name|VercodeEditText
@@ -44,7 +45,7 @@ repositories {
```
Second. add to module build.gradle
```gradle
compile 'com.justkiddingbaby:vercodeedittext:the latest version'
'com.justkiddingbaby:vercodeedittext:the latest version'
```
## Attributes instruction
@@ -56,6 +57,9 @@ attribute|instruction|value
[bottomLineNormalColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the color of bottom line is normal status|reference
[bottomLineHeight](/vcedittext-lib/src/main/res/values/attrs.xml)|the height of bottom line|dimension
[selectedBackgroundColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the background color of verification code is select status|reference
[cursorDuration](/vcedittext-lib/src/main/res/values/attrs.xml)|the duration of cursor blink|integer
[cursorColor](/vcedittext-lib/src/main/res/values/attrs.xml)|the color of cursor|integer
[cursorWidth](/vcedittext-lib/src/main/res/values/attrs.xml)|the width of cursor|integer
## Function instruction
return|function name|instruction
@@ -87,6 +91,8 @@ void|[setOnVerificationCodeChangedListener(OnVerificationCodeChangedListener lis
```
## Release history
#### v1.1.0 (2018/11/1)
1、Add cursor support.
#### v1.0.5(2017/12/5)
1、Fix the bug that could appear when the view is pressed.
#### v1.0.4(2017/10/14)

View File

@@ -7,25 +7,27 @@
android:orientation="vertical">
<com.jkb.vcedittext.VerificationCodeEditText
android:id="@+id/am_et"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:inputType="number"
android:text="123"
android:id="@+id/am_et"
android:textColor="@color/colorPrimary"
android:textSize="40sp"
app:bottomLineHeight="2dp"
app:bottomLineNormalColor="@color/gravy_light"
app:bottomLineSelectedColor="@color/colorAccent"
app:cursorColor="@android:color/holo_purple"
app:figures="4"
app:selectedBackgroundColor="@color/colorPrimary_alpha33"
app:verCodeMargin="10dp" />
app:verCodeMargin="10dp"/>
<com.jkb.vcedittext.VerificationCodeEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:cursorVisible="false"
android:inputType="number"
android:text="1234"
android:textColor="@color/colorPrimary"
@@ -35,7 +37,7 @@
app:bottomLineSelectedColor="@color/colorAccent"
app:figures="5"
app:selectedBackgroundColor="@color/colorPrimary_alpha33"
app:verCodeMargin="10dp" />
app:verCodeMargin="10dp"/>
<com.jkb.vcedittext.VerificationCodeEditText
android:layout_width="match_parent"
@@ -48,8 +50,10 @@
app:bottomLineHeight="2dp"
app:bottomLineNormalColor="@color/gravy_light"
app:bottomLineSelectedColor="@color/colorAccent"
app:cursorColor="@android:color/white"
app:cursorWidth="2dp"
app:figures="6"
app:selectedBackgroundColor="@color/colorPrimary_alpha33"
app:verCodeMargin="10dp" />
app:verCodeMargin="10dp"/>
</LinearLayout>

View File

@@ -6,8 +6,8 @@ ext {
]
vercode = [
publishCode : 6,
publishVersion: "1.0.5",
publishCode : 7,
publishVersion: "1.1.0",
userOrg : 'jkb',
groupId : 'com.justkiddingbaby',