mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
parent
cd2a9ed619
commit
04ecd47a02
8 changed files with 47 additions and 13 deletions
|
@ -77,6 +77,7 @@ const val PREF_DATE_FORMAT = "dateFormat"
|
|||
|
||||
const val PREF_DOUBLE_ACTIONS_ENABLED = "enableDoubleActions"
|
||||
const val PREF_SEARCH_AUTO_LAUNCH = "searchAutoLaunch"
|
||||
const val PREF_SEARCH_AUTO_KEYBOARD = "searchAutoKeyboard"
|
||||
|
||||
const val PREF_SLIDE_SENSITIVITY = "slideSensitivity"
|
||||
|
||||
|
|
|
@ -6,12 +6,9 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.finnmglas.launcher.R
|
||||
import com.finnmglas.launcher.UIObject
|
||||
import com.finnmglas.launcher.dominantColor
|
||||
import com.finnmglas.launcher.*
|
||||
import com.finnmglas.launcher.list.forApp
|
||||
import com.finnmglas.launcher.list.intention
|
||||
import com.finnmglas.launcher.openSoftKeyboard
|
||||
import kotlinx.android.synthetic.main.list.*
|
||||
import kotlinx.android.synthetic.main.list_apps.*
|
||||
|
||||
|
@ -69,8 +66,8 @@ class ListFragmentApps : Fragment(), UIObject {
|
|||
}
|
||||
})
|
||||
|
||||
when (intention) {
|
||||
"view" -> openSoftKeyboard(context!!, list_apps_searchview)
|
||||
if (intention == "view" && launcherPreferences.getBoolean(PREF_SEARCH_AUTO_KEYBOARD, true)) {
|
||||
openSoftKeyboard(context!!, list_apps_searchview)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -115,6 +115,7 @@ class SettingsFragmentLauncher : Fragment(), UIObject {
|
|||
setSwitchColor(settings_launcher_switch_screen_timeout, vibrantColor)
|
||||
setSwitchColor(settings_launcher_switch_screen_full, vibrantColor)
|
||||
setSwitchColor(settings_launcher_switch_auto_launch, vibrantColor)
|
||||
setSwitchColor(settings_launcher_switch_auto_keyboard, vibrantColor)
|
||||
setSwitchColor(settings_launcher_switch_enable_double, vibrantColor)
|
||||
|
||||
settings_launcher_container.setBackgroundColor(dominantColor)
|
||||
|
@ -150,6 +151,13 @@ class SettingsFragmentLauncher : Fragment(), UIObject {
|
|||
.apply()
|
||||
}
|
||||
|
||||
settings_launcher_switch_auto_keyboard.isChecked = launcherPreferences.getBoolean(PREF_SEARCH_AUTO_KEYBOARD, true)
|
||||
settings_launcher_switch_auto_keyboard.setOnCheckedChangeListener { _, isChecked -> // Toggle double actions
|
||||
launcherPreferences.edit()
|
||||
.putBoolean(PREF_SEARCH_AUTO_KEYBOARD, isChecked)
|
||||
.apply()
|
||||
}
|
||||
|
||||
settings_launcher_switch_enable_double.isChecked = launcherPreferences.getBoolean(PREF_DOUBLE_ACTIONS_ENABLED, false)
|
||||
settings_launcher_switch_enable_double.setOnCheckedChangeListener { _, isChecked -> // Toggle double actions
|
||||
launcherPreferences.edit()
|
||||
|
@ -216,9 +224,7 @@ class SettingsFragmentLauncher : Fragment(), UIObject {
|
|||
.apply()
|
||||
}
|
||||
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) {
|
||||
|
||||
}
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) { }
|
||||
}
|
||||
|
||||
// Load values into the theme spinner
|
||||
|
@ -246,10 +252,7 @@ class SettingsFragmentLauncher : Fragment(), UIObject {
|
|||
2 -> if (getSavedTheme(activity!!) != "custom") resetToCustomTheme(activity!!)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) {
|
||||
|
||||
}
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) { }
|
||||
}
|
||||
|
||||
settings_seekbar_sensitivity.progress = launcherPreferences.getInt(PREF_SLIDE_SENSITIVITY, 2) * 4 / 100
|
||||
|
|
|
@ -246,6 +246,35 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16sp"
|
||||
android:gravity="top"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8sp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_launcher_text_start_keyboard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settings_launcher_auto_keyboard"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/settings_launcher_switch_auto_keyboard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
|
||||
<string name="settings_launcher_enable_double">Doppelte Wischaktionen</string>
|
||||
<string name="settings_launcher_auto_launch">Suchergebisse launchen</string>
|
||||
<string name="settings_launcher_auto_keyboard">Tastatur in Suche öffnen</string>
|
||||
|
||||
<string name="settings_launcher_sensitivity">Empfindlichkeit</string>
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@
|
|||
|
||||
<string name="settings_launcher_enable_double">Deslizar con dos dedos</string>
|
||||
<string name="settings_launcher_auto_launch">Auto-lanzar búsquedas</string>
|
||||
<string name="settings_launcher_auto_keyboard">Abrir teclado en búsqueda</string>
|
||||
|
||||
<string name="settings_launcher_sensitivity">Sensibilidad</string>
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
|
||||
<string name="settings_launcher_enable_double">Double balayage actions</string>
|
||||
<string name="settings_launcher_auto_launch">Lancer apps par recherche</string>
|
||||
<string name="settings_launcher_auto_keyboard">Ouvrir clavier en recherche</string>
|
||||
|
||||
<string name="settings_launcher_sensitivity">Sensibilité</string>
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
|
||||
<string name="settings_launcher_enable_double">Double swipe actions</string>
|
||||
<string name="settings_launcher_auto_launch">Launch search results</string>
|
||||
<string name="settings_launcher_auto_keyboard">Start keyboard for search</string>
|
||||
|
||||
<string name="settings_launcher_sensitivity">Sensitivity</string>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue