-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add attributes to customize icon size and background
- Loading branch information
1 parent
7fe161e
commit 09b83c5
Showing
31 changed files
with
183 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 13 additions & 17 deletions
30
ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Helper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
package com.chinalwb.are.styles; | ||
|
||
import com.chinalwb.are.Constants; | ||
|
||
import android.view.View; | ||
import android.widget.ImageView; | ||
|
||
public class ARE_Helper { | ||
|
||
/** | ||
* Updates the check status. | ||
* | ||
* @param areStyle | ||
* @param checked | ||
*/ | ||
public static void updateCheckStatus(IARE_Style areStyle, boolean checked) { | ||
areStyle.setChecked(checked); | ||
View imageView = areStyle.getImageView(); | ||
int color = checked ? Constants.CHECKED_COLOR : Constants.UNCHECKED_COLOR; | ||
imageView.setBackgroundColor(color); | ||
} | ||
|
||
|
||
/** | ||
* Updates the check status. | ||
* | ||
* @param areStyle | ||
* @param checked | ||
*/ | ||
public static void updateCheckStatus(IARE_Style areStyle, boolean checked) { | ||
areStyle.setChecked(checked); | ||
View imageView = areStyle.getImageView(); | ||
imageView.setSelected(checked); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.