search: improve keyboard management

Remove the janky requestFocus/clearFocus called on SearchFragment
and replace them with InputMethodManager calls. This is generally
more user friendly, especially when returning to search from
navigation.
This commit is contained in:
OxygenCobalt
2021-08-22 17:59:07 -06:00
parent 6c5a68c929
commit 19e2fcbb90
26 changed files with 85 additions and 110 deletions
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".recycler.viewholders.HeaderViewHolder">
tools:context=".recycler.HeaderViewHolder">
<data>
+1 -1
View File
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".recycler.viewholders.AlbumViewHolder">
tools:context=".recycler.AlbumViewHolder">
<data>
+1 -1
View File
@@ -16,7 +16,7 @@
<TextView
android:id="@+id/song_track"
android:layout_width="wrap_content"
android:minWidth="@dimen/width_track_number"
android:minWidth="@dimen/size_track_number"
android:layout_height="wrap_content"
android:contentDescription="@{@string/desc_track_number(song.track)}"
android:gravity="center"
+1 -1
View File
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".recycler.viewholders.ArtistViewHolder">
tools:context=".recycler.ArtistViewHolder">
<data>
+1 -1
View File
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".recycler.viewholders.SongViewHolder">
tools:context=".recycler.SongViewHolder">
<data>
+1 -1
View File
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".recycler.viewholders.GenreViewHolder">
tools:context=".recycler.GenreViewHolder">
<data>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".recycler.viewholders.HeaderViewHolder">
tools:context=".recycler.HeaderViewHolder">
<data>
+1 -1
View File
@@ -2,7 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".recycler.viewholders.SongViewHolder">
tools:context=".recycler.SongViewHolder">
<data>
+2 -9
View File
@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
TODO: Redo these dimens to line up with the 8dp grid. Tiny spacing can be used for
internal elements, but micro spacing needs to be phased out.
-->
<!-- Spacing Namespace | Dimens for padding/margin attributes -->
<dimen name="spacing_small">8dp</dimen>
<dimen name="spacing_medium">16dp</dimen>
@@ -13,10 +8,6 @@
<dimen name="spacing_mid_huge">48dp</dimen>
<dimen name="spacing_insane">128dp</dimen>
<!-- Width Namespace | Width for UI elements -->
<dimen name="width_track_number">32dp</dimen>
<dimen name="width_fast_scroll">20dp</dimen>
<!-- Size Namespace | Width & Heights for UI elements -->
<dimen name="size_btn_small">48dp</dimen>
<dimen name="size_btn_large">64dp</dimen>
@@ -32,6 +23,8 @@
<dimen name="size_small_unb_ripple">20dp</dimen>
<dimen name="size_unb_ripple">24dp</dimen>
<dimen name="size_track_number">32dp</dimen>
<!-- Text Size Namespace | Text Sizes -->
<dimen name="text_size_small">16sp</dimen>
<dimen name="text_size_medium">18sp</dimen>