Skip to content

Commit

Permalink
Refactored attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
vlonjat-gashi committed Feb 1, 2017
1 parent c433118 commit 6b0c6d6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void init(AttributeSet attrs) {
typedArray.getDimensionPixelSize(R.styleable.ProgressActivity_loadingProgressBarHeight, 108);

loadingStateProgressBarColor =
typedArray.getColor(R.styleable.ProgressActivity_loadingStateProgressBarColor, Color.RED);
typedArray.getColor(R.styleable.ProgressActivity_loadingProgressBarColor, Color.RED);

loadingStateBackgroundColor =
typedArray.getColor(R.styleable.ProgressActivity_loadingBackgroundColor, Color.TRANSPARENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private void init(AttributeSet attrs) {
typedArray.getDimensionPixelSize(R.styleable.ProgressActivity_loadingProgressBarHeight, 108);

loadingStateProgressBarColor =
typedArray.getColor(R.styleable.ProgressActivity_loadingStateProgressBarColor, Color.RED);
typedArray.getColor(R.styleable.ProgressActivity_loadingProgressBarColor, Color.RED);

loadingStateBackgroundColor =
typedArray.getColor(R.styleable.ProgressActivity_loadingBackgroundColor, Color.TRANSPARENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private void init(AttributeSet attrs) {
typedArray.getDimensionPixelSize(R.styleable.ProgressActivity_loadingProgressBarHeight, 108);

loadingStateProgressBarColor =
typedArray.getColor(R.styleable.ProgressActivity_loadingStateProgressBarColor, Color.RED);
typedArray.getColor(R.styleable.ProgressActivity_loadingProgressBarColor, Color.RED);

loadingStateBackgroundColor =
typedArray.getColor(R.styleable.ProgressActivity_loadingBackgroundColor, Color.TRANSPARENT);
Expand Down
40 changes: 20 additions & 20 deletions library/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
<resources>

<declare-styleable name="ProgressActivity">
<attr name="loadingProgressBarWidth" format="dimension"/>
<attr name="loadingProgressBarHeight" format="dimension"/>
<attr name="loadingBackgroundColor" format="color"/>
<attr name="loadingStateProgressBarColor" format="color"/>
<attr name="loadingProgressBarWidth" format="dimension" />
<attr name="loadingProgressBarHeight" format="dimension" />
<attr name="loadingProgressBarColor" format="color" />
<attr name="loadingBackgroundColor" format="color" />

<attr name="emptyImageWidth" format="dimension"/>
<attr name="emptyImageHeight" format="dimension"/>
<attr name="emptyTitleTextSize" format="dimension"/>
<attr name="emptyContentTextSize" format="dimension"/>
<attr name="emptyTitleTextColor" format="color"/>
<attr name="emptyContentTextColor" format="color"/>
<attr name="emptyBackgroundColor" format="color"/>
<attr name="emptyImageWidth" format="dimension" />
<attr name="emptyImageHeight" format="dimension" />
<attr name="emptyTitleTextSize" format="dimension" />
<attr name="emptyContentTextSize" format="dimension" />
<attr name="emptyTitleTextColor" format="color" />
<attr name="emptyContentTextColor" format="color" />
<attr name="emptyBackgroundColor" format="color" />

<attr name="errorImageWidth" format="dimension"/>
<attr name="errorImageHeight" format="dimension"/>
<attr name="errorTitleTextSize" format="dimension"/>
<attr name="errorContentTextSize" format="dimension"/>
<attr name="errorTitleTextColor" format="color"/>
<attr name="errorContentTextColor" format="color"/>
<attr name="errorButtonTextColor" format="color"/>
<attr name="errorButtonBackgroundColor" format="color"/>
<attr name="errorBackgroundColor" format="color"/>
<attr name="errorImageWidth" format="dimension" />
<attr name="errorImageHeight" format="dimension" />
<attr name="errorTitleTextSize" format="dimension" />
<attr name="errorContentTextSize" format="dimension" />
<attr name="errorTitleTextColor" format="color" />
<attr name="errorContentTextColor" format="color" />
<attr name="errorButtonTextColor" format="color" />
<attr name="errorButtonBackgroundColor" format="color" />
<attr name="errorBackgroundColor" format="color" />
</declare-styleable>
</resources>
4 changes: 2 additions & 2 deletions sample/src/main/res/layout/activity_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
progressActivity:emptyContentTextColor="#FFFFFF"
progressActivity:emptyTitleTextColor="#FFFFFF"
progressActivity:errorBackgroundColor="#42a5f5"
progressActivity:errorButtonBackgroundColor="#9C27B0"
progressActivity:errorButtonTextColor="#FFFFFF"
progressActivity:errorContentTextColor="#FFFFFF"
progressActivity:errorTitleTextColor="#FFFFFF"
progressActivity:errorButtonBackgroundColor="#9C27B0"
progressActivity:loadingBackgroundColor="#FFFFFF"
progressActivity:loadingStateProgressBarColor="#9C27B0">
progressActivity:loadingProgressBarColor="#9C27B0">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
Expand Down

0 comments on commit 6b0c6d6

Please sign in to comment.