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

Commit 3ea519db authored by Danny Epstein's avatar Danny Epstein
Browse files

Clean up FocusParkingViews

Put FocusParkingView first rather than last and update comment to
indicate that the FocusParkingView must be first. Use start rather
than left to position FocusParkingView first.

Bug: 131421840
Bug: 154540419
Test: manual

Change-Id: I89b9977e1be4722c1e922e360332aa9d631b9540
parent 81d4133d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -29,13 +29,12 @@
        android:orientation="horizontal"
        app:layout_constraintGuide_begin="@dimen/headsup_scrim_height"/>

    <!-- Include a FocusParkingView at the beginning or end. The rotary controller "parks" the
         focus here when the user navigates to another window. This is also used to prevent
         wrap-around which is why it must be first or last in Tab order. -->
    <!-- Include a FocusParkingView at the beginning. The rotary controller "parks" the focus here
         when the user navigates to another window. This is also used to prevent wrap-around. -->
    <com.android.car.ui.FocusParkingView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <View
+3 −4
Original line number Diff line number Diff line
@@ -148,10 +148,9 @@ public class NavigationBarViewFactory {
        CarNavigationBarView view = (CarNavigationBarView) View.inflate(mContext, barLayout,
                /* root= */ null);

        // Include a FocusParkingView at the end. The rotary controller "parks" the focus here when
        // the user navigates to another window. This is also used to prevent wrap-around which is
        // why it must be first or last in Tab order.
        view.addView(new FocusParkingView(mContext));
        // Include a FocusParkingView at the beginning. The rotary controller "parks" the focus here
        // when the user navigates to another window. This is also used to prevent wrap-around.
        view.addView(new FocusParkingView(mContext), 0);

        mCachedViewMap.put(type, view);
        return mCachedViewMap.get(type);