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

Commit cad10680 authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Fix visibility propagation check." into lmp-dev

parents 9bcc6e83 6ceac2ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ import android.view.ViewGroup;
 */
public abstract class Visibility extends Transition {

    private static final String PROPNAME_VISIBILITY = "android:visibility:visibility";
    static final String PROPNAME_VISIBILITY = "android:visibility:visibility";
    private static final String PROPNAME_PARENT = "android:visibility:parent";
    private static final String PROPNAME_SCREEN_LOCATION = "android:visibility:screenLocation";

+5 −1
Original line number Diff line number Diff line
@@ -42,7 +42,11 @@ public abstract class VisibilityPropagation extends TransitionPropagation {
    @Override
    public void captureValues(TransitionValues values) {
        View view = values.view;
        values.values.put(PROPNAME_VISIBILITY, view.getVisibility());
        Integer visibility = (Integer) values.values.get(Visibility.PROPNAME_VISIBILITY);
        if (visibility == null) {
            visibility = view.getVisibility();
        }
        values.values.put(PROPNAME_VISIBILITY, visibility);
        int[] loc = new int[2];
        view.getLocationOnScreen(loc);
        loc[0] += Math.round(view.getTranslationX());