afaict, refreshDrawableState only sets the appropriate back-end bits to change
the state but does not request a redraw. For example, refreshDrawableState
eventually calls Drawable.setState, whose docs specify:
If the new state you are supplying causes the appearance of the
Drawable to change, then it is responsible for calling invalidateSelf
in order to have itself redrawn, and true will be returned from
this function.
Notably, there are no other calls to invalidate in the call hierarchy so I
added one.
The reason this (sometimes) worked before is because the views would be
invalidated in some other way, e.g. setDrawable would be called.
Without this patch, the next patch would update the reload menu icon on press
(i.e. another invalidate call) but not when the tab was switched from
non-private to private.
I believe I just used an IDE to update the files last time, meaning the
template never got updated.
This was originally implemented but no longer used in bug 1177611.
In editors (Eclipse and IntelliJ), Android View sub-classes are created
in a "Bridging" mock context. There is no ambient GeckoApplication in
this case. It's already okay for the LWT to be null; let's loosen the
requirement that there be an ambient GeckoApplication to let these View
sub-classes render in editors.
This lands the widget/Themed*.java sources into the tree and provides
a simple script for regenerating them in the source tree. Use it
like:
<edit mobile/android/base/widget/ThemedView.java.frag>
$ ./mach python mobile/android/base/widget/generate_themed_views.py
$ hg diff
... changes to Themed*java
This lands the widget/Themed*.java sources into the tree and provides
a simple script for regenerating them in the source tree. Use it
like:
<edit mobile/android/base/widget/ThemedView.java.frag>
$ ./mach python mobile/android/base/widget/generate_themed_views.py
$ hg diff
... changes to Themed*java
This lands the widget/Themed*.java sources into the tree and provides
a simple script for regenerating them in the source tree. Use it
like:
<edit mobile/android/base/widget/ThemedView.java.frag>
$ ./mach python mobile/android/base/widget/generate_themed_views.py
$ hg diff
... changes to Themed*java