Obsolete
Status Update
Comments
da...@gmail.com <da...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit b9b1326edfe38588a9882e1ee624798966c5686a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Oct 06 16:49:53 2021
Clear focus on Fragments animating out
Since moving to the new state manager, fragment now explicitly handle
focus where in the old world they could ignore it altogether. This
change has the side effect that other things affected by focus (i.e.
soft keyboard input) are affect as well. In particular when we
requestFocus we update the input request, but since we never clear it
users have to manually remove the input.
When we are animating a fragment view out, since we will no longer be
using the exiting view, let clear the focus of before we remove it from
the fragment.
RelNote: "The keyboard will now close automatically when going from
a fragment with an open keyboard to a fragment with a recycler view."
Test: tested in sample app from bug
Bug: 196852211
Change-Id: I8b842dd9a421cfbc9189014b802f5e4b6b9c2a47
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1847143
Branch: androidx-main
commit b9b1326edfe38588a9882e1ee624798966c5686a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Oct 06 16:49:53 2021
Clear focus on Fragments animating out
Since moving to the new state manager, fragment now explicitly handle
focus where in the old world they could ignore it altogether. This
change has the side effect that other things affected by focus (i.e.
soft keyboard input) are affect as well. In particular when we
requestFocus we update the input request, but since we never clear it
users have to manually remove the input.
When we are animating a fragment view out, since we will no longer be
using the exiting view, let clear the focus of before we remove it from
the fragment.
RelNote: "The keyboard will now close automatically when going from
a fragment with an open keyboard to a fragment with a recycler view."
Test: tested in sample app from bug
Bug: 196852211
Change-Id: I8b842dd9a421cfbc9189014b802f5e4b6b9c2a47
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
en...@google.com <en...@google.com>
[Deleted User] <[Deleted User]> #3
This has been fixed internally and will be available in the Fragment 1.4.0-beta01
release.
ce...@gmail.com <ce...@gmail.com> #4
The issue still persist in API version 27 and below in Fragment 1.4.0
ro...@google.com <ro...@google.com>
cl...@google.com <cl...@google.com>
da...@gmail.com <da...@gmail.com> #5
I've filed this issue before TextInputLayout was released. Which is now a good alternative.
Still think any widget in Android platform should be themizable fully.
Still think any widget in Android platform should be themizable fully.
si...@google.com <si...@google.com>
sa...@google.com <sa...@google.com> #6
Thank you for your feedback. We assure you that we are doing our best to address the issue reported, however our product team has shifted work priority that doesn't include this issue. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with latest bug report here https://goo.gl/TbMiIO .
Description
1. Use setError on a TextView or EditView
2. See the error Tooltip show up.
3. Look for how to style that tooltip
4. end up here:
5. don't liking the library in the accepted solution
6. dig in the code of TextView a little
7. realize you can't really create a customized version of the tooltip that works like the default one
Expected result:
1. you can use an attribute in theme to change the tooltip style / background
2. you can also change it directly on the TextView with an attribute
Android SDK version: Any
Devices: Any
I think that a custom widget that works like the default one can't be achieved.
Assuming I'm extending an EditText with a custom widget, this ares the steps I should take and how to do them
- override setError methods with your own
- create your custom PopupWindow
- showing the tooltip only when the view is focused: add onFocusChanged listener and operate there
- hiding the error when the user change the text: add TextWatcher listener and clear the error when it change -- the framework does fancy things here and apparently I do not receive ALL the text changes notifications from the TextWatcher
- override methods in the edit text (setFrame?) to reposition the error tooltip as needed
- show an icon: override setCompountDrawable and manually handle them for being able to draw your own icon in place of the right drawable
- error being set before the view is attached: keep a flag in your custom view to know that you should show the tooltip when attached to the window
- scroll to the (first) view for which setError has been called: I've no idea on how to achieve this right now
Request:
if you fix this please provide a Compat version of the TextView/EditText so that we can make use of it in previous versions too.
Secondary Request:
please provide instruction on how to properly create our custom EditText with a custom popup style