Skip to content

Commit

Permalink
Update README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaouan committed Aug 17, 2016
1 parent 6c727e3 commit e9a5467
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ It's an Android library that allows you to use Layout as RadioButton or CheckBox
The librarie is Android 14+ compatible. Gradient effect is only Android 21+ compatible.

![demo](art/demo.gif)

*Demo inspired by [Cris Samson's gradient hover animation](https://dribbble.com/shots/2892770-Gradient-hover-animation)*


Expand All @@ -26,11 +27,11 @@ compile 'com.github.jaouan:compoundlayout:1.0.0'
Usage
--------

## General
*CompoundLayout* checked state can be changed programmatically using method *myCompoundLayout.setChecked()*.
Checked state can be retrieved using *myCompoundLayout.isChecked()*, and can be listened using *myCompoundLayout.setOnCheckedChangeListener()*.
#### General
*CompoundLayout* checked state can be changed programmatically using method **myCompoundLayout.setChecked()**.
Checked state can be retrieved using **myCompoundLayout.isChecked()**, and can be listened using **myCompoundLayout.setOnCheckedChangeListener()**.

## Layout as CheckBox
#### Layout as CheckBox

```xml
<com.jaouan.compoundlayout.CompoundLayout
Expand All @@ -47,8 +48,8 @@ Checked state can be retrieved using *myCompoundLayout.isChecked()*, and can be
</com.jaouan.compoundlayout.CompoundLayout>
```

## Layout as RadioButton
### Basic
#### Layout as RadioButton
##### Basic
```xml
<com.jaouan.compoundlayout.RadioLayoutGroup
android:layout_width="wrap_content"
Expand Down Expand Up @@ -83,7 +84,7 @@ Checked state can be retrieved using *myCompoundLayout.isChecked()*, and can be
</com.jaouan.compoundlayout.RadioLayoutGroup>
```

### Gradient effect (Android 21+ only)
##### Gradient effect (Android 21+ only)
```xml
<com.jaouan.compoundlayout.RadioLayoutGroup
android:layout_width="wrap_content"
Expand Down Expand Up @@ -123,7 +124,7 @@ Checked state can be retrieved using *myCompoundLayout.isChecked()*, and can be
</com.jaouan.compoundlayout.RadioLayoutGroup>
```

You can use *myGradientRadioLayout.setColorA()*, *myGradientRadioLayout.setColorA()* and *myGradientRadioLayout.setAngle()* to configure the gradient effect programmatically.
You can use **myGradientRadioLayout.setColorA()**, **myGradientRadioLayout.setColorA()** and **myGradientRadioLayout.setAngle()** to configure the gradient effect programmatically.


License
Expand Down

0 comments on commit e9a5467

Please sign in to comment.