# SeparatedEditText
**Repository Path**: chen3441251/SeparatedEditText
## Basic Information
- **Project Name**: SeparatedEditText
- **Description**: 仿支付宝密码输入框、微信密码输入框,美团外卖验证码输入框等。有实心,空心以及下划线形式。可控制文本是否显示。
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-24
- **Last Updated**: 2024-11-23
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# SeparatedEditText [](https://jitpack.io/#WGwangguan/SeparatedEditText)
仿支付宝密码输入框、微信密码输入框,美团外卖验证码输入框等。有实心,空心以及下划线形式。可控制文本是否显示。
## screenshot
## 如何安装
- 配置根目录的build.gradle
```java
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
- 配置app module的build.gradle
```java
dependencies {
implementation 'com.github.WGwangguan:SeparatedEditText:Tag'
}
```
## 如何使用
1. 布局文件
在布局文件中添加SeparatedEditText并设置相关自定义属性
```
// 实心输入框
// 下划线输入框
//空心输入框
```
注:需给控件设置相应宽高。
2. Java代码
可以通过代码设置所有相关的自定义属性
```
public void handleContent(View v) {
solid.setPassword(!showContent);
hollow.setPassword(!showContent);
underline.setPassword(!showContent);
showContent = !showContent;
}
public void handleCursor(View v) {
solid.setShowCursor(!showCursor);
hollow.setShowCursor(!showCursor);
underline.setShowCursor(!showCursor);
showCursor = !showCursor;
}
```
## 可配置属性
#### SeparatedEditText
属性名 | 属性说明
:---:|:---:
password | 设置是否是密码样式,true 则显示小圆点
showCursor | 设置是否显示游标
separateType | 设置显示样式:type_hollow、type_solid、type_underline
maxLength | 设置显示框框个数
corner | 设置圆角 dp
borderColor | 设置边框颜色,type_hollow、type_underline适用
borderWidth | 设置边框粗细 dp
blockColor | 设置框框实心部分颜色,type_solid适用
blockSpacing | 设置框框间隙,type_solid、type_underline适用
textColor | 设置文本绘制颜色
cursorColor | 设置游标显示颜色
cursorWidth | 设置进游标宽度
cursorDuration | 设置游标闪烁时长 毫秒
## LICENSE
```
Copyright 2017 WGwangguan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```