Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 350f0a63 authored by Philip Milne's avatar Philip Milne
Browse files

Expose to the platform the ability to pick up changes in child visibility.

Also:

. use above, to flsuh GridLayout state when child's GONE state changes.

Change-Id: I8567c24b51b807f0625918d42b6847a5a350311d
parent 464b431a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -843,7 +843,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * @param child
     * @param child
     * @param visibility
     * @param visibility
     */
     */
    void onChildVisibilityChanged(View child, int visibility) {
    protected void onChildVisibilityChanged(View child, int visibility) {
        if (mTransition != null) {
        if (mTransition != null) {
            if (visibility == VISIBLE) {
            if (visibility == VISIBLE) {
                mTransition.showChild(this, child);
                mTransition.showChild(this, child);
+12 −0
Original line number Original line Diff line number Diff line
@@ -775,6 +775,18 @@ public class GridLayout extends ViewGroup {
        invalidateStructure();
        invalidateStructure();
    }
    }


    /**
     * We need to call invalidateStructure() when a child's GONE flag changes state.
     * This implementation is a catch-all, invalidating on any change in the visibility flags.
     *
     * @hide
     */
    @Override
    protected void onChildVisibilityChanged(View child, int visibility) {
        super.onChildVisibilityChanged(child, visibility);
        invalidateStructure();
    }

    // Measurement
    // Measurement


    private boolean isGone(View c) {
    private boolean isGone(View c) {