Skip to content

Commit 2c0efd0

Browse files
author
admin
committed
Merge remote-tracking branch 'origin/master'
2 parents 8f22fa8 + 6659cdd commit 2c0efd0

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# TwoCheckbox
2+
很常用的双选一单选框,使用TextView+CheckBox  
3+
很简单的一个自定义组合控件,很多属性不是很全,可参考进行拓展
4+
5+
![image](https://github.com/tanglongfei/TwoCheckbox/blob/master/image/2018-01-18_09-49-36.gif)
6+
## 布局中使用  
7+
```
8+
<com.pineteree.twocheckboxlibrary.TwoCheckbox
9+
android:id="@+id/main_two_checkbox"
10+
android:layout_width="wrap_content"
11+
android:layout_height="wrap_content"
12+
app:checkbox1_text="是"
13+
app:checkbox1_text_color="#ed1010"
14+
app:checkbox2_text="否"
15+
app:checkbox2_text_color="#2edc17"
16+
app:textview_text="是否完成:"/>
17+
```
18+
## How to include    
19+
Step 1. Add it in your root build.gradle at the end of repositories:
20+
```
21+
allprojects {
22+
repositories {
23+
...
24+
maven { url 'https://jitpack.io' }
25+
}
26+
}
27+
```
28+
Step 2. Add the dependency (Android studio3.0以下使用compile添加依赖)
29+
```
30+
dependencies {
31+
implementation 'com.github.tanglongfei:TwoCheckbox:V1.0'
32+
}
33+
```
34+
35+
## 属性
36+
```
37+
//标题颜色
38+
textview_text_color"
39+
40+
//标题字体大小
41+
textview_text_size"
42+
43+
//标题内容
44+
textview_text"
45+
46+
//左边CheckBox标题
47+
checkbox1_text"
48+
49+
//左边CheckBox字体颜色
50+
checkbox1_text_color"
51+
52+
//左边CheckBox字体大小
53+
checkbox1_text_size"
54+
55+
//右边CheckBox标题
56+
checkbox2_text"
57+
58+
//右边CheckBox字体颜色
59+
checkbox2_text_color"
60+
61+
//右边CheckBox字体大小
62+
checkbox2_text_size"
63+
```

image/2018-01-18_09-13-02.gif

66.9 KB
Loading

image/2018-01-18_09-49-36.gif

106 KB
Loading

0 commit comments

Comments
 (0)