Let the focus go to the room list and the actions at the bottom, useful when navigating with the keyboard.

This commit is contained in:
Benoit Marty 2023-05-04 15:51:13 +02:00 committed by Benoit Marty
parent 36b1e9b5e4
commit c8fbb88511
6 changed files with 30 additions and 5 deletions

View File

@ -4,6 +4,9 @@
<style name="Widget.Vector.AppBarLayout" parent="Widget.MaterialComponents.AppBarLayout.Primary"> <style name="Widget.Vector.AppBarLayout" parent="Widget.MaterialComponents.AppBarLayout.Primary">
<item name="android:background">?vctr_toolbar_background</item> <item name="android:background">?vctr_toolbar_background</item>
<item name="elevation">4dp</item> <item name="elevation">4dp</item>
<!-- a11y -->
<item name="android:touchscreenBlocksFocus">false</item>
</style> </style>
</resources> </resources>

View File

@ -12,6 +12,9 @@
<item name="subtitleTextAppearance">@style/TextAppearance.Vector.Widget.ActionBarSubTitle</item> <item name="subtitleTextAppearance">@style/TextAppearance.Vector.Widget.ActionBarSubTitle</item>
<item name="navigationIconTint">?vctr_content_secondary</item> <item name="navigationIconTint">?vctr_content_secondary</item>
<!-- a11y -->
<item name="android:touchscreenBlocksFocus">false</item>
</style> </style>
<!-- Default toolbar style --> <!-- Default toolbar style -->
@ -43,10 +46,24 @@
<style name="Widget.Vector.Material3.Toolbar" parent="Widget.Material3.Toolbar" /> <style name="Widget.Vector.Material3.Toolbar" parent="Widget.Material3.Toolbar" />
<style name="Widget.Vector.Material3.CollapsingToolbar.Medium" parent="Widget.Material3.CollapsingToolbar.Medium"> <!-- CollapsingToolbar -->
<style name="Widget.Vector.CollapsingToolbar" parent="Widget.Material3.CollapsingToolbar">
<!-- a11y -->
<item name="android:touchscreenBlocksFocus">false</item>
</style>
<style name="Widget.Vector.CollapsingToolbar.Medium" parent="Widget.Material3.CollapsingToolbar.Medium">
<item name="expandedTitleTextAppearance">@style/TextAppearance.Vector.Title.Medium</item> <item name="expandedTitleTextAppearance">@style/TextAppearance.Vector.Title.Medium</item>
<item name="expandedTitleMarginBottom">20dp</item> <item name="expandedTitleMarginBottom">20dp</item>
<item name="collapsedTitleTextAppearance">@style/TextAppearance.Vector.Headline.Bold</item> <item name="collapsedTitleTextAppearance">@style/TextAppearance.Vector.Headline.Bold</item>
<!-- a11y -->
<item name="android:touchscreenBlocksFocus">false</item>
</style>
<style name="Widget.Vector.CollapsingToolbar.Large" parent="Widget.Material3.CollapsingToolbar.Large">
<!-- a11y -->
<item name="android:touchscreenBlocksFocus">false</item>
</style> </style>
</resources> </resources>

View File

@ -83,6 +83,9 @@
<item name="android:textViewStyle">@style/Widget.Vector.TextView.Body</item> <item name="android:textViewStyle">@style/Widget.Vector.TextView.Body</item>
<item name="materialButtonStyle">@style/Widget.Vector.Button</item> <item name="materialButtonStyle">@style/Widget.Vector.Button</item>
<item name="toolbarStyle">@style/Widget.Vector.Toolbar</item> <item name="toolbarStyle">@style/Widget.Vector.Toolbar</item>
<item name="collapsingToolbarLayoutStyle">@style/Widget.Vector.CollapsingToolbar</item>
<item name="collapsingToolbarLayoutMediumStyle">@style/Widget.Vector.CollapsingToolbar.Medium</item>
<item name="collapsingToolbarLayoutLargeStyle">@style/Widget.Vector.CollapsingToolbar.Large</item>
<item name="bottomNavigationStyle">@style/BottomNavigation.Vector</item> <item name="bottomNavigationStyle">@style/BottomNavigation.Vector</item>
<item name="searchViewStyle">@style/Widget.Vector.SearchView</item> <item name="searchViewStyle">@style/Widget.Vector.SearchView</item>
<item name="textInputStyle">@style/Widget.Vector.TextInputLayout</item> <item name="textInputStyle">@style/Widget.Vector.TextInputLayout</item>

View File

@ -83,6 +83,9 @@
<item name="android:textViewStyle">@style/Widget.Vector.TextView.Body</item> <item name="android:textViewStyle">@style/Widget.Vector.TextView.Body</item>
<item name="materialButtonStyle">@style/Widget.Vector.Button</item> <item name="materialButtonStyle">@style/Widget.Vector.Button</item>
<item name="toolbarStyle">@style/Widget.Vector.Toolbar</item> <item name="toolbarStyle">@style/Widget.Vector.Toolbar</item>
<item name="collapsingToolbarLayoutStyle">@style/Widget.Vector.CollapsingToolbar</item>
<item name="collapsingToolbarLayoutMediumStyle">@style/Widget.Vector.CollapsingToolbar.Medium</item>
<item name="collapsingToolbarLayoutLargeStyle">@style/Widget.Vector.CollapsingToolbar.Large</item>
<item name="bottomNavigationStyle">@style/BottomNavigation.Vector</item> <item name="bottomNavigationStyle">@style/BottomNavigation.Vector</item>
<item name="searchViewStyle">@style/Widget.Vector.SearchView</item> <item name="searchViewStyle">@style/Widget.Vector.SearchView</item>
<item name="textInputStyle">@style/Widget.Vector.TextInputLayout</item> <item name="textInputStyle">@style/Widget.Vector.TextInputLayout</item>

View File

@ -49,15 +49,14 @@
app:layout_constraintTop_toBottomOf="@id/syncStateView"> app:layout_constraintTop_toBottomOf="@id/syncStateView">
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
style="?attr/collapsingToolbarLayoutMediumStyle"
android:id="@+id/collapsing_toolbar" android:id="@+id/collapsing_toolbar"
style="@style/Widget.Vector.Material3.CollapsingToolbar.Medium"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutMediumSize" android:layout_height="?attr/collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed"> app:layout_scrollFlags="scroll|exitUntilCollapsed">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Widget.Vector.Material3.Toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:elevation="0dp" android:elevation="0dp"