Merge "Fix keyboard navigation work in Settings home page" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8a2eb5e8bc
@@ -33,8 +33,7 @@
|
|||||||
android:id="@+id/homepage_container"
|
android:id="@+id/homepage_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:descendantFocusability="blocksDescendants">
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/contextual_cards_content"
|
android:id="@+id/contextual_cards_content"
|
||||||
@@ -55,7 +54,9 @@
|
|||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
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"/>
|
<include layout="@layout/search_bar"/>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@@ -90,5 +90,9 @@ public class SettingsHomepageActivity extends FragmentActivity {
|
|||||||
// The top padding is the height of action bar(48dp) + top/bottom margins(16dp)
|
// The top padding is the height of action bar(48dp) + top/bottom margins(16dp)
|
||||||
final int paddingTop = searchBarHeight + searchBarMargin * 2;
|
final int paddingTop = searchBarHeight + searchBarMargin * 2;
|
||||||
view.setPadding(0 /* left */, paddingTop, 0 /* right */, 0 /* bottom */);
|
view.setPadding(0 /* left */, paddingTop, 0 /* right */, 0 /* bottom */);
|
||||||
|
|
||||||
|
// Prevent inner RecyclerView gets focus and invokes scrolling.
|
||||||
|
view.setFocusableInTouchMode(true);
|
||||||
|
view.requestFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user