-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Android] Allow to update Entry Background (once established) #12227
Conversation
Added more samples to validate #12991 |
var backgroundDrawable = paint!.ToDrawable(platformView.Context); | ||
LayerDrawable layer = new LayerDrawable(new Drawable[] { backgroundDrawable!, previousDrawable! }); | ||
LayerDrawable layer = new LayerDrawable(new Drawable[] { backgroundDrawable!, defaultBackground! }); |
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.
Can we pull this background from android resources? This same update method is called by all the picker handlers and the searchbox as well. If we can localize all of this to the extension method and just load this drawable from the android resources then this would all just work and it'd be theme change safe.
I think we can pull the drawable for this from this
ContextCompat.GetDrawable(Context, Resource.Drawable.abc_edit_text_material);
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.
Answers needed.
var backgroundDrawable = paint!.ToDrawable(platformView.Context); | ||
LayerDrawable layer = new LayerDrawable(new Drawable[] { backgroundDrawable!, previousDrawable! }); | ||
LayerDrawable layer = new LayerDrawable(new Drawable[] { backgroundDrawable!, defaultBackground! }); |
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.
Try to avoid the use of !, are we sure this is not null, better wrap on an if that an NRE. What happens is null? do we need the new layer, do we exit the method? Do we create a new later with no drawable contents?
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
|
|
Hey guys ... just checking in on this issue since we updated VS last week and this issue is still happening??? Thank you Marshall |
I also cannot get this handler to work??? Will turn yellow when it gets focus but not to gray when it loses focus??? The code does get called normally and there is no exception from debugging???
|
Just following up to see if this is really fixed because it is not in my code??? |
Description of Change
Allow to update Entry Background.
Issues Fixed
Fixes #12212
Fixes #12991
Fixes #14600