mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 14:31:30 +01:00
parent
0c3e263c47
commit
1559f96838
5 changed files with 47 additions and 0 deletions
|
@ -4,6 +4,7 @@ import android.Manifest
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
|
import android.graphics.PorterDuff
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
|
@ -13,6 +14,8 @@ import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.AdapterView
|
import android.widget.AdapterView
|
||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
|
import android.widget.SeekBar
|
||||||
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
|
@ -116,6 +119,7 @@ class SettingsFragmentLauncher : Fragment(), UIObject {
|
||||||
|
|
||||||
settings_launcher_container.setBackgroundColor(dominantColor)
|
settings_launcher_container.setBackgroundColor(dominantColor)
|
||||||
setButtonColor(settings_theme_custom_button_select, vibrantColor)
|
setButtonColor(settings_theme_custom_button_select, vibrantColor)
|
||||||
|
settings_seekbar_sensitivity.progressDrawable.setColorFilter(vibrantColor, PorterDuff.Mode.SRC_IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setOnClicks() {
|
override fun setOnClicks() {
|
||||||
|
@ -155,6 +159,20 @@ class SettingsFragmentLauncher : Fragment(), UIObject {
|
||||||
intendedSettingsPause = true
|
intendedSettingsPause = true
|
||||||
activity!!.recreate()
|
activity!!.recreate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings_seekbar_sensitivity.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
|
||||||
|
override fun onProgressChanged(p0: SeekBar?, p1: Int, p2: Boolean) {
|
||||||
|
}
|
||||||
|
override fun onStartTrackingTouch(p0: SeekBar?) {
|
||||||
|
}
|
||||||
|
override fun onStopTrackingTouch(p0: SeekBar?) {
|
||||||
|
Toast.makeText(
|
||||||
|
context,
|
||||||
|
"Smooth Seekbar current progress ${p0?.progress}",
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun resetToCustomTheme(context: Activity) {
|
fun resetToCustomTheme(context: Activity) {
|
||||||
|
|
|
@ -201,6 +201,29 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="8sp">
|
android:paddingLeft="8sp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settings_launcher_text_sensitivity"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/settings_launcher_sensitivity"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/settings_seekbar_sensitivity"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:progress="50" />
|
||||||
|
|
||||||
|
</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
|
<TextView
|
||||||
android:id="@+id/settings_launcher_text_auto_launch"
|
android:id="@+id/settings_launcher_text_auto_launch"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -80,6 +80,8 @@
|
||||||
<string name="settings_launcher_enable_double">Doppelte Wischaktionen</string>
|
<string name="settings_launcher_enable_double">Doppelte Wischaktionen</string>
|
||||||
<string name="settings_launcher_auto_launch">Suchergebisse launchen</string>
|
<string name="settings_launcher_auto_launch">Suchergebisse launchen</string>
|
||||||
|
|
||||||
|
<string name="settings_launcher_sensitivity">Empfindlichkeit</string>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- Settings : Meta
|
- Settings : Meta
|
||||||
|
|
|
@ -80,6 +80,8 @@
|
||||||
<string name="settings_launcher_enable_double">Double balayage actions</string>
|
<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_launch">Lancer apps par recherche</string>
|
||||||
|
|
||||||
|
<string name="settings_launcher_sensitivity">Sensibilité</string>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- Settings : Meta
|
- Settings : Meta
|
||||||
|
|
|
@ -100,6 +100,8 @@
|
||||||
<string name="settings_launcher_enable_double">Double swipe actions</string>
|
<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_launch">Launch search results</string>
|
||||||
|
|
||||||
|
<string name="settings_launcher_sensitivity">Sensitivity</string>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- Settings : Meta
|
- Settings : Meta
|
||||||
|
|
Loading…
Add table
Reference in a new issue