Compare commits

...

5 commits

Author SHA1 Message Date
Too Late (bot)
b32c9b916c
Merge 1817b4aa33 into 22633bdac3 2025-04-16 00:07:23 +00:00
Sven van de Lagemaat
1817b4aa33 Translated using Weblate (Dutch)
Currently translated at 14.2% (3 of 21 strings)

Translation: jrpie-Launcher/metadata
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/metadata/nl/
2025-04-16 00:07:18 +00:00
Sven van de Lagemaat
e0d55ca3a9 Added translation using Weblate (Dutch) 2025-04-16 00:07:18 +00:00
22633bdac3
try to fix #138
Some checks failed
Android CI / build (push) Has been cancelled
2025-04-15 19:24:23 +02:00
4f795289d5
improve English translation 2025-04-15 18:55:13 +02:00
6 changed files with 35 additions and 24 deletions

View file

@ -37,7 +37,7 @@ import java.util.Locale
class HomeActivity : UIObject, AppCompatActivity() { class HomeActivity : UIObject, AppCompatActivity() {
private lateinit var binding: HomeBinding private lateinit var binding: HomeBinding
private lateinit var touchGestureDetector: TouchGestureDetector private var touchGestureDetector: TouchGestureDetector? = null
private var sharedPreferencesListener = private var sharedPreferencesListener =
SharedPreferences.OnSharedPreferenceChangeListener { _, prefKey -> SharedPreferences.OnSharedPreferenceChangeListener { _, prefKey ->
@ -56,29 +56,12 @@ class HomeActivity : UIObject, AppCompatActivity() {
super<AppCompatActivity>.onCreate(savedInstanceState) super<AppCompatActivity>.onCreate(savedInstanceState)
super<UIObject>.onCreate() super<UIObject>.onCreate()
touchGestureDetector = TouchGestureDetector(
this, 0, 0,
LauncherPreferences.enabled_gestures().edgeSwipeEdgeWidth() / 100f
)
touchGestureDetector.updateScreenSize(windowManager)
// Initialise layout // Initialise layout
binding = HomeBinding.inflate(layoutInflater) binding = HomeBinding.inflate(layoutInflater)
setContentView(binding.root) setContentView(binding.root)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
binding.root.setOnApplyWindowInsetsListener { _, windowInsets ->
@Suppress("deprecation") // required to support API 29
val insets = windowInsets.systemGestureInsets
touchGestureDetector.setSystemGestureInsets(insets)
windowInsets
}
}
// Handle back key / gesture on Android 13+, cf. onKeyDown() // Handle back key / gesture on Android 13+, cf. onKeyDown()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
onBackInvokedDispatcher.registerOnBackInvokedCallback( onBackInvokedDispatcher.registerOnBackInvokedCallback(
@ -94,7 +77,7 @@ class HomeActivity : UIObject, AppCompatActivity() {
override fun onConfigurationChanged(newConfig: Configuration) { override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig) super.onConfigurationChanged(newConfig)
touchGestureDetector.updateScreenSize(windowManager) touchGestureDetector?.updateScreenSize(windowManager)
} }
override fun onStart() { override fun onStart() {
@ -188,8 +171,28 @@ class HomeActivity : UIObject, AppCompatActivity() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
touchGestureDetector.edgeWidth = /* This should be initialized in onCreate()
However on some devices there seems to be a bug where the touchGestureDetector
is not working properly after resuming the app.
Reinitializing the touchGestureDetector every time the app is resumed might help to fix that.
(see issue #138)
*/
touchGestureDetector = TouchGestureDetector(
this, 0, 0,
LauncherPreferences.enabled_gestures().edgeSwipeEdgeWidth() / 100f LauncherPreferences.enabled_gestures().edgeSwipeEdgeWidth() / 100f
).also {
it.updateScreenSize(windowManager)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
binding.root.setOnApplyWindowInsetsListener { _, windowInsets ->
@Suppress("deprecation") // required to support API 29
val insets = windowInsets.systemGestureInsets
touchGestureDetector?.setSystemGestureInsets(insets)
windowInsets
}
}
initClock() initClock()
updateSettingsFallbackButtonVisibility() updateSettingsFallbackButtonVisibility()
@ -230,7 +233,7 @@ class HomeActivity : UIObject, AppCompatActivity() {
} }
override fun onTouchEvent(event: MotionEvent): Boolean { override fun onTouchEvent(event: MotionEvent): Boolean {
touchGestureDetector.onTouchEvent(event) touchGestureDetector?.onTouchEvent(event)
return true return true
} }

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>

View file

@ -251,12 +251,12 @@
<string name="list_other_track_next">Music: Next</string> <string name="list_other_track_next">Music: Next</string>
<string name="list_other_track_previous">Music: Previous</string> <string name="list_other_track_previous">Music: Previous</string>
<string name="list_other_track_play_pause">Music: Play / Pause</string> <string name="list_other_track_play_pause">Music: Play / Pause</string>
<string name="list_other_expand_notifications_panel">Expand notifications panel</string> <string name="list_other_expand_notifications_panel">Expand Notifications Panel</string>
<string name="list_other_recent_apps">Recent Apps</string> <string name="list_other_recent_apps">Recent Apps</string>
<string name="list_other_nop">Do nothing</string> <string name="list_other_nop">Do Nothing</string>
<string name="list_other_lock_screen">Lock Screen</string> <string name="list_other_lock_screen">Lock Screen</string>
<string name="list_other_torch">Toggle Torch</string> <string name="list_other_torch">Toggle Torch</string>
<string name="list_other_launch_other_launcher">Launch other Home Screen</string> <string name="list_other_launch_other_launcher">Launch Other Home Screen</string>
<!-- Pin shortcuts --> <!-- Pin shortcuts -->
<string name="pin_shortcut_title">Add Shortcut</string> <string name="pin_shortcut_title">Add Shortcut</string>

View file

@ -0,0 +1,4 @@
µLauncher is een thuisscherm die je andere apps laat starten met gebruik van veeg gebaren en knoppen indrukken.
Het is minimalistisch, efficiënt en vrij van afleiding.
Je thuisscherm laat alleen de datum, tijd en achtergrond zien.

View file

@ -0,0 +1 @@
Een afleidingsvrije, minimalistisch thuisscherm voor Android.

View file

@ -0,0 +1 @@
µLauncher