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

Commit 8870dcb4 authored by Hiroki Sato's avatar Hiroki Sato
Browse files

Fix keyboard navigation work in Settings home page

Bug: 156196960
Bug: 156565546
Test: manually confirmed tab or arrow key moves input focus.
Change-Id: Ic2eb6395b490c97c8d82722ce1ba3a79d535ade2
parent 82b99f14
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -33,8 +33,7 @@
            android:id="@+id/homepage_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:descendantFocusability="blocksDescendants">
            android:orientation="vertical">

            <FrameLayout
                android:id="@+id/contextual_cards_content"
@@ -55,7 +54,9 @@

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        android:layout_height="wrap_content"
        android:touchscreenBlocksFocus="false"
        android:keyboardNavigationCluster="false">
        <include layout="@layout/search_bar"/>
    </com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+5 −1
Original line number Diff line number Diff line
@@ -90,5 +90,9 @@ public class SettingsHomepageActivity extends FragmentActivity {
        // The top padding is the height of action bar(48dp) + top/bottom margins(16dp)
        final int paddingTop = searchBarHeight + searchBarMargin * 2;
        view.setPadding(0 /* left */, paddingTop, 0 /* right */, 0 /* bottom */);

        // Prevent inner RecyclerView gets focus and invokes scrolling.
        view.setFocusableInTouchMode(true);
        view.requestFocus();
    }
}