mirror of
https://github.com/alesimula/Murine-launcher.git
synced 2026-10-28 09:43:42 +00:00
DRAWER - add drawer search autofocus
This commit is contained in:
1 parent
f7e2f56148
commit
17740a9064
7 files changed
+25
-3
No files matched your search
@@ -8,14 +8,14 @@
|
||||
# both accept several names separated by ', ' and are shown together,
|
||||
# in that order. Omit both if nobody has reviewed it
|
||||
|
||||
total: 145
|
||||
total: 147
|
||||
|
||||
languages:
|
||||
- code: en
|
||||
name: English
|
||||
native: English
|
||||
status: reviewed
|
||||
strings: 145
|
||||
strings: 147
|
||||
by_git: alesimula
|
||||
note: Source language
|
||||
|
||||
@@ -23,7 +23,7 @@ languages:
|
||||
name: Italian
|
||||
native: Italiano
|
||||
status: reviewed
|
||||
strings: 145
|
||||
strings: 147
|
||||
by_git: alesimula
|
||||
note: Dev's language
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
<string name="pref_drawer_grid_width_override_title">Larghezza griglia personalizzata</string>
|
||||
<string name="pref_drawer_grid_width_override_summary">Usa un numero personalizzato di colonne nel cassetto app</string>
|
||||
<string name="pref_drawer_padding_title">Spaziatura laterale</string>
|
||||
<string name="pref_drawer_search_autofocus_title">Ricerca automatica</string>
|
||||
<string name="pref_drawer_search_autofocus_summary">Apri la tastiera all’apertura del cassetto app</string>
|
||||
|
||||
<string name="pref_blur_preview_title">Sfocatura modalità anteprima</string>
|
||||
<string name="pref_blur_preview_desc">Sfoca lo sfondo durante il trascinamento di icone e widget</string>
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
<string name="pref_drawer_grid_width_override_title">Override grid width</string>
|
||||
<string name="pref_drawer_grid_width_override_summary">Use a custom number of columns in the app drawer</string>
|
||||
<string name="pref_drawer_padding_title">Side padding</string>
|
||||
<string name="pref_drawer_search_autofocus_title">Autofocus search</string>
|
||||
<string name="pref_drawer_search_autofocus_summary">Open the keyboard when the app drawer opens</string>
|
||||
|
||||
<string name="pref_blur_preview_title">Blur preview mode</string>
|
||||
<string name="pref_blur_preview_desc">Blur wallpaper while dragging icons and widgets</string>
|
||||
|
||||
@@ -64,4 +64,13 @@
|
||||
app:showTicks="true" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_subcategory_options">
|
||||
<SwitchPreferenceCompat
|
||||
android:key="pref_drawer_search_autofocus"
|
||||
android:title="@string/pref_drawer_search_autofocus_title"
|
||||
android:summary="@string/pref_drawer_search_autofocus_summary"
|
||||
android:persistent="true"
|
||||
android:defaultValue="false" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
@@ -21,6 +21,7 @@ public final class SettingsDrawerFragment: AbstractSettingsFragment() {
|
||||
const val GRID_SIZE_WIDTH_DRAWER_OVERRIDE_SWITCH: String = "pref_grid_size_width_drawer_override_switch"
|
||||
const val GRID_SIZE_WIDTH_DRAWER_OVERRIDE: String = "pref_grid_size_width_drawer_override"
|
||||
const val DRAWER_PADDING: String = "pref_drawer_padding"
|
||||
const val SEARCH_AUTOFOCUS: String = "pref_drawer_search_autofocus"
|
||||
}
|
||||
|
||||
override fun getPreferenceScreenResId() = R.xml.murine_prefs_drawer
|
||||
|
||||
@@ -1341,6 +1341,12 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
mAllAppsSessionLogId = null;
|
||||
}
|
||||
|
||||
if (ALL_APPS.equals(state) && !ALL_APPS.equals(mPrevLauncherState)
|
||||
&& LauncherPrefs.DRAWER_SEARCH_AUTOFOCUS.get(this)) {
|
||||
ExtendedEditText searchInput = mAppsView.getSearchUiManager().getEditText();
|
||||
if (searchInput != null) searchInput.showKeyboard();
|
||||
}
|
||||
|
||||
// Set screen title for Talkback
|
||||
setTitle(state.getTitle());
|
||||
}
|
||||
|
||||
@@ -315,6 +315,8 @@ constructor(@ApplicationContext private val encryptedContext: Context) {
|
||||
@JvmField
|
||||
val DRAWER_PADDING = backedUpItem(SettingsDrawerFragment.DRAWER_PADDING, 100)
|
||||
@JvmField
|
||||
val DRAWER_SEARCH_AUTOFOCUS = backedUpItem(SettingsDrawerFragment.SEARCH_AUTOFOCUS, false)
|
||||
@JvmField
|
||||
val ICON_SIZE = backedUpItem(SettingsIconsFragment.ICON_SIZE_KEY, 100)
|
||||
@JvmField
|
||||
val ICON_LABEL_SIZE = backedUpItem(SettingsIconsFragment.ICON_LABEL_SIZE_KEY, 100)
|
||||
|
||||
Reference in new issue
Block a user