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
fix(android): Fixed crash caused by reading View's "backgroundDisabledColor" if background/border properties are set #10744
Conversation
…ndDisableColor" if background/border properties are set - Also added new "TiCast" Java class which provides C#/Switft "as" keyword like support.
|
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.
LGTM!
For the bug - besides the complaint for formatting from Danger it looks good to me. I am OK with the introduction of the |
Closing in favor of #10393 NOTE: You should make another PR containing TiCast |
JIRA:
https://jira.appcelerator.org/browse/TIMOB-26841
Summary:
Fixed bug where if both a background color property and a border property was set, then reading the "backgroundDisabledColor" property would cause a crash.
Note:
@garymathews , @ypbnv , I added a new
TiCast.java
class used to provide a C#/Swiftas
keyword like functionality where if it's unable to cast to the given type, then it'll returnnull
. It allows us to do the following. What do you think?Note that I'd prefer to use generics more heavily, but Java generics cannot provide type information at runtime, making the below impossible. The only viable solution that I know of is to pass in a
Class<T>
type like I'm doing in this PR's code.Test:
TextField
now has a gray background.[INFO] : ### textField.backgroundDisabledColor: #FF888888