feat: add light launcher icon option (#1104)
No files matched your search
@@ -65,11 +65,6 @@
|
||||
android:exported="true"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|density|keyboard|keyboardHidden|navigation">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.CAR_LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
@@ -88,6 +83,31 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity-alias
|
||||
android:name=".LauncherDark"
|
||||
android:targetActivity=".MainActivity"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.CAR_LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".LauncherLight"
|
||||
android:targetActivity=".MainActivity"
|
||||
android:icon="@mipmap/ic_launcher_light"
|
||||
android:enabled="false"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.CAR_LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity
|
||||
android:name=".HomeActivity"
|
||||
android:enabled="false"
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.droiddeck.launcher
|
||||
|
||||
import android.content.ComponentName
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
|
||||
object LauncherIcon {
|
||||
const val DARK = "dark"
|
||||
const val LIGHT = "light"
|
||||
|
||||
private val aliases = linkedMapOf(DARK to "com.droiddeck.launcher.LauncherDark", LIGHT to "com.droiddeck.launcher.LauncherLight")
|
||||
|
||||
val options: List<Pair<String, Int>> = listOf(
|
||||
DARK to R.string.setup_launcher_icon_dark,
|
||||
LIGHT to R.string.setup_launcher_icon_light,
|
||||
)
|
||||
|
||||
private fun component(context: Context, style: String) =
|
||||
ComponentName(context, aliases.getValue(style))
|
||||
|
||||
private fun enabled(context: Context, style: String): Boolean =
|
||||
when (context.packageManager.getComponentEnabledSetting(component(context, style))) {
|
||||
PackageManager.COMPONENT_ENABLED_STATE_ENABLED -> true
|
||||
PackageManager.COMPONENT_ENABLED_STATE_DEFAULT -> style == DARK
|
||||
else -> false
|
||||
}
|
||||
|
||||
fun current(context: Context): String = aliases.keys.firstOrNull { enabled(context, it) } ?: DARK
|
||||
|
||||
fun activity(context: Context): ComponentName = component(context, current(context))
|
||||
|
||||
fun set(context: Context, style: String) {
|
||||
if (style !in aliases || style == current(context)) return
|
||||
val pm = context.packageManager
|
||||
pm.setComponentEnabledSetting(component(context, style),
|
||||
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP)
|
||||
aliases.keys.filter { it != style }.forEach {
|
||||
pm.setComponentEnabledSetting(component(context, it),
|
||||
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,6 +164,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var downloadMirror by mutableStateOf("")
|
||||
private var downloadPrefix by mutableStateOf("")
|
||||
private var animationsEnabled by mutableStateOf(true)
|
||||
private var launcherIcon by mutableStateOf(LauncherIcon.DARK)
|
||||
private var gameStoresEnabled by mutableStateOf(true)
|
||||
private var gameStoresSpeedTier by mutableStateOf("fast")
|
||||
private var storesOpenTab by mutableStateOf(SessionPrefs.STORES_OPEN_LIBRARY)
|
||||
@@ -484,6 +485,20 @@ class MainActivity : ComponentActivity() {
|
||||
pickSaveDir.launch(InAppFilePicker.buildDirIntent(this, getString(R.string.game_file_folder), gameSyncFolder))
|
||||
}
|
||||
|
||||
private fun switchLauncherIcon(style: String): Boolean {
|
||||
val before = LauncherIcon.current(this)
|
||||
LauncherIcon.set(this, style)
|
||||
launcherIcon = LauncherIcon.current(this)
|
||||
if (launcherIcon == before) return false
|
||||
// Android finishes activities started through the alias that was just disabled.
|
||||
startActivity(Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER)
|
||||
.setComponent(LauncherIcon.activity(this))
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK)
|
||||
.putExtra(com.droiddeck.launcher.stores.download.StoreDownloadService.EXTRA_NAV, "setup:launcher"))
|
||||
finishAndRemoveTask()
|
||||
return true
|
||||
}
|
||||
|
||||
private fun readGameIntent(request: Intent) {
|
||||
request.getStringExtra(com.droiddeck.launcher.stores.download.StoreDownloadService.EXTRA_NAV)?.let { navRequest = it; request.removeExtra(com.droiddeck.launcher.stores.download.StoreDownloadService.EXTRA_NAV) }
|
||||
shortcutPicker = request.action == Intent.ACTION_CREATE_SHORTCUT
|
||||
@@ -739,6 +754,7 @@ class MainActivity : ComponentActivity() {
|
||||
downloadPrefix = DownloadSource.custom(this)
|
||||
DownloadSource.probe()
|
||||
animationsEnabled = SessionPrefs.animationsEnabled(this)
|
||||
launcherIcon = LauncherIcon.current(this)
|
||||
gameStoresEnabled = SessionPrefs.gameStoresEnabled(this)
|
||||
gameStoresSpeedTier = SessionPrefs.gameStoresSpeedTier(this)
|
||||
storesOpenTab = SessionPrefs.storesOpenTab(this)
|
||||
@@ -799,6 +815,7 @@ class MainActivity : ComponentActivity() {
|
||||
downloadMirror = downloadMirror,
|
||||
downloadPrefix = downloadPrefix,
|
||||
animationsEnabled = animationsEnabled,
|
||||
launcherIcon = launcherIcon,
|
||||
gameStoresEnabled = gameStoresEnabled,
|
||||
gameStoresSpeedTier = gameStoresSpeedTier,
|
||||
storesOpenTab = storesOpenTab,
|
||||
@@ -952,6 +969,7 @@ class MainActivity : ComponentActivity() {
|
||||
onPageBack = { showPerformance = false; showComponents = false; showMapping = false },
|
||||
onGameStoresEnabled = { on -> SessionPrefs.setGameStoresEnabled(this, on); gameStoresEnabled = on },
|
||||
onTheme = { id -> SessionPrefs.setTheme(this, id); theme = id },
|
||||
onLauncherIcon = { style -> switchLauncherIcon(style) },
|
||||
onLanguage = { tag ->
|
||||
if (tag != com.droiddeck.launcher.core.AppLanguage.chosen(this)) {
|
||||
com.droiddeck.launcher.core.AppLanguage.setChosen(this, tag)
|
||||
@@ -2045,7 +2063,7 @@ class MainActivity : ComponentActivity() {
|
||||
com.droiddeck.launcher.core.AppLanguage.setChosen(this, com.droiddeck.launcher.core.AppLanguage.SYSTEM)
|
||||
if (!ok) android.widget.Toast.makeText(this, R.string.setup_reset_settings_partial, android.widget.Toast.LENGTH_LONG).show()
|
||||
com.droiddeck.launcher.ui.Motion.refresh(this)
|
||||
recreate()
|
||||
if (!switchLauncherIcon(LauncherIcon.DARK)) recreate()
|
||||
}
|
||||
}, "reset-settings").start()
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.graphics.BitmapFactory
|
||||
import android.graphics.drawable.Icon
|
||||
import android.net.Uri
|
||||
import android.widget.Toast
|
||||
import com.droiddeck.launcher.LauncherIcon
|
||||
import com.droiddeck.launcher.MainActivity
|
||||
import com.droiddeck.launcher.R
|
||||
import java.io.File
|
||||
@@ -23,7 +24,7 @@ object GameShortcuts {
|
||||
val name = game.name.ifBlank { context.getString(R.string.app_name) }
|
||||
val icon = iconBitmap(game)?.let(Icon::createWithBitmap) ?: Icon.createWithResource(context, R.mipmap.ic_launcher)
|
||||
return ShortcutInfo.Builder(context, "game:${game.gameIdString}")
|
||||
.setActivity(android.content.ComponentName(context, MainActivity::class.java))
|
||||
.setActivity(LauncherIcon.activity(context))
|
||||
.setShortLabel(name.take(40)).setLongLabel(name).setIcon(icon)
|
||||
.setIntent(launchIntent(context, game.gameIdString)).build()
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ class FrontEndState(
|
||||
val downloadMirror: String = "",
|
||||
val downloadPrefix: String = "",
|
||||
val animationsEnabled: Boolean = true,
|
||||
val launcherIcon: String = com.droiddeck.launcher.LauncherIcon.DARK,
|
||||
val gameStoresEnabled: Boolean = true,
|
||||
val gameStoresSpeedTier: String = "fast",
|
||||
val storesOpenTab: String = SessionPrefs.STORES_OPEN_LIBRARY,
|
||||
@@ -205,6 +206,7 @@ class FrontEndActions(
|
||||
val onTheme: (String) -> Unit = {},
|
||||
val onLanguage: (String) -> Unit = {},
|
||||
val onAppScale: (Int) -> Unit = {},
|
||||
val onLauncherIcon: (String) -> Unit = {},
|
||||
val onOrientation: (Int) -> Unit = {},
|
||||
val onLauncherFullscreen: (Boolean) -> Unit = {},
|
||||
val onAnimationsEnabled: (Boolean) -> Unit = {},
|
||||
@@ -386,6 +388,7 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com
|
||||
when (target) {
|
||||
"stores:downloads" -> { com.droiddeck.launcher.stores.StoresState.openDownloads = true; selected = "stores" }
|
||||
"components" -> a.onComponents(true)
|
||||
"setup:launcher" -> { SetupTabs.openLauncher = true; selected = "setup" }
|
||||
else -> selected = target
|
||||
}
|
||||
a.onNavigated()
|
||||
|
||||
@@ -86,6 +86,11 @@ import com.droiddeck.launcher.R
|
||||
private enum class CheckState { OK, WARN, BUSY }
|
||||
|
||||
private const val STORAGE_TAB = 3
|
||||
private const val LAUNCHER_TAB = 2
|
||||
|
||||
internal object SetupTabs {
|
||||
var openLauncher = false
|
||||
}
|
||||
private const val GLASSES_TAB = 5
|
||||
|
||||
@Composable
|
||||
@@ -177,7 +182,8 @@ internal fun SetupPanel(
|
||||
onSave = { a.onDownloadPrefix(it); editDownloadPrefix = false },
|
||||
)
|
||||
val tabs = listOf(stringResource(R.string.setup_tab_overview), stringResource(R.string.setup_tab_controller), stringResource(R.string.setup_tab_launcher), stringResource(R.string.setup_tab_storage), stringResource(R.string.setup_tab_diagnostics), stringResource(R.string.setup_tab_glasses))
|
||||
var tab by rememberSaveable { mutableStateOf(0) }
|
||||
var tab by rememberSaveable { mutableStateOf(if (SetupTabs.openLauncher) LAUNCHER_TAB else 0) }
|
||||
SetupTabs.openLauncher = false
|
||||
val chipFocus = remember { List(tabs.size) { FocusRequester() } }
|
||||
var tabTurned by remember { mutableStateOf(false) }
|
||||
val pick: (Int) -> Unit = { i -> tab = i; tabTurned = true }
|
||||
@@ -362,6 +368,11 @@ internal fun SetupPanel(
|
||||
)
|
||||
}, s.appScale, onPick = a.onAppScale,
|
||||
)
|
||||
ChoiceRow(
|
||||
host, "launcher-icon", stringResource(R.string.setup_launcher_icon), null,
|
||||
com.droiddeck.launcher.LauncherIcon.options.map { (style, label) -> style to stringResource(label) },
|
||||
s.launcherIcon, onPick = a.onLauncherIcon,
|
||||
)
|
||||
ToggleRow(host, "launcher-animations", stringResource(R.string.setup_animations), null,
|
||||
s.animationsEnabled, onChange = a.onAnimationsEnabled)
|
||||
LanguageRow(host, s.language, a.onLanguage)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@mipmap/ic_launcher_background_light" />
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground_light" />
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 370 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 235 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 511 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 898 B |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
@@ -741,6 +741,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (افتراضي)</string>
|
||||
<string name="setup_theme">المظهر</string>
|
||||
<string name="setup_theme_hint">مظهر المشغّل</string>
|
||||
<string name="setup_launcher_icon">أيقونة التطبيق</string>
|
||||
<string name="setup_launcher_icon_dark">داكنة</string>
|
||||
<string name="setup_launcher_icon_light">فاتحة</string>
|
||||
<string name="setup_home">استخدام كشاشة رئيسية</string>
|
||||
<string name="setup_home_on">يمكن أن يكون DroidDeck تطبيق الشاشة الرئيسية</string>
|
||||
<string name="setup_home_off">لا يُعرَض DroidDeck أبدًا كتطبيق للشاشة الرئيسية</string>
|
||||
|
||||
@@ -752,6 +752,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (predeterminada)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Apariencia del launcher</string>
|
||||
<string name="setup_launcher_icon">Ícono de la app</string>
|
||||
<string name="setup_launcher_icon_dark">Oscuro</string>
|
||||
<string name="setup_launcher_icon_light">Claro</string>
|
||||
<string name="setup_home">Usar como pantalla de inicio</string>
|
||||
<string name="setup_home_on">DroidDeck puede ser la app de inicio</string>
|
||||
<string name="setup_home_off">DroidDeck nunca se ofrece como app de inicio</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (по подразбиране)</string>
|
||||
<string name="setup_theme">Тема</string>
|
||||
<string name="setup_theme_hint">Облик на лаунчъра</string>
|
||||
<string name="setup_launcher_icon">Икона на приложението</string>
|
||||
<string name="setup_launcher_icon_dark">Тъмна</string>
|
||||
<string name="setup_launcher_icon_light">Светла</string>
|
||||
<string name="setup_home">Използване като начален екран</string>
|
||||
<string name="setup_home_on">DroidDeck може да бъде приложението за начален екран</string>
|
||||
<string name="setup_home_off">DroidDeck никога не се предлага като приложение за начален екран</string>
|
||||
|
||||
@@ -735,6 +735,9 @@
|
||||
<string name="setup_app_scale_default">%1$d %% (výchozí)</string>
|
||||
<string name="setup_theme">Téma</string>
|
||||
<string name="setup_theme_hint">Vzhled spouštěče</string>
|
||||
<string name="setup_launcher_icon">Ikona aplikace</string>
|
||||
<string name="setup_launcher_icon_dark">Tmavá</string>
|
||||
<string name="setup_launcher_icon_light">Světlá</string>
|
||||
<string name="setup_home">Použít jako domovskou obrazovku</string>
|
||||
<string name="setup_home_on">DroidDeck může být domovská aplikace</string>
|
||||
<string name="setup_home_off">DroidDeck se nikdy nenabízí jako domovská aplikace</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (standard)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Launcherens udseende</string>
|
||||
<string name="setup_launcher_icon">Appikon</string>
|
||||
<string name="setup_launcher_icon_dark">Mørk</string>
|
||||
<string name="setup_launcher_icon_light">Lys</string>
|
||||
<string name="setup_home">Brug som startskærm</string>
|
||||
<string name="setup_home_on">DroidDeck kan være Home-appen</string>
|
||||
<string name="setup_home_off">DroidDeck tilbydes aldrig som Home-app</string>
|
||||
|
||||
@@ -718,6 +718,9 @@
|
||||
<string name="setup_app_scale_default">%1$d %% (Standard)</string>
|
||||
<string name="setup_theme">Design</string>
|
||||
<string name="setup_theme_hint">Aussehen des Launchers</string>
|
||||
<string name="setup_launcher_icon">App-Symbol</string>
|
||||
<string name="setup_launcher_icon_dark">Dunkel</string>
|
||||
<string name="setup_launcher_icon_light">Hell</string>
|
||||
<string name="setup_home">Als Startbildschirm verwenden</string>
|
||||
<string name="setup_home_on">DroidDeck kann die Startbildschirm-App sein</string>
|
||||
<string name="setup_home_off">DroidDeck wird nie als Startbildschirm-App angeboten</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Προεπιλογή)</string>
|
||||
<string name="setup_theme">Θέμα</string>
|
||||
<string name="setup_theme_hint">Εμφάνιση εκκινητή</string>
|
||||
<string name="setup_launcher_icon">Εικονίδιο εφαρμογής</string>
|
||||
<string name="setup_launcher_icon_dark">Σκούρο</string>
|
||||
<string name="setup_launcher_icon_light">Ανοιχτό</string>
|
||||
<string name="setup_home">Χρήση ως αρχική οθόνη</string>
|
||||
<string name="setup_home_on">Το DroidDeck μπορεί να είναι η εφαρμογή αρχικής οθόνης</string>
|
||||
<string name="setup_home_off">Το DroidDeck δεν προτείνεται ποτέ ως εφαρμογή αρχικής οθόνης</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (predeterminada)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Apariencia del launcher</string>
|
||||
<string name="setup_launcher_icon">Icono de la app</string>
|
||||
<string name="setup_launcher_icon_dark">Oscuro</string>
|
||||
<string name="setup_launcher_icon_light">Claro</string>
|
||||
<string name="setup_home">Usar como pantalla de inicio</string>
|
||||
<string name="setup_home_on">DroidDeck puede ser la app de inicio</string>
|
||||
<string name="setup_home_off">DroidDeck nunca se ofrece como app de inicio</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d %% (Oletus)</string>
|
||||
<string name="setup_theme">Teema</string>
|
||||
<string name="setup_theme_hint">Käynnistimen ulkoasu</string>
|
||||
<string name="setup_launcher_icon">Sovelluskuvake</string>
|
||||
<string name="setup_launcher_icon_dark">Tumma</string>
|
||||
<string name="setup_launcher_icon_light">Vaalea</string>
|
||||
<string name="setup_home">Käytä Aloitusnäyttönä</string>
|
||||
<string name="setup_home_on">DroidDeck voi olla kotisovellus</string>
|
||||
<string name="setup_home_off">DroidDeckiä ei koskaan tarjota kotisovellukseksi</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (par défaut)</string>
|
||||
<string name="setup_theme">Thème</string>
|
||||
<string name="setup_theme_hint">Apparence du lanceur</string>
|
||||
<string name="setup_launcher_icon">Icône de l\'app</string>
|
||||
<string name="setup_launcher_icon_dark">Sombre</string>
|
||||
<string name="setup_launcher_icon_light">Clair</string>
|
||||
<string name="setup_home">Utiliser comme écran d\'accueil</string>
|
||||
<string name="setup_home_on">DroidDeck peut être utilisé comme application d\'écran d\'accueil</string>
|
||||
<string name="setup_home_off">DroidDeck ne sera pas proposé comme application d\'écran d\'accueil</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (डिफ़ॉल्ट)</string>
|
||||
<string name="setup_theme">थीम</string>
|
||||
<string name="setup_theme_hint">लॉन्चर की दिखावट</string>
|
||||
<string name="setup_launcher_icon">ऐप आइकन</string>
|
||||
<string name="setup_launcher_icon_dark">गहरा</string>
|
||||
<string name="setup_launcher_icon_light">हल्का</string>
|
||||
<string name="setup_home">होम स्क्रीन के तौर पर इस्तेमाल करें</string>
|
||||
<string name="setup_home_on">DroidDeck होम ऐप हो सकता है</string>
|
||||
<string name="setup_home_off">DroidDeck को होम ऐप के तौर पर कभी नहीं दिखाया जाता</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Alapértelmezett)</string>
|
||||
<string name="setup_theme">Téma</string>
|
||||
<string name="setup_theme_hint">Az indítóalkalmazás megjelenése</string>
|
||||
<string name="setup_launcher_icon">Alkalmazásikon</string>
|
||||
<string name="setup_launcher_icon_dark">Sötét</string>
|
||||
<string name="setup_launcher_icon_light">Világos</string>
|
||||
<string name="setup_home">Használat kezdőképernyőként</string>
|
||||
<string name="setup_home_on">A DroidDeck lehet a kezdőképernyő alkalmazás</string>
|
||||
<string name="setup_home_off">A DroidDeck soha nem jelenik meg kezdőképernyő alkalmazásként</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Default)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Tampilan peluncur</string>
|
||||
<string name="setup_launcher_icon">Ikon aplikasi</string>
|
||||
<string name="setup_launcher_icon_dark">Gelap</string>
|
||||
<string name="setup_launcher_icon_light">Terang</string>
|
||||
<string name="setup_home">Gunakan sebagai Layar Utama</string>
|
||||
<string name="setup_home_on">DroidDeck dapat menjadi aplikasi Utama</string>
|
||||
<string name="setup_home_off">DroidDeck tidak pernah ditawarkan sebagai aplikasi Utama</string>
|
||||
|
||||
@@ -721,6 +721,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (predefinita)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Aspetto del launcher</string>
|
||||
<string name="setup_launcher_icon">Icona dell\'app</string>
|
||||
<string name="setup_launcher_icon_dark">Scura</string>
|
||||
<string name="setup_launcher_icon_light">Chiara</string>
|
||||
<string name="setup_home">Usa come schermata Home</string>
|
||||
<string name="setup_home_on">DroidDeck può essere l\'app Home</string>
|
||||
<string name="setup_home_off">DroidDeck non viene mai proposta come app Home</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%%(デフォルト)</string>
|
||||
<string name="setup_theme">テーマ</string>
|
||||
<string name="setup_theme_hint">ランチャーの外観</string>
|
||||
<string name="setup_launcher_icon">アプリアイコン</string>
|
||||
<string name="setup_launcher_icon_dark">ダーク</string>
|
||||
<string name="setup_launcher_icon_light">ライト</string>
|
||||
<string name="setup_home">ホーム画面として使用</string>
|
||||
<string name="setup_home_on">DroidDeckをホームアプリとして使用できます</string>
|
||||
<string name="setup_home_off">DroidDeckはホームアプリとして提供されません</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%%(기본값)</string>
|
||||
<string name="setup_theme">테마</string>
|
||||
<string name="setup_theme_hint">런처 외관</string>
|
||||
<string name="setup_launcher_icon">앱 아이콘</string>
|
||||
<string name="setup_launcher_icon_dark">다크</string>
|
||||
<string name="setup_launcher_icon_light">라이트</string>
|
||||
<string name="setup_home">홈 화면으로 사용</string>
|
||||
<string name="setup_home_on">DroidDeck을 홈 앱으로 사용할 수 있습니다</string>
|
||||
<string name="setup_home_off">DroidDeck은 홈 앱으로 제공되지 않습니다</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Lalai)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Rupa pelancar</string>
|
||||
<string name="setup_launcher_icon">Ikon apl</string>
|
||||
<string name="setup_launcher_icon_dark">Gelap</string>
|
||||
<string name="setup_launcher_icon_light">Cerah</string>
|
||||
<string name="setup_home">Gunakan sebagai skrin Utama</string>
|
||||
<string name="setup_home_on">DroidDeck boleh menjadi apl Utama</string>
|
||||
<string name="setup_home_off">DroidDeck tidak sekali-kali ditawarkan sebagai apl Utama</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Standard)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Launcherens utseende</string>
|
||||
<string name="setup_launcher_icon">Appikon</string>
|
||||
<string name="setup_launcher_icon_dark">Mørk</string>
|
||||
<string name="setup_launcher_icon_light">Lys</string>
|
||||
<string name="setup_home">Bruk som Hjem-skjerm</string>
|
||||
<string name="setup_home_on">DroidDeck kan være Hjem-appen</string>
|
||||
<string name="setup_home_off">DroidDeck tilbys aldri som en Hjem-app</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Standaard)</string>
|
||||
<string name="setup_theme">Thema</string>
|
||||
<string name="setup_theme_hint">Uiterlijk van de launcher</string>
|
||||
<string name="setup_launcher_icon">App-pictogram</string>
|
||||
<string name="setup_launcher_icon_dark">Donker</string>
|
||||
<string name="setup_launcher_icon_light">Licht</string>
|
||||
<string name="setup_home">Als startscherm gebruiken</string>
|
||||
<string name="setup_home_on">DroidDeck kan de startschermapp zijn</string>
|
||||
<string name="setup_home_off">DroidDeck wordt nooit aangeboden als startschermapp</string>
|
||||
|
||||
@@ -735,6 +735,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (domyślnie)</string>
|
||||
<string name="setup_theme">Motyw</string>
|
||||
<string name="setup_theme_hint">Wygląd aplikacji</string>
|
||||
<string name="setup_launcher_icon">Ikona aplikacji</string>
|
||||
<string name="setup_launcher_icon_dark">Ciemna</string>
|
||||
<string name="setup_launcher_icon_light">Jasna</string>
|
||||
<string name="setup_home">Użyj jako ekranu głównego</string>
|
||||
<string name="setup_home_on">DroidDeck może być aplikacją ekranu głównego</string>
|
||||
<string name="setup_home_off">DroidDeck nigdy nie jest proponowany jako aplikacja ekranu głównego</string>
|
||||
|
||||
@@ -721,6 +721,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (padrão)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Aspeto do iniciador</string>
|
||||
<string name="setup_launcher_icon">Ícone da app</string>
|
||||
<string name="setup_launcher_icon_dark">Escuro</string>
|
||||
<string name="setup_launcher_icon_light">Claro</string>
|
||||
<string name="setup_home">Utilizar como página inicial</string>
|
||||
<string name="setup_home_on">O DroidDeck pode ser a app de página inicial</string>
|
||||
<string name="setup_home_off">O DroidDeck nunca é proposto como app de página inicial</string>
|
||||
|
||||
@@ -721,6 +721,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (padrão)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Aparência do inicializador</string>
|
||||
<string name="setup_launcher_icon">Ícone do app</string>
|
||||
<string name="setup_launcher_icon_dark">Escuro</string>
|
||||
<string name="setup_launcher_icon_light">Claro</string>
|
||||
<string name="setup_home">Usar como tela inicial</string>
|
||||
<string name="setup_home_on">O DroidDeck pode ser o app de início</string>
|
||||
<string name="setup_home_off">O DroidDeck nunca é oferecido como app de início</string>
|
||||
|
||||
@@ -732,6 +732,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Implicit)</string>
|
||||
<string name="setup_theme">Temă</string>
|
||||
<string name="setup_theme_hint">Aspectul launcherului</string>
|
||||
<string name="setup_launcher_icon">Pictograma aplicației</string>
|
||||
<string name="setup_launcher_icon_dark">Întunecată</string>
|
||||
<string name="setup_launcher_icon_light">Luminoasă</string>
|
||||
<string name="setup_home">Folosește ca ecran Acasă</string>
|
||||
<string name="setup_home_on">DroidDeck poate fi aplicația Acasă</string>
|
||||
<string name="setup_home_off">DroidDeck nu este niciodată oferit ca aplicație Acasă</string>
|
||||
|
||||
@@ -732,6 +732,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (по умолчанию)</string>
|
||||
<string name="setup_theme">Тема</string>
|
||||
<string name="setup_theme_hint">Внешний вид лаунчера</string>
|
||||
<string name="setup_launcher_icon">Значок приложения</string>
|
||||
<string name="setup_launcher_icon_dark">Тёмный</string>
|
||||
<string name="setup_launcher_icon_light">Светлый</string>
|
||||
<string name="setup_home">Использовать как главный экран</string>
|
||||
<string name="setup_home_on">DroidDeck может использоваться как приложение главного экрана</string>
|
||||
<string name="setup_home_off">DroidDeck не будет доступен как приложение главного экрана</string>
|
||||
|
||||
@@ -729,6 +729,9 @@
|
||||
<string name="setup_app_scale_default">%1$d %% (Standard)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Startprogrammets utseende</string>
|
||||
<string name="setup_launcher_icon">Appikon</string>
|
||||
<string name="setup_launcher_icon_dark">Mörk</string>
|
||||
<string name="setup_launcher_icon_light">Ljus</string>
|
||||
<string name="setup_home">Använd som startskärm</string>
|
||||
<string name="setup_home_on">DroidDeck kan vara startskärmsappen</string>
|
||||
<string name="setup_home_off">DroidDeck erbjuds aldrig som startskärmsapp</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (ค่าเริ่มต้น)</string>
|
||||
<string name="setup_theme">ธีม</string>
|
||||
<string name="setup_theme_hint">รูปลักษณ์ของตัวเปิดแอป</string>
|
||||
<string name="setup_launcher_icon">ไอคอนแอป</string>
|
||||
<string name="setup_launcher_icon_dark">มืด</string>
|
||||
<string name="setup_launcher_icon_light">สว่าง</string>
|
||||
<string name="setup_home">ใช้เป็นหน้าจอหลัก</string>
|
||||
<string name="setup_home_on">DroidDeck สามารถเป็นแอปหน้าจอหลักได้</string>
|
||||
<string name="setup_home_off">DroidDeck จะไม่ถูกเสนอให้เป็นแอปหน้าจอหลัก</string>
|
||||
|
||||
@@ -718,6 +718,9 @@
|
||||
<string name="setup_app_scale_default">%%%1$d (Varsayılan)</string>
|
||||
<string name="setup_theme">Tema</string>
|
||||
<string name="setup_theme_hint">Başlatıcı görünümü</string>
|
||||
<string name="setup_launcher_icon">Uygulama simgesi</string>
|
||||
<string name="setup_launcher_icon_dark">Koyu</string>
|
||||
<string name="setup_launcher_icon_light">Açık</string>
|
||||
<string name="setup_home">Ana ekran olarak kullan</string>
|
||||
<string name="setup_home_on">DroidDeck ana ekran uygulaması olabilir</string>
|
||||
<string name="setup_home_off">DroidDeck hiçbir zaman ana ekran uygulaması olarak sunulmaz</string>
|
||||
|
||||
@@ -735,6 +735,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (стандартно)</string>
|
||||
<string name="setup_theme">Тема</string>
|
||||
<string name="setup_theme_hint">Вигляд лаунчера</string>
|
||||
<string name="setup_launcher_icon">Значок застосунку</string>
|
||||
<string name="setup_launcher_icon_dark">Темний</string>
|
||||
<string name="setup_launcher_icon_light">Світлий</string>
|
||||
<string name="setup_home">Використовувати як головний екран</string>
|
||||
<string name="setup_home_on">DroidDeck може бути додатком головного екрана</string>
|
||||
<string name="setup_home_off">DroidDeck ніколи не пропонується як додаток головного екрана</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Mặc định)</string>
|
||||
<string name="setup_theme">Giao diện</string>
|
||||
<string name="setup_theme_hint">Giao diện launcher</string>
|
||||
<string name="setup_launcher_icon">Biểu tượng ứng dụng</string>
|
||||
<string name="setup_launcher_icon_dark">Tối</string>
|
||||
<string name="setup_launcher_icon_light">Sáng</string>
|
||||
<string name="setup_home">Dùng làm màn hình chính</string>
|
||||
<string name="setup_home_on">DroidDeck có thể là ứng dụng Màn hình chính</string>
|
||||
<string name="setup_home_off">DroidDeck không bao giờ được đề xuất làm ứng dụng Màn hình chính</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%%(默认)</string>
|
||||
<string name="setup_theme">主题</string>
|
||||
<string name="setup_theme_hint">启动器外观</string>
|
||||
<string name="setup_launcher_icon">应用图标</string>
|
||||
<string name="setup_launcher_icon_dark">深色</string>
|
||||
<string name="setup_launcher_icon_light">浅色</string>
|
||||
<string name="setup_home">用作主屏幕</string>
|
||||
<string name="setup_home_on">DroidDeck 可以设为主屏幕应用</string>
|
||||
<string name="setup_home_off">系统不会把 DroidDeck 作为主屏幕应用提供</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%%(預設)</string>
|
||||
<string name="setup_theme">主題</string>
|
||||
<string name="setup_theme_hint">啟動器外觀</string>
|
||||
<string name="setup_launcher_icon">應用程式圖示</string>
|
||||
<string name="setup_launcher_icon_dark">深色</string>
|
||||
<string name="setup_launcher_icon_light">淺色</string>
|
||||
<string name="setup_home">用作主畫面</string>
|
||||
<string name="setup_home_on">DroidDeck 可用作主畫面應用程式</string>
|
||||
<string name="setup_home_off">DroidDeck 不會作為主畫面應用程式的選項</string>
|
||||
|
||||
@@ -726,6 +726,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%%(預設)</string>
|
||||
<string name="setup_theme">佈景主題</string>
|
||||
<string name="setup_theme_hint">啟動器外觀</string>
|
||||
<string name="setup_launcher_icon">應用程式圖示</string>
|
||||
<string name="setup_launcher_icon_dark">深色</string>
|
||||
<string name="setup_launcher_icon_light">淺色</string>
|
||||
<string name="setup_home">用作主螢幕</string>
|
||||
<string name="setup_home_on">DroidDeck 可以作為主螢幕應用程式</string>
|
||||
<string name="setup_home_off">DroidDeck 不會作為主螢幕應用程式提供</string>
|
||||
|
||||
@@ -760,6 +760,9 @@
|
||||
<string name="setup_app_scale_default">%1$d%% (Default)</string>
|
||||
<string name="setup_theme">Theme</string>
|
||||
<string name="setup_theme_hint">Launcher appearance</string>
|
||||
<string name="setup_launcher_icon">App icon</string>
|
||||
<string name="setup_launcher_icon_dark">Dark</string>
|
||||
<string name="setup_launcher_icon_light">Light</string>
|
||||
<string name="setup_home">Use as Home screen</string>
|
||||
<string name="setup_home_on">DroidDeck can be the Home app</string>
|
||||
<string name="setup_home_off">DroidDeck is never offered as a Home app</string>
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.droiddeck.launcher.frontend
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.app.Activity
|
||||
import com.droiddeck.launcher.LauncherIcon
|
||||
import com.droiddeck.launcher.MainActivity
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import org.junit.Assert.assertEquals
|
||||
@@ -68,12 +69,24 @@ class GameShortcutIntentTest {
|
||||
val launch = requireNotNull(shortcut.intent)
|
||||
assertEquals("game:8400", shortcut.id)
|
||||
assertEquals("Geometry Wars: Retro Evolved", shortcut.shortLabel.toString())
|
||||
assertEquals(MainActivity::class.java.name, shortcut.activity?.className)
|
||||
assertEquals("com.droiddeck.launcher.LauncherDark", shortcut.activity?.className)
|
||||
assertEquals(MainActivity::class.java.name, launch.component?.className)
|
||||
assertEquals(Intent.ACTION_VIEW, launch.action)
|
||||
assertEquals(Uri.parse("droiddeck://game/8400"), launch.data)
|
||||
assertEquals(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP, launch.flags)
|
||||
}
|
||||
|
||||
@Test fun pinnedShortcutFollowsTheLightLauncherIcon() {
|
||||
val activity = Robolectric.buildActivity(Activity::class.java).setup().get()
|
||||
LauncherIcon.set(activity, LauncherIcon.LIGHT)
|
||||
|
||||
GameShortcuts.pin(activity, Library.SteamGame(8400, "Geometry Wars: Retro Evolved", null, "steam", 8400L))
|
||||
|
||||
val shortcut = activity.getSystemService(android.content.pm.ShortcutManager::class.java).pinnedShortcuts.single()
|
||||
assertEquals(LauncherIcon.LIGHT, LauncherIcon.current(activity))
|
||||
assertEquals("com.droiddeck.launcher.LauncherLight", shortcut.activity?.className)
|
||||
}
|
||||
|
||||
@Test fun actionCreateShortcutUsesAndroidsShortcutResultIntentApi() {
|
||||
val activity = Robolectric.buildActivity(Activity::class.java).setup().get()
|
||||
val game = Library.SteamGame(8400, "Geometry Wars: Retro Evolved", null, "steam", 8400L)
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
`droiddeck-mark.svg` is the editable source for the white split-D mark. The blue orb is `#1A9FFF`; its halo and the two separator bars are transparent cutouts. The bars are centered on x=63.97, the endpoint of the curved half in the original Steam Deck symbol, and use the halo's 15.83-unit thickness. The mark is optically centered in its view box with a small rightward offset to balance its asymmetric silhouette. Place it on black when a background is needed.
|
||||
|
||||
Android currently consumes raster resources for the launcher layers and the Compose logo. The `mipmap-*/ic_launcher_foreground.png` files are density-sized exports of the SVG, with the mark kept inside the adaptive icon safe area. The matching backgrounds are black. `drawable-nodpi/logo.png` composes the same mark on a black circular badge.
|
||||
Android currently consumes raster resources for the launcher layers and the Compose logo. The `mipmap-*/ic_launcher_foreground.png` files are density-sized exports of the SVG, with the mark kept inside the adaptive icon safe area. The matching backgrounds are black. The `_light` variants recolor the mark black on a white background and back the light launcher icon users can pick in Settings. `drawable-nodpi/logo.png` composes the same mark on a black circular badge.
|
||||