1
0
Fork 0
mirror of https://github.com/jrpie/Launcher.git synced 2025-04-10 06:14:38 +02:00

Compare commits

..

11 commits

Author SHA1 Message Date
class0068
3c79b5c1f1 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (257 of 257 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/zh_Hans/
2025-03-30 00:07:18 +00:00
class0068
9b7de607ee Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.8% (254 of 257 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/zh_Hans/
2025-03-30 00:07:18 +00:00
Vossa Excelencia
49074592fa Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (254 of 254 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/pt_BR/
2025-03-30 00:07:18 +00:00
class0068
6acec09611 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (254 of 254 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/zh_Hans/
2025-03-30 00:07:18 +00:00
Vossa Excelencia
f2a4d5d774 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (254 of 254 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/pt_BR/
2025-03-30 00:07:18 +00:00
T
9fcb45665b Translated using Weblate (Spanish)
Currently translated at 98.0% (249 of 254 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/es/
2025-03-30 00:07:18 +00:00
toolatebot
6e60a4c2ad Update translation files
Updated by "Cleanup translation files" add-on in Weblate.

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/
2025-03-30 00:07:18 +00:00
class0068
ee3807e4ee Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (254 of 254 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/zh_Hans/
2025-03-30 00:07:18 +00:00
class0068
b7e5964075 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (254 of 254 strings)

Translation: jrpie-Launcher/Launcher
Translate-URL: https://toolate.othing.xyz/projects/jrpie-launcher/launcher/zh_Hans/
2025-03-30 00:07:18 +00:00
653d16b269
new action: launch other launchers 2025-03-29 21:09:15 +01:00
5d695ec0ea
fix 2025-03-29 18:45:53 +01:00
4 changed files with 33 additions and 3 deletions
app/src/main
java/de/jrpie/android/launcher
res

View file

@ -38,6 +38,8 @@ import androidx.core.net.toUri
const val LOG_TAG = "Launcher"
const val REQUEST_SET_DEFAULT_HOME = 42
fun isDefaultHomeScreen(context: Context): Boolean {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
val roleManager = context.getSystemService(RoleManager::class.java)
@ -59,11 +61,12 @@ fun setDefaultHomeScreen(context: Context, checkDefault: Boolean = false) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
&& context is Activity
&& !isDefault // using role manager only works when µLauncher is not already the default.
&& checkDefault // using role manager only works when µLauncher is not already the default.
) {
val roleManager = context.getSystemService(RoleManager::class.java)
context.startActivity(
roleManager.createRequestRoleIntent(RoleManager.ROLE_HOME)
context.startActivityForResult(
roleManager.createRequestRoleIntent(RoleManager.ROLE_HOME),
REQUEST_SET_DEFAULT_HOME
)
return
}

View file

@ -154,6 +154,12 @@ enum class LauncherAction(
R.drawable.baseline_flashlight_on_24,
::toggleTorch,
),
LAUNCH_OTHER_LAUNCHER(
"launcher_other_launcher",
R.string.list_other_launch_other_launcher,
R.drawable.baseline_home_24,
::launchOtherLauncher
),
NOP("nop", R.string.list_other_nop, R.drawable.baseline_not_interested_24, {});
override fun invoke(context: Context, rect: Rect?): Boolean {
@ -258,6 +264,15 @@ private fun expandSettingsPanel(context: Context) {
}
}
private fun launchOtherLauncher(context: Context) {
context.startActivity(
Intent.createChooser(
Intent(Intent.ACTION_MAIN).also { it.addCategory(Intent.CATEGORY_HOME) },
context.getString(R.string.list_other_launch_other_launcher)
)
)
}
private fun openSettings(context: Context) {
context.startActivity(Intent(context, SettingsActivity::class.java))
}

View file

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:textColor"
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
</vector>

View file

@ -256,6 +256,7 @@
<string name="list_other_nop">Do nothing</string>
<string name="list_other_lock_screen">Lock Screen</string>
<string name="list_other_torch">Toggle Torch</string>
<string name="list_other_launch_other_launcher">Launch other Home Screen</string>
<!-- Pin shortcuts -->
<string name="pin_shortcut_title">Add Shortcut</string>