New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the ability to set the background color #35
Conversation
Added 2 methods for setting the background color of the Elastic view. It should take in either an int color or a String and parse the color. If the string is null or the parsing fails, nothing will be set and it will retain the original color
@@ -107,5 +107,33 @@ public void onEnterAnimationFinished() { | |||
|
|||
// Do further actions if necessary | |||
} | |||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove that comment, it's not really necessary
Thanks for the tips. Were you wanting me to change the code prior to merge? Or were you just offering advice? |
That's better if you change it, it should be quick to do it ;) |
Adjusted text and changed catch argument. Omitted an e.printStackTrace() as I was unsure if it was desired. Let me know if you want it implemented.
Updated with said fixes. Let me know if you need anything else changed on there, I will be happy to do it. |
* Color.parseColor(string) | ||
*/ | ||
public void setBackgroundColor(String passedColor) { | ||
if(passedColor == null){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this if
needs a space between itself and the parenthesis (like the rest of the code).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just missing if (passedColor == null)
(adding a white space) and it's good to go.
e.printStackTrace(); under catch for null Strings or bad color parsing strings sent
Added the ability to set the background color Signed-off-by: f7d <vp7@usa.com>
Added the ability to set the background color Signed-off-by: f7d <vp7@usa.com>
Added 2 methods for setting the background color of the Elastic view. It should take in either an int color or a String and parse the color. If the string is null or the parsing fails, nothing will be set and it will retain the original color