Skip to content

Commit

Permalink
Merge branch 'hotfix/fix_vector_bug'
Browse files Browse the repository at this point in the history
  • Loading branch information
sangcomz committed Sep 7, 2018
2 parents 7fc459d + 3f7b7ac commit f9c859d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
app:errorButtonText="Retry"
app:errorButtonTextColor="#ffffff"
app:errorButtonTextSize="12sp"
app:errorDrawable="@drawable/ic_error"
app:errorSubText="@string/sub_error"
app:errorText="@string/error"
app:isLargeProgress="true"
Expand Down
12 changes: 6 additions & 6 deletions chameleon/src/main/java/xyz/sangcomz/chameleon/Chameleon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ open class Chameleon(context: Context?, attrs: AttributeSet?) : ConstraintLayout
it.getString(R.styleable.Chameleon_emptySubText) ?: "empty content",
it.getColor(R.styleable.Chameleon_emptySubTextColor, ContextCompat.getColor(context, R.color.colorSubText)),
it.getDimension(R.styleable.Chameleon_emptySubTextSize, context.resources.getDimension(R.dimen.sub_text_size)),
it.getResourceId(R.styleable.Chameleon_emptyDrawable, -1).getDrawable(context)
?: R.drawable.ic_empty.getDrawable(context),
it.getResourceId(R.styleable.Chameleon_emptyDrawable, R.drawable.ic_chameleon_empty).getDrawable(context),
it.getString(R.styleable.Chameleon_emptyButtonText) ?: "retry",
it.getColor(R.styleable.Chameleon_emptyButtonTextColor, ContextCompat.getColor(context, R.color.colorTitleText)),
it.getDimension(R.styleable.Chameleon_emptyButtonTextSize, context.resources.getDimension(R.dimen.title_text_size)),
Expand All @@ -76,8 +75,7 @@ open class Chameleon(context: Context?, attrs: AttributeSet?) : ConstraintLayout
it.getString(R.styleable.Chameleon_errorSubText) ?: "error content",
it.getColor(R.styleable.Chameleon_errorSubTextColor, ContextCompat.getColor(context, R.color.colorSubText)),
it.getDimension(R.styleable.Chameleon_errorSubTextSize, context.resources.getDimension(R.dimen.sub_text_size)),
it.getResourceId(R.styleable.Chameleon_errorDrawable, -1).getDrawable(context)
?: R.drawable.ic_error.getDrawable(context),
it.getResourceId(R.styleable.Chameleon_errorDrawable, R.drawable.ic_chameleon_error).getDrawable(context),
it.getString(R.styleable.Chameleon_errorButtonText) ?: "retry",
it.getColor(R.styleable.Chameleon_errorButtonTextColor, ContextCompat.getColor(context, R.color.colorTitleText)),
it.getDimension(R.styleable.Chameleon_errorButtonTextSize, context.resources.getDimension(R.dimen.title_text_size)),
Expand Down Expand Up @@ -289,7 +287,8 @@ open class Chameleon(context: Context?, attrs: AttributeSet?) : ConstraintLayout
}
STATE.ERROR -> {
chameleonAttr?.let {
setStateImageView(it.errorDrawable ?: R.drawable.ic_error.getDrawable(context))
setStateImageView(it.errorDrawable
?: R.drawable.ic_chameleon_error.getDrawable(context))
setStateTitleTextView(it.errorText, it.errorTextSize, it.errorTextColor)
setStateSubTextView(it.errorSubText, it.errorSubTextSize, it.errorSubTextColor)

Expand All @@ -311,7 +310,8 @@ open class Chameleon(context: Context?, attrs: AttributeSet?) : ConstraintLayout
}
STATE.EMPTY -> {
chameleonAttr?.let {
setStateImageView(it.emptyDrawable ?: R.drawable.ic_empty.getDrawable(context))
setStateImageView(it.emptyDrawable
?: R.drawable.ic_chameleon_empty.getDrawable(context))
setStateTitleTextView(it.emptyText, it.emptyTextSize, it.emptyTextColor)
setStateSubTextView(it.emptySubText, it.emptySubTextSize, it.emptySubTextColor)
if (it.useEmptyButton)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="72dp"
android:height="72dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="72dp"
android:height="72dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
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', 4)
gradle.ext.set('versionName', '0.0.4')
gradle.ext.set('versionCode', 7)
gradle.ext.set('versionName', '0.0.7')

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

0 comments on commit f9c859d

Please sign in to comment.