Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean hasSubscribed = getValueFromJSON;
- boolean isActive = getValueFromJSON;
- String serviceType = getValueFromJSON
- private boolean hasSubscribed(){
- return hasSubscribed;
- }
- private boolean isActive(){
- return isActive;
- }
- private String serviceType(){
- return serviceType;
- }
- private void drawButton(){
- if (hasSubscribed() && !isActive()) {
- SHOW DISABLED RED BUTTON WITH TEXT SUBSCRIBED
- } else if (!hasSubscribed() && isActive()) {
- SHOW ENABLED RED BUTTON WITH TEXT SUBSCRIBE
- } else if (hasSubscribed() && isActive()) {
- if (serviceType().equalsIgnoreCase("F")) {
- SHOW DISABLED RED BUTTON WITH TEXT SUBSCRIBED
- } else {
- SHOW ENABLED GREEN BUTTON WITH TEXT RENEW
- }
- } else {
- SHOW ENABLED RED BUTTON WITH TEXT SUBSCRIBE
- }
- }
Add Comment
Please, Sign In to add comment