Skip to content

Commit

Permalink
Merge branch 'release/0.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
sangcomz committed Aug 4, 2019
2 parents cf9c509 + ae20bbc commit 11b8188
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

Chameleon deals with the Status of RecyclerView.

## What's New in 0.1.1? :tada:
- [New Feature] change text and icons dynamically
- [New Feature] Chameleon is available in all views
## What's New in 0.1.2? :tada:
- [Bug] change `defaultState` -> `defaultChameleonState` (#14)

## How to Use

Expand All @@ -21,7 +20,7 @@ Chameleon deals with the Status of RecyclerView.
}
dependencies {
compile 'com.github.sangcomz:Chameleon:v0.1.1'
compile 'com.github.sangcomz:Chameleon:v0.1.2'
}
```
### Usage
Expand Down Expand Up @@ -133,7 +132,7 @@ chameleon.setStateChangeListener { newState, oldState -> Log.d("Main", "Was $old
| useErrorButton | Change whether to use error view Button | false |
| progressDrawable | progress drawable setting | - |
| isLargeProgress | Whether to use large progress | false |
| defaultState | Sets the initial state for Chameleon | NONE |
| defaultChameleonState | Sets the initial state for Chameleon | NONE |

Note - A state of `NONE` means Chameleon won't do anything, and will just show the RecyclerView.

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultState="LOADING"
app:defaultChameleonState="LOADING"
app:emptyButtonBackgroundColor="@color/colorPrimary"
app:emptyButtonText="+Add Chameleon"
app:emptyButtonTextColor="#ffffff"
Expand Down
2 changes: 0 additions & 2 deletions chameleon/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.github.dcendents.android-maven'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ open class Chameleon(context: Context?, attrs: AttributeSet?) : ConstraintLayout
it.getColor(R.styleable.Chameleon_progressBackgroundColor, ContextCompat.getColor(context, R.color.colorLoadingBackground)),
it.getBoolean(R.styleable.Chameleon_isShowContentWhenLoadingState, false),
it.getBoolean(R.styleable.Chameleon_isLargeProgress, false),
stateFromInt(it.getInt(R.styleable.Chameleon_defaultState, -1))
stateFromInt(it.getInt(R.styleable.Chameleon_defaultChameleonState, -1))
)
}

Expand Down
2 changes: 1 addition & 1 deletion chameleon/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<attr name="isShowContentWhenLoadingState" format="boolean" />
<attr name="isLargeProgress" format="boolean" />

<attr name="defaultState" format="enum">
<attr name="defaultChameleonState" format="enum">
<enum name="LOADING" value="1" />
<enum name="ERROR" value="2" />
<enum name="EMPTY" value="3" />
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ':app', ':chameleon'

gradle.ext.set('versionCode', 9)
gradle.ext.set('versionName', '0.1.1')
gradle.ext.set('versionCode', 10)
gradle.ext.set('versionName', '0.1.2')

gradle.ext.set('minSdk', 15)
gradle.ext.set('targetSdk', 28)
Expand Down

0 comments on commit 11b8188

Please sign in to comment.