Compare commits
No commits in common. "da115bb2d980aef599917f0558c8f1b49a646a29" and "47940811b4d8c6aece6ed8073044fd3c85db1db0" have entirely different histories.
da115bb2d9
...
47940811b4
|
@ -95,7 +95,7 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation 'androidx.activity:activity-ktx:1.8.0'
|
implementation 'androidx.activity:activity:1.8.0'
|
||||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||||
implementation 'androidx.core:core-ktx:1.15.0'
|
implementation 'androidx.core:core-ktx:1.15.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
||||||
|
|
|
@ -7,8 +7,11 @@ import android.content.IntentFilter
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.content.pm.LauncherApps
|
import android.content.pm.LauncherApps
|
||||||
import android.content.pm.ShortcutInfo
|
import android.content.pm.ShortcutInfo
|
||||||
|
import android.os.AsyncTask
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Build.VERSION_CODES
|
import android.os.Build.VERSION_CODES
|
||||||
|
import android.os.Handler
|
||||||
|
import android.os.Looper
|
||||||
import android.os.UserHandle
|
import android.os.UserHandle
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
@ -20,9 +23,6 @@ import de.jrpie.android.launcher.apps.isPrivateSpaceLocked
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import de.jrpie.android.launcher.preferences.migratePreferencesToNewVersion
|
import de.jrpie.android.launcher.preferences.migratePreferencesToNewVersion
|
||||||
import de.jrpie.android.launcher.preferences.resetPreferences
|
import de.jrpie.android.launcher.preferences.resetPreferences
|
||||||
import kotlinx.coroutines.CoroutineScope
|
|
||||||
import kotlinx.coroutines.Dispatchers
|
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
|
|
||||||
class Application : android.app.Application() {
|
class Application : android.app.Application() {
|
||||||
val apps = MutableLiveData<List<AbstractDetailedAppInfo>>()
|
val apps = MutableLiveData<List<AbstractDetailedAppInfo>>()
|
||||||
|
@ -153,8 +153,6 @@ class Application : android.app.Application() {
|
||||||
|
|
||||||
private fun loadApps() {
|
private fun loadApps() {
|
||||||
privateSpaceLocked.postValue(isPrivateSpaceLocked(this))
|
privateSpaceLocked.postValue(isPrivateSpaceLocked(this))
|
||||||
CoroutineScope(Dispatchers.Default).launch {
|
AsyncTask.execute { apps.postValue(getApps(packageManager, applicationContext)) }
|
||||||
apps.postValue(getApps(packageManager, applicationContext))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import android.content.pm.LauncherApps
|
||||||
import android.content.pm.LauncherApps.ShortcutQuery
|
import android.content.pm.LauncherApps.ShortcutQuery
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.content.pm.ShortcutInfo
|
import android.content.pm.ShortcutInfo
|
||||||
|
import android.net.Uri
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.UserHandle
|
import android.os.UserHandle
|
||||||
|
@ -33,9 +34,15 @@ import de.jrpie.android.launcher.apps.getPrivateSpaceUser
|
||||||
import de.jrpie.android.launcher.apps.isPrivateSpaceSupported
|
import de.jrpie.android.launcher.apps.isPrivateSpaceSupported
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import de.jrpie.android.launcher.ui.tutorial.TutorialActivity
|
import de.jrpie.android.launcher.ui.tutorial.TutorialActivity
|
||||||
import androidx.core.net.toUri
|
|
||||||
|
|
||||||
|
|
||||||
|
/* REQUEST CODES */
|
||||||
|
|
||||||
|
const val REQUEST_CHOOSE_APP = 1
|
||||||
|
const val REQUEST_UNINSTALL = 2
|
||||||
|
|
||||||
|
const val REQUEST_SET_DEFAULT_HOME = 42
|
||||||
|
|
||||||
const val LOG_TAG = "Launcher"
|
const val LOG_TAG = "Launcher"
|
||||||
|
|
||||||
fun isDefaultHomeScreen(context: Context): Boolean {
|
fun isDefaultHomeScreen(context: Context): Boolean {
|
||||||
|
@ -62,8 +69,9 @@ fun setDefaultHomeScreen(context: Context, checkDefault: Boolean = false) {
|
||||||
&& !isDefault // using role manager only works when µLauncher is not already the default.
|
&& !isDefault // using role manager only works when µLauncher is not already the default.
|
||||||
) {
|
) {
|
||||||
val roleManager = context.getSystemService(RoleManager::class.java)
|
val roleManager = context.getSystemService(RoleManager::class.java)
|
||||||
context.startActivity(
|
context.startActivityForResult(
|
||||||
roleManager.createRequestRoleIntent(RoleManager.ROLE_HOME)
|
roleManager.createRequestRoleIntent(RoleManager.ROLE_HOME),
|
||||||
|
REQUEST_SET_DEFAULT_HOME
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -117,7 +125,7 @@ fun removeUnusedShortcuts(context: Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun openInBrowser(url: String, context: Context) {
|
fun openInBrowser(url: String, context: Context) {
|
||||||
val intent = Intent(Intent.ACTION_VIEW, url.toUri())
|
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||||
intent.putExtras(Bundle().apply { putBoolean("new_window", true) })
|
intent.putExtras(Bundle().apply { putBoolean("new_window", true) })
|
||||||
try {
|
try {
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
|
@ -204,6 +212,14 @@ fun getApps(
|
||||||
return loadList
|
return loadList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Used in Tutorial and Settings `ActivityOnResult`
|
||||||
|
fun saveListActivityChoice(data: Intent?) {
|
||||||
|
val forGesture = data?.getStringExtra("forGesture") ?: return
|
||||||
|
Gesture.byId(forGesture)?.let { Action.setActionForGesture(it, Action.fromIntent(data)) }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// used for the bug report button
|
// used for the bug report button
|
||||||
fun getDeviceInfo(): String {
|
fun getDeviceInfo(): String {
|
||||||
return """
|
return """
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.jrpie.android.launcher.actions
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
import android.content.SharedPreferences.Editor
|
import android.content.SharedPreferences.Editor
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
|
@ -11,7 +12,6 @@ import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.encodeToString
|
import kotlinx.serialization.encodeToString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import androidx.core.content.edit
|
|
||||||
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
@ -29,6 +29,10 @@ sealed interface Action {
|
||||||
prefEditor.putString(id, Json.encodeToString(this))
|
prefEditor.putString(id, Json.encodeToString(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun writeToIntent(intent: Intent) {
|
||||||
|
intent.putExtra("action", Json.encodeToString(this))
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
fun forGesture(gesture: Gesture): Action? {
|
fun forGesture(gesture: Gesture): Action? {
|
||||||
|
@ -40,7 +44,7 @@ sealed interface Action {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun resetToDefaultActions(context: Context) {
|
fun resetToDefaultActions(context: Context) {
|
||||||
LauncherPreferences.getSharedPreferences().edit {
|
val editor = LauncherPreferences.getSharedPreferences().edit()
|
||||||
val boundActions = HashSet<String>()
|
val boundActions = HashSet<String>()
|
||||||
Gesture.entries.forEach { gesture ->
|
Gesture.entries.forEach { gesture ->
|
||||||
context.resources
|
context.resources
|
||||||
|
@ -53,10 +57,10 @@ sealed interface Action {
|
||||||
if (second != LauncherAction.CHOOSE) {
|
if (second != LauncherAction.CHOOSE) {
|
||||||
boundActions.add(first)
|
boundActions.add(first)
|
||||||
}
|
}
|
||||||
second.bindToGesture(this@edit, gesture.id)
|
second.bindToGesture(editor, gesture.id)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
editor.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setActionForGesture(gesture: Gesture, action: Action?) {
|
fun setActionForGesture(gesture: Gesture, action: Action?) {
|
||||||
|
@ -64,15 +68,15 @@ sealed interface Action {
|
||||||
clearActionForGesture(gesture)
|
clearActionForGesture(gesture)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
LauncherPreferences.getSharedPreferences().edit {
|
val editor = LauncherPreferences.getSharedPreferences().edit()
|
||||||
action.bindToGesture(this, gesture.id)
|
action.bindToGesture(editor, gesture.id)
|
||||||
}
|
editor.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clearActionForGesture(gesture: Gesture) {
|
fun clearActionForGesture(gesture: Gesture) {
|
||||||
LauncherPreferences.getSharedPreferences().edit {
|
LauncherPreferences.getSharedPreferences().edit()
|
||||||
remove(gesture.id)
|
.remove(gesture.id)
|
||||||
}
|
.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun launch(
|
fun launch(
|
||||||
|
@ -83,9 +87,6 @@ sealed interface Action {
|
||||||
) {
|
) {
|
||||||
if (action != null && action.invoke(context)) {
|
if (action != null && action.invoke(context)) {
|
||||||
if (context is Activity) {
|
if (context is Activity) {
|
||||||
// There does not seem to be a good alternative to overridePendingTransition.
|
|
||||||
// Note that we can't use overrideActivityTransition here.
|
|
||||||
@Suppress("deprecation")
|
|
||||||
context.overridePendingTransition(animationIn, animationOut)
|
context.overridePendingTransition(animationIn, animationOut)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -96,5 +97,10 @@ sealed interface Action {
|
||||||
).show()
|
).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun fromIntent(data: Intent): Action? {
|
||||||
|
val json = data.getStringExtra("action") ?: return null
|
||||||
|
return Json.decodeFromString(json)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -250,7 +250,7 @@ enum class Gesture(
|
||||||
"action.back",
|
"action.back",
|
||||||
R.string.settings_gesture_back,
|
R.string.settings_gesture_back,
|
||||||
R.string.settings_gesture_description_back,
|
R.string.settings_gesture_description_back,
|
||||||
R.array.default_back
|
R.array.default_up
|
||||||
);
|
);
|
||||||
|
|
||||||
enum class Edge {
|
enum class Edge {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import de.jrpie.android.launcher.R
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
|
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
enum class LockMethod(
|
enum class LockMethod(
|
||||||
private val lock: (Context) -> Unit,
|
private val lock: (Context) -> Unit,
|
||||||
private val isEnabled: (Context) -> Boolean,
|
private val isEnabled: (Context) -> Boolean,
|
||||||
|
|
|
@ -15,7 +15,19 @@ import kotlinx.serialization.Serializable
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
@SerialName("app")
|
@SerialName("app")
|
||||||
data class AppInfo(val packageName: String, val activityName: String?, val user: Int = INVALID_USER): AbstractAppInfo {
|
class AppInfo(val packageName: String, val activityName: String?, val user: Int = INVALID_USER): AbstractAppInfo {
|
||||||
|
|
||||||
|
override fun equals(other: Any?): Boolean {
|
||||||
|
if(other is AppInfo) {
|
||||||
|
return other.user == user && other.packageName == packageName
|
||||||
|
&& other.activityName == activityName
|
||||||
|
}
|
||||||
|
return super.equals(other)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun hashCode(): Int {
|
||||||
|
return packageName.hashCode()
|
||||||
|
}
|
||||||
|
|
||||||
fun getLauncherActivityInfo(
|
fun getLauncherActivityInfo(
|
||||||
context: Context
|
context: Context
|
||||||
|
@ -26,4 +38,10 @@ data class AppInfo(val packageName: String, val activityName: String?, val user:
|
||||||
return activityList.firstOrNull { app -> app.name == activityName }
|
return activityList.firstOrNull { app -> app.name == activityName }
|
||||||
?: activityList.firstOrNull()
|
?: activityList.firstOrNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "AppInfo {package=$packageName, activity=$activityName, user=$user}"
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -16,7 +16,7 @@ import kotlinx.serialization.Serializable
|
||||||
@RequiresApi(Build.VERSION_CODES.N_MR1)
|
@RequiresApi(Build.VERSION_CODES.N_MR1)
|
||||||
@Serializable
|
@Serializable
|
||||||
@SerialName("shortcut")
|
@SerialName("shortcut")
|
||||||
data class PinnedShortcutInfo(
|
class PinnedShortcutInfo(
|
||||||
val id: String,
|
val id: String,
|
||||||
val packageName: String,
|
val packageName: String,
|
||||||
val activityName: String,
|
val activityName: String,
|
||||||
|
@ -43,4 +43,25 @@ data class PinnedShortcutInfo(
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun equals(other: Any?): Boolean {
|
||||||
|
return (other as? PinnedShortcutInfo)?.let {
|
||||||
|
packageName == this.packageName &&
|
||||||
|
activityName == this.activityName &&
|
||||||
|
id == this.id &&
|
||||||
|
user == this.user
|
||||||
|
} ?: false
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun hashCode(): Int {
|
||||||
|
var result = id.hashCode()
|
||||||
|
result = 31 * result + packageName.hashCode()
|
||||||
|
result = 31 * result + activityName.hashCode()
|
||||||
|
result = 31 * result + user
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "PinnedShortcutInfo { package=$packageName, activity=$activityName, user=$user, id=$id}"
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -123,7 +123,6 @@ fun togglePrivateSpaceLock(context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("SameReturnValue")
|
|
||||||
fun hidePrivateSpaceWhenLocked(context: Context): Boolean {
|
fun hidePrivateSpaceWhenLocked(context: Context): Boolean {
|
||||||
// Trying to access the setting as a 3rd party launcher raises a security exception.
|
// Trying to access the setting as a 3rd party launcher raises a security exception.
|
||||||
// This is an Android bug: https://issuetracker.google.com/issues/352276244#comment5
|
// This is an Android bug: https://issuetracker.google.com/issues/352276244#comment5
|
||||||
|
|
|
@ -17,7 +17,6 @@ import androidx.core.graphics.green
|
||||||
import androidx.core.graphics.red
|
import androidx.core.graphics.red
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
import androidx.core.graphics.toColorInt
|
|
||||||
|
|
||||||
class ColorPreference(context: Context, attrs: AttributeSet?) :
|
class ColorPreference(context: Context, attrs: AttributeSet?) :
|
||||||
Preference(context, attrs) {
|
Preference(context, attrs) {
|
||||||
|
@ -53,7 +52,7 @@ class ColorPreference(context: Context, attrs: AttributeSet?) :
|
||||||
AlertDialog.Builder(context, R.style.AlertDialogCustom).apply {
|
AlertDialog.Builder(context, R.style.AlertDialogCustom).apply {
|
||||||
setView(R.layout.dialog_choose_color)
|
setView(R.layout.dialog_choose_color)
|
||||||
setTitle(R.string.dialog_choose_color_title)
|
setTitle(R.string.dialog_choose_color_title)
|
||||||
setPositiveButton(android.R.string.ok) { _, _ ->
|
setPositiveButton(R.string.dialog_select_color_ok) { _, _ ->
|
||||||
persistInt(currentColor)
|
persistInt(currentColor)
|
||||||
summary = currentColor.getHex()
|
summary = currentColor.getHex()
|
||||||
}
|
}
|
||||||
|
@ -84,10 +83,10 @@ class ColorPreference(context: Context, attrs: AttributeSet?) :
|
||||||
override fun onTextChanged(text: CharSequence?, p1: Int, p2: Int, p3: Int) {}
|
override fun onTextChanged(text: CharSequence?, p1: Int, p2: Int, p3: Int) {}
|
||||||
override fun afterTextChanged(editable: Editable?) {
|
override fun afterTextChanged(editable: Editable?) {
|
||||||
preview.hasFocus() || return
|
preview.hasFocus() || return
|
||||||
val newText = editable?.toString() ?: return
|
val newText = editable?.toString()
|
||||||
newText.isBlank() && return
|
newText.isNullOrBlank() && return
|
||||||
try {
|
try {
|
||||||
val newColor = newText.toColorInt()
|
val newColor = Color.parseColor(newText.toString())
|
||||||
currentColor = newColor
|
currentColor = newColor
|
||||||
updateColor(false)
|
updateColor(false)
|
||||||
} catch (_: IllegalArgumentException) {
|
} catch (_: IllegalArgumentException) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package de.jrpie.android.launcher.preferences
|
package de.jrpie.android.launcher.preferences
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.TypedValue
|
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -28,10 +27,8 @@ enum class ListLayout(
|
||||||
GRID(
|
GRID(
|
||||||
{ c ->
|
{ c ->
|
||||||
val displayMetrics = c.resources.displayMetrics
|
val displayMetrics = c.resources.displayMetrics
|
||||||
val widthColumnPx =
|
val widthSp = displayMetrics.widthPixels / displayMetrics.scaledDensity
|
||||||
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 90f, displayMetrics)
|
GridLayoutManager(c, (widthSp / 90).toInt())
|
||||||
val numColumns = (displayMetrics.widthPixels / widthColumnPx).toInt()
|
|
||||||
GridLayoutManager(c, numColumns)
|
|
||||||
},
|
},
|
||||||
R.layout.list_apps_row_variant_grid,
|
R.layout.list_apps_row_variant_grid,
|
||||||
false
|
false
|
||||||
|
|
|
@ -13,11 +13,9 @@ import kotlinx.serialization.encodeToString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import org.json.JSONException
|
import org.json.JSONException
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import androidx.core.content.edit
|
|
||||||
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@Suppress("unused")
|
|
||||||
private class LegacyMapEntry(val key: AppInfo, val value: String)
|
private class LegacyMapEntry(val key: AppInfo, val value: String)
|
||||||
|
|
||||||
private fun serializeMapAppInfo(value: Map<AppInfo, String>?): Set<String>? {
|
private fun serializeMapAppInfo(value: Map<AppInfo, String>?): Set<String>? {
|
||||||
|
@ -102,7 +100,7 @@ private fun migrateAppInfoStringMap(key: String) {
|
||||||
}
|
}
|
||||||
}?.toMap(HashMap())
|
}?.toMap(HashMap())
|
||||||
)?.let {
|
)?.let {
|
||||||
preferences.edit { putStringSet(key, it) }
|
preferences.edit().putStringSet(key, it).apply()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,16 +109,16 @@ private fun migrateAppInfoSet(key: String) {
|
||||||
.map(AppInfo.Companion::legacyDeserialize)
|
.map(AppInfo.Companion::legacyDeserialize)
|
||||||
.map(AppInfo::serialize)
|
.map(AppInfo::serialize)
|
||||||
.toSet()
|
.toSet()
|
||||||
.let { LauncherPreferences.getSharedPreferences().edit { putStringSet(key, it) } }
|
.let { LauncherPreferences.getSharedPreferences().edit().putStringSet(key, it).apply() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun migrateAction(key: String) {
|
private fun migrateAction(key: String) {
|
||||||
Action.legacyFromPreference(key)?.let { action ->
|
Action.legacyFromPreference(key)?.let { action ->
|
||||||
LauncherPreferences.getSharedPreferences().edit {
|
LauncherPreferences.getSharedPreferences().edit()
|
||||||
putString(key, Json.encodeToString(action))
|
.putString(key, Json.encodeToString(action))
|
||||||
.remove("$key.app")
|
.remove("$key.app")
|
||||||
.remove("$key.user")
|
.remove("$key.user")
|
||||||
}
|
.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import android.util.Log
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import de.jrpie.android.launcher.preferences.theme.Background
|
import de.jrpie.android.launcher.preferences.theme.Background
|
||||||
import de.jrpie.android.launcher.preferences.theme.ColorTheme
|
import de.jrpie.android.launcher.preferences.theme.ColorTheme
|
||||||
import androidx.core.content.edit
|
|
||||||
|
|
||||||
|
|
||||||
private fun migrateStringPreference(
|
private fun migrateStringPreference(
|
||||||
|
@ -64,11 +64,11 @@ fun migratePreferencesFromVersionUnknown(context: Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
LauncherPreferences.getSharedPreferences().edit {
|
val newPrefs = LauncherPreferences.getSharedPreferences().edit()
|
||||||
|
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"startedBefore",
|
"startedBefore",
|
||||||
"internal.started_before",
|
"internal.started_before",
|
||||||
false
|
false
|
||||||
|
@ -76,305 +76,306 @@ fun migratePreferencesFromVersionUnknown(context: Context) {
|
||||||
|
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_volumeUpApp",
|
"action_volumeUpApp",
|
||||||
"action.volume_up.app",
|
"action.volume_up.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_volumeUpApp_user",
|
"action_volumeUpApp_user",
|
||||||
"action.volume_up.user",
|
"action.volume_up.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_volumeDownApp",
|
"action_volumeDownApp",
|
||||||
"action.volume_down.app",
|
"action.volume_down.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_volumeDownApp_user",
|
"action_volumeDownApp_user",
|
||||||
"action.volume_down.user",
|
"action.volume_down.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(oldPrefs, this, "action_timeApp", "action.time.app", "")
|
migrateStringPreference(oldPrefs, newPrefs, "action_timeApp", "action.time.app", "")
|
||||||
migrateIntPreference(oldPrefs, this, "action_timeApp_user", "action.time.user", -1)
|
migrateIntPreference(oldPrefs, newPrefs, "action_timeApp_user", "action.time.user", -1)
|
||||||
migrateStringPreference(oldPrefs, this, "action_dateApp", "action.date.app", "")
|
migrateStringPreference(oldPrefs, newPrefs, "action_dateApp", "action.date.app", "")
|
||||||
migrateIntPreference(oldPrefs, this, "action_dateApp_user", "action.date.user", -1)
|
migrateIntPreference(oldPrefs, newPrefs, "action_dateApp_user", "action.date.user", -1)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_longClickApp",
|
"action_longClickApp",
|
||||||
"action.long_click.app",
|
"action.long_click.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_longClickApp_user",
|
"action_longClickApp_user",
|
||||||
"action.long_click.user",
|
"action.long_click.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleClickApp",
|
"action_doubleClickApp",
|
||||||
"action.double_click.app",
|
"action.double_click.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleClickApp_user",
|
"action_doubleClickApp_user",
|
||||||
"action.double_click.user",
|
"action.double_click.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(oldPrefs, this, "action_upApp", "action.up.app", "")
|
migrateStringPreference(oldPrefs, newPrefs, "action_upApp", "action.up.app", "")
|
||||||
migrateIntPreference(oldPrefs, this, "action_upApp_user", "action.up.user", -1)
|
migrateIntPreference(oldPrefs, newPrefs, "action_upApp_user", "action.up.user", -1)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_up_leftApp",
|
"action_up_leftApp",
|
||||||
"action.up_left.app",
|
"action.up_left.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_up_leftApp_user",
|
"action_up_leftApp_user",
|
||||||
"action.up_left.user",
|
"action.up_left.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_up_rightApp",
|
"action_up_rightApp",
|
||||||
"action.up_right.app",
|
"action.up_right.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_up_rightApp_user",
|
"action_up_rightApp_user",
|
||||||
"action.up_right.user",
|
"action.up_right.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleUpApp",
|
"action_doubleUpApp",
|
||||||
"action.double_up.app",
|
"action.double_up.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleUpApp_user",
|
"action_doubleUpApp_user",
|
||||||
"action.double_up.user",
|
"action.double_up.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(oldPrefs, this, "action_downApp", "action.down.app", "")
|
migrateStringPreference(oldPrefs, newPrefs, "action_downApp", "action.down.app", "")
|
||||||
migrateIntPreference(oldPrefs, this, "action_downApp_user", "action.down.user", -1)
|
migrateIntPreference(oldPrefs, newPrefs, "action_downApp_user", "action.down.user", -1)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_down_leftApp",
|
"action_down_leftApp",
|
||||||
"action.down_left.app",
|
"action.down_left.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_down_leftApp_user",
|
"action_down_leftApp_user",
|
||||||
"action.down_left.user",
|
"action.down_left.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_down_rightApp",
|
"action_down_rightApp",
|
||||||
"action.down_right.app",
|
"action.down_right.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_down_rightApp_user",
|
"action_down_rightApp_user",
|
||||||
"action.down_right.user",
|
"action.down_right.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleDownApp",
|
"action_doubleDownApp",
|
||||||
"action.double_down.app",
|
"action.double_down.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleDownApp_user",
|
"action_doubleDownApp_user",
|
||||||
"action.double_down.user",
|
"action.double_down.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(oldPrefs, this, "action_leftApp", "action.left.app", "")
|
migrateStringPreference(oldPrefs, newPrefs, "action_leftApp", "action.left.app", "")
|
||||||
migrateIntPreference(oldPrefs, this, "action_leftApp_user", "action.left.user", -1)
|
migrateIntPreference(oldPrefs, newPrefs, "action_leftApp_user", "action.left.user", -1)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_left_topApp",
|
"action_left_topApp",
|
||||||
"action.left_top.app",
|
"action.left_top.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_left_topApp_user",
|
"action_left_topApp_user",
|
||||||
"action.left_top.user",
|
"action.left_top.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_left_bottomApp",
|
"action_left_bottomApp",
|
||||||
"action.left_bottom.app",
|
"action.left_bottom.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_left_bottomApp_user",
|
"action_left_bottomApp_user",
|
||||||
"action.left_bottom.user",
|
"action.left_bottom.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleLeftApp",
|
"action_doubleLeftApp",
|
||||||
"action.double_left.app",
|
"action.double_left.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleLeftApp_user",
|
"action_doubleLeftApp_user",
|
||||||
"action.double_left.user",
|
"action.double_left.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(oldPrefs, this, "action_rightApp", "action.right.app", "")
|
migrateStringPreference(oldPrefs, newPrefs, "action_rightApp", "action.right.app", "")
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_rightApp_user",
|
"action_rightApp_user",
|
||||||
"action.right.user",
|
"action.right.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_right_topApp",
|
"action_right_topApp",
|
||||||
"action.right_top.app",
|
"action.right_top.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_right_topApp_user",
|
"action_right_topApp_user",
|
||||||
"action.right_top.user",
|
"action.right_top.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_right_bottomApp",
|
"action_right_bottomApp",
|
||||||
"action.right_bottom.app",
|
"action.right_bottom.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_right_bottomApp_user",
|
"action_right_bottomApp_user",
|
||||||
"action.right_bottom.user",
|
"action.right_bottom.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateStringPreference(
|
migrateStringPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleRightApp",
|
"action_doubleRightApp",
|
||||||
"action.double_right.app",
|
"action.double_right.app",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
migrateIntPreference(
|
migrateIntPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"action_doubleRightApp_user",
|
"action_doubleRightApp_user",
|
||||||
"action.double_right.user",
|
"action.double_right.user",
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
migrateBooleanPreference(oldPrefs, this, "timeVisible", "clock.time_visible", true)
|
migrateBooleanPreference(oldPrefs, newPrefs, "timeVisible", "clock.time_visible", true)
|
||||||
migrateBooleanPreference(oldPrefs, this, "dateVisible", "clock.date_visible", true)
|
migrateBooleanPreference(oldPrefs, newPrefs, "dateVisible", "clock.date_visible", true)
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"dateLocalized",
|
"dateLocalized",
|
||||||
"clock.date_localized",
|
"clock.date_localized",
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"dateTimeFlip",
|
"dateTimeFlip",
|
||||||
"clock.date_time_flip",
|
"clock.date_time_flip",
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"disableTimeout",
|
"disableTimeout",
|
||||||
"display.disable_timeout",
|
"display.disable_timeout",
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"useFullScreen",
|
"useFullScreen",
|
||||||
"display.use_full_screen",
|
"display.use_full_screen",
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"enableDoubleActions",
|
"enableDoubleActions",
|
||||||
"enabled_gestures.double_actions",
|
"enabled_gestures.double_actions",
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"enableEdgeActions",
|
"enableEdgeActions",
|
||||||
"enabled_gestures.edge_actions",
|
"enabled_gestures.edge_actions",
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"searchAutoLaunch",
|
"searchAutoLaunch",
|
||||||
"functionality.search_auto_launch",
|
"functionality.search_auto_launch",
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
migrateBooleanPreference(
|
migrateBooleanPreference(
|
||||||
oldPrefs,
|
oldPrefs,
|
||||||
this,
|
newPrefs,
|
||||||
"searchAutoKeyboard",
|
"searchAutoKeyboard",
|
||||||
"functionality.search_auto_keyboard",
|
"functionality.search_auto_keyboard",
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
newPrefs.apply()
|
||||||
|
|
||||||
when (oldPrefs.getString("theme", "finn")) {
|
when (oldPrefs.getString("theme", "finn")) {
|
||||||
"finn" -> {
|
"finn" -> {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.content.res.Resources
|
||||||
import com.google.android.material.color.DynamicColors
|
import com.google.android.material.color.DynamicColors
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
enum class ColorTheme(
|
enum class ColorTheme(
|
||||||
private val id: Int,
|
private val id: Int,
|
||||||
private val labelResource: Int,
|
private val labelResource: Int,
|
||||||
|
|
|
@ -57,8 +57,6 @@ class HomeActivity : UIObject, AppCompatActivity() {
|
||||||
super<UIObject>.onCreate()
|
super<UIObject>.onCreate()
|
||||||
|
|
||||||
val displayMetrics = DisplayMetrics()
|
val displayMetrics = DisplayMetrics()
|
||||||
|
|
||||||
@Suppress("deprecation") // required to support API < 30
|
|
||||||
windowManager.defaultDisplay.getMetrics(displayMetrics)
|
windowManager.defaultDisplay.getMetrics(displayMetrics)
|
||||||
|
|
||||||
val width = displayMetrics.widthPixels
|
val width = displayMetrics.widthPixels
|
||||||
|
@ -80,7 +78,6 @@ class HomeActivity : UIObject, AppCompatActivity() {
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||||
binding.root.setOnApplyWindowInsetsListener { _, windowInsets ->
|
binding.root.setOnApplyWindowInsetsListener { _, windowInsets ->
|
||||||
@Suppress("deprecation") // required to support API 29
|
|
||||||
val insets = windowInsets.systemGestureInsets
|
val insets = windowInsets.systemGestureInsets
|
||||||
touchGestureDetector.setSystemGestureInsets(insets)
|
touchGestureDetector.setSystemGestureInsets(insets)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import de.jrpie.android.launcher.actions.ShortcutAction
|
||||||
import de.jrpie.android.launcher.apps.PinnedShortcutInfo
|
import de.jrpie.android.launcher.apps.PinnedShortcutInfo
|
||||||
import de.jrpie.android.launcher.databinding.ActivityPinShortcutBinding
|
import de.jrpie.android.launcher.databinding.ActivityPinShortcutBinding
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import androidx.core.content.edit
|
|
||||||
|
|
||||||
class PinShortcutActivity : AppCompatActivity(), UIObject {
|
class PinShortcutActivity : AppCompatActivity(), UIObject {
|
||||||
private lateinit var binding: ActivityPinShortcutBinding
|
private lateinit var binding: ActivityPinShortcutBinding
|
||||||
|
@ -73,12 +72,9 @@ class PinShortcutActivity : AppCompatActivity(), UIObject {
|
||||||
isBound = true
|
isBound = true
|
||||||
request.accept()
|
request.accept()
|
||||||
}
|
}
|
||||||
LauncherPreferences.getSharedPreferences().edit {
|
val editor = LauncherPreferences.getSharedPreferences().edit()
|
||||||
ShortcutAction(PinnedShortcutInfo(request.shortcutInfo!!)).bindToGesture(
|
ShortcutAction(PinnedShortcutInfo(request.shortcutInfo!!)).bindToGesture(editor, gesture.id)
|
||||||
this,
|
editor.apply()
|
||||||
gesture.id
|
|
||||||
)
|
|
||||||
}
|
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
dialog.findViewById<RecyclerView>(R.id.dialog_select_gesture_recycler).apply {
|
dialog.findViewById<RecyclerView>(R.id.dialog_select_gesture_recycler).apply {
|
||||||
|
@ -121,11 +117,11 @@ class PinShortcutActivity : AppCompatActivity(), UIObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class GestureRecyclerAdapter(val context: Context, val onClick: (Gesture) -> Unit): RecyclerView.Adapter<GestureRecyclerAdapter.ViewHolder>() {
|
inner class GestureRecyclerAdapter(val context: Context, val onClick: (Gesture) -> Unit): RecyclerView.Adapter<GestureRecyclerAdapter.ViewHolder>() {
|
||||||
private val gestures = Gesture.entries.filter { it.isEnabled() }.toList()
|
val gestures = Gesture.entries.filter { it.isEnabled() }.toList()
|
||||||
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
val label: TextView = itemView.findViewById(R.id.dialog_select_gesture_row_name)
|
val label = itemView.findViewById<TextView>(R.id.dialog_select_gesture_row_name)
|
||||||
val description: TextView = itemView.findViewById(R.id.dialog_select_gesture_row_description)
|
val description = itemView.findViewById<TextView>(R.id.dialog_select_gesture_row_description)
|
||||||
val icon: ImageView = itemView.findViewById(R.id.dialog_select_gesture_row_icon)
|
val icon = itemView.findViewById<ImageView>(R.id.dialog_select_gesture_row_icon)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
|
|
|
@ -15,10 +15,8 @@ import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
* An interface implemented by every [Activity], Fragment etc. in Launcher.
|
* An interface implemented by every [Activity], Fragment etc. in Launcher.
|
||||||
* It handles themes and window flags - a useful abstraction as it is the same everywhere.
|
* It handles themes and window flags - a useful abstraction as it is the same everywhere.
|
||||||
*/
|
*/
|
||||||
@Suppress("deprecation") // FLAG_FULLSCREEN is required to support API level < 30
|
|
||||||
fun setWindowFlags(window: Window, homeScreen: Boolean) {
|
fun setWindowFlags(window: Window, homeScreen: Boolean) {
|
||||||
window.setFlags(0, 0) // clear flags
|
window.setFlags(0, 0) // clear flags
|
||||||
|
|
||||||
// Display notification bar
|
// Display notification bar
|
||||||
if (LauncherPreferences.display().hideStatusBar())
|
if (LauncherPreferences.display().hideStatusBar())
|
||||||
window.setFlags(
|
window.setFlags(
|
||||||
|
|
|
@ -1,18 +1,24 @@
|
||||||
package de.jrpie.android.launcher.ui.list
|
package de.jrpie.android.launcher.ui.list
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.content.Intent
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.widget.Toast
|
||||||
import android.window.OnBackInvokedDispatcher
|
import android.window.OnBackInvokedDispatcher
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.content.res.AppCompatResources
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
import androidx.fragment.app.FragmentManager
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import androidx.fragment.app.FragmentPagerAdapter
|
||||||
|
import androidx.viewpager.widget.ViewPager
|
||||||
|
import com.google.android.material.tabs.TabLayout
|
||||||
import de.jrpie.android.launcher.Application
|
import de.jrpie.android.launcher.Application
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
import de.jrpie.android.launcher.REQUEST_UNINSTALL
|
||||||
import de.jrpie.android.launcher.actions.LauncherAction
|
import de.jrpie.android.launcher.actions.LauncherAction
|
||||||
import de.jrpie.android.launcher.apps.AppFilter
|
import de.jrpie.android.launcher.apps.AppFilter
|
||||||
import de.jrpie.android.launcher.apps.hidePrivateSpaceWhenLocked
|
import de.jrpie.android.launcher.apps.hidePrivateSpaceWhenLocked
|
||||||
|
@ -109,13 +115,10 @@ class ListActivity : AppCompatActivity(), UIObject {
|
||||||
?.let { ListActivityIntention.valueOf(it) }
|
?.let { ListActivityIntention.valueOf(it) }
|
||||||
?: ListActivityIntention.VIEW
|
?: ListActivityIntention.VIEW
|
||||||
|
|
||||||
@Suppress("deprecation") // required to support API level < 33
|
|
||||||
favoritesVisibility = bundle.getSerializable("favoritesVisibility")
|
favoritesVisibility = bundle.getSerializable("favoritesVisibility")
|
||||||
as? AppFilter.Companion.AppSetVisibility ?: favoritesVisibility
|
as? AppFilter.Companion.AppSetVisibility ?: favoritesVisibility
|
||||||
@Suppress("deprecation") // required to support API level < 33
|
|
||||||
privateSpaceVisibility = bundle.getSerializable("privateSpaceVisibility")
|
privateSpaceVisibility = bundle.getSerializable("privateSpaceVisibility")
|
||||||
as? AppFilter.Companion.AppSetVisibility ?: privateSpaceVisibility
|
as? AppFilter.Companion.AppSetVisibility ?: privateSpaceVisibility
|
||||||
@Suppress("deprecation") // required to support API level < 33
|
|
||||||
hiddenVisibility = bundle.getSerializable("hiddenVisibility")
|
hiddenVisibility = bundle.getSerializable("hiddenVisibility")
|
||||||
as? AppFilter.Companion.AppSetVisibility ?: hiddenVisibility
|
as? AppFilter.Companion.AppSetVisibility ?: hiddenVisibility
|
||||||
|
|
||||||
|
@ -182,6 +185,20 @@ class ListActivity : AppCompatActivity(), UIObject {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
|
if (requestCode == REQUEST_UNINSTALL) {
|
||||||
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
|
Toast.makeText(this, getString(R.string.list_removed), Toast.LENGTH_LONG).show()
|
||||||
|
finish()
|
||||||
|
} else if (resultCode == Activity.RESULT_FIRST_USER) {
|
||||||
|
Toast.makeText(this, getString(R.string.list_not_removed), Toast.LENGTH_LONG).show()
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fun updateTitle() {
|
fun updateTitle() {
|
||||||
var titleResource = intention.titleResource
|
var titleResource = intention.titleResource
|
||||||
if (intention == ListActivityIntention.VIEW) {
|
if (intention == ListActivityIntention.VIEW) {
|
||||||
|
@ -224,14 +241,11 @@ class ListActivity : AppCompatActivity(), UIObject {
|
||||||
|
|
||||||
updateTitle()
|
updateTitle()
|
||||||
|
|
||||||
val sectionsPagerAdapter = ListSectionsPagerAdapter(this)
|
val sectionsPagerAdapter = ListSectionsPagerAdapter(this, supportFragmentManager)
|
||||||
binding.listViewpager.apply {
|
val viewPager: ViewPager = findViewById(R.id.list_viewpager)
|
||||||
adapter = sectionsPagerAdapter
|
viewPager.adapter = sectionsPagerAdapter
|
||||||
currentItem = 0
|
val tabs: TabLayout = findViewById(R.id.list_tabs)
|
||||||
}
|
tabs.setupWithViewPager(viewPager)
|
||||||
TabLayoutMediator(binding.listTabs, binding.listViewpager) { tab, position ->
|
|
||||||
tab.text = sectionsPagerAdapter.getPageTitle(position)
|
|
||||||
}.attach()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,10 +258,10 @@ private val TAB_TITLES = arrayOf(
|
||||||
* The [ListSectionsPagerAdapter] returns the fragment,
|
* The [ListSectionsPagerAdapter] returns the fragment,
|
||||||
* which corresponds to the selected tab in [ListActivity].
|
* which corresponds to the selected tab in [ListActivity].
|
||||||
*/
|
*/
|
||||||
class ListSectionsPagerAdapter(private val activity: ListActivity) :
|
class ListSectionsPagerAdapter(private val activity: ListActivity, fm: FragmentManager) :
|
||||||
FragmentStateAdapter(activity) {
|
FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
||||||
|
|
||||||
override fun createFragment(position: Int): Fragment {
|
override fun getItem(position: Int): Fragment {
|
||||||
return when (position) {
|
return when (position) {
|
||||||
0 -> ListFragmentApps()
|
0 -> ListFragmentApps()
|
||||||
1 -> ListFragmentOther()
|
1 -> ListFragmentOther()
|
||||||
|
@ -255,11 +269,11 @@ class ListSectionsPagerAdapter(private val activity: ListActivity) :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getPageTitle(position: Int): CharSequence {
|
override fun getPageTitle(position: Int): CharSequence {
|
||||||
return activity.resources.getString(TAB_TITLES[position])
|
return activity.resources.getString(TAB_TITLES[position])
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getCount(): Int {
|
||||||
return when (activity.intention) {
|
return when (activity.intention) {
|
||||||
ListActivity.ListActivityIntention.VIEW -> 1
|
ListActivity.ListActivityIntention.VIEW -> 1
|
||||||
else -> 2
|
else -> 2
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.jrpie.android.launcher.ui.list.apps
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
import android.content.Intent
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -14,8 +15,7 @@ import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import de.jrpie.android.launcher.Application
|
import de.jrpie.android.launcher.Application
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
import de.jrpie.android.launcher.actions.Action
|
import de.jrpie.android.launcher.REQUEST_CHOOSE_APP
|
||||||
import de.jrpie.android.launcher.actions.Gesture
|
|
||||||
import de.jrpie.android.launcher.apps.AbstractDetailedAppInfo
|
import de.jrpie.android.launcher.apps.AbstractDetailedAppInfo
|
||||||
import de.jrpie.android.launcher.apps.AppFilter
|
import de.jrpie.android.launcher.apps.AppFilter
|
||||||
import de.jrpie.android.launcher.apps.AppInfo
|
import de.jrpie.android.launcher.apps.AppInfo
|
||||||
|
@ -195,10 +195,11 @@ class AppsRecyclerAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
ListActivity.ListActivityIntention.PICK -> {
|
ListActivity.ListActivityIntention.PICK -> {
|
||||||
|
val returnIntent = Intent()
|
||||||
|
appInfo.getAction().writeToIntent(returnIntent)
|
||||||
|
returnIntent.putExtra("forGesture", forGesture)
|
||||||
|
activity.setResult(REQUEST_CHOOSE_APP, returnIntent)
|
||||||
activity.finish()
|
activity.finish()
|
||||||
forGesture ?: return
|
|
||||||
val gesture = Gesture.byId(forGesture) ?: return
|
|
||||||
Action.setActionForGesture(gesture, appInfo.getAction())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.LauncherApps
|
import android.content.pm.LauncherApps
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -13,9 +14,11 @@ import android.widget.EditText
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
import de.jrpie.android.launcher.REQUEST_UNINSTALL
|
||||||
import de.jrpie.android.launcher.apps.AppInfo
|
import de.jrpie.android.launcher.apps.AppInfo
|
||||||
import de.jrpie.android.launcher.apps.AbstractAppInfo
|
import de.jrpie.android.launcher.apps.AbstractAppInfo
|
||||||
import de.jrpie.android.launcher.apps.AbstractDetailedAppInfo
|
import de.jrpie.android.launcher.apps.AbstractDetailedAppInfo
|
||||||
|
import de.jrpie.android.launcher.apps.DetailedAppInfo
|
||||||
import de.jrpie.android.launcher.apps.PinnedShortcutInfo
|
import de.jrpie.android.launcher.apps.PinnedShortcutInfo
|
||||||
import de.jrpie.android.launcher.getUserFromId
|
import de.jrpie.android.launcher.getUserFromId
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
|
@ -41,13 +44,17 @@ fun AbstractAppInfo.uninstall(activity: Activity) {
|
||||||
|
|
||||||
Log.i(LOG_TAG, "uninstalling $this")
|
Log.i(LOG_TAG, "uninstalling $this")
|
||||||
|
|
||||||
val intent = Intent(Intent.ACTION_DELETE)
|
val intent = Intent(Intent.ACTION_UNINSTALL_PACKAGE)
|
||||||
intent.data = "package:$packageName".toUri()
|
intent.data = "package:$packageName".toUri()
|
||||||
getUserFromId(userId, activity).let { user ->
|
getUserFromId(userId, activity).let { user ->
|
||||||
intent.putExtra(Intent.EXTRA_USER, user)
|
intent.putExtra(Intent.EXTRA_USER, user)
|
||||||
}
|
}
|
||||||
activity.startActivity(intent)
|
|
||||||
|
|
||||||
|
intent.putExtra(Intent.EXTRA_RETURN_RESULT, true)
|
||||||
|
activity.startActivityForResult(
|
||||||
|
intent,
|
||||||
|
REQUEST_UNINSTALL
|
||||||
|
)
|
||||||
} else if(this is PinnedShortcutInfo) {
|
} else if(this is PinnedShortcutInfo) {
|
||||||
val pinned = LauncherPreferences.apps().pinnedShortcuts() ?: mutableSetOf()
|
val pinned = LauncherPreferences.apps().pinnedShortcuts() ?: mutableSetOf()
|
||||||
pinned.remove(this)
|
pinned.remove(this)
|
||||||
|
@ -95,8 +102,8 @@ fun AbstractDetailedAppInfo.showRenameDialog(context: Context) {
|
||||||
AlertDialog.Builder(context, R.style.AlertDialogCustom).apply {
|
AlertDialog.Builder(context, R.style.AlertDialogCustom).apply {
|
||||||
setTitle(context.getString(R.string.dialog_rename_title, getLabel()))
|
setTitle(context.getString(R.string.dialog_rename_title, getLabel()))
|
||||||
setView(R.layout.dialog_rename_app)
|
setView(R.layout.dialog_rename_app)
|
||||||
setNegativeButton(android.R.string.cancel) { d, _ -> d.cancel() }
|
setNegativeButton(R.string.dialog_cancel) { d, _ -> d.cancel() }
|
||||||
setPositiveButton(android.R.string.ok) { d, _ ->
|
setPositiveButton(R.string.dialog_rename_ok) { d, _ ->
|
||||||
setCustomLabel(
|
setCustomLabel(
|
||||||
(d as? AlertDialog)
|
(d as? AlertDialog)
|
||||||
?.findViewById<EditText>(R.id.dialog_rename_app_edit_text)
|
?.findViewById<EditText>(R.id.dialog_rename_app_edit_text)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package de.jrpie.android.launcher.ui.list.other
|
package de.jrpie.android.launcher.ui.list.other
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
import android.content.Intent
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -8,8 +9,7 @@ import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
import de.jrpie.android.launcher.actions.Action
|
import de.jrpie.android.launcher.REQUEST_CHOOSE_APP
|
||||||
import de.jrpie.android.launcher.actions.Gesture
|
|
||||||
import de.jrpie.android.launcher.actions.LauncherAction
|
import de.jrpie.android.launcher.actions.LauncherAction
|
||||||
import de.jrpie.android.launcher.ui.list.ListActivity
|
import de.jrpie.android.launcher.ui.list.ListActivity
|
||||||
|
|
||||||
|
@ -36,10 +36,7 @@ class OtherRecyclerAdapter(val activity: Activity) :
|
||||||
val pos = bindingAdapterPosition
|
val pos = bindingAdapterPosition
|
||||||
val content = othersList[pos]
|
val content = othersList[pos]
|
||||||
|
|
||||||
activity.finish()
|
(activity as? ListActivity)?.forGesture?.let { returnChoiceIntent(it, content) }
|
||||||
val gestureId = (activity as? ListActivity)?.forGesture ?: return
|
|
||||||
val gesture = Gesture.byId(gestureId) ?: return
|
|
||||||
Action.setActionForGesture(gesture, content)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -64,4 +61,12 @@ class OtherRecyclerAdapter(val activity: Activity) :
|
||||||
val view: View = inflater.inflate(R.layout.list_other_row, parent, false)
|
val view: View = inflater.inflate(R.layout.list_other_row, parent, false)
|
||||||
return ViewHolder(view)
|
return ViewHolder(view)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun returnChoiceIntent(forGesture: String, action: LauncherAction) {
|
||||||
|
val returnIntent = Intent()
|
||||||
|
returnIntent.putExtra("forGesture", forGesture)
|
||||||
|
action.writeToIntent(returnIntent)
|
||||||
|
activity.setResult(REQUEST_CHOOSE_APP, returnIntent)
|
||||||
|
activity.finish()
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package de.jrpie.android.launcher.ui.settings
|
package de.jrpie.android.launcher.ui.settings
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
|
@ -7,14 +8,17 @@ import android.os.Bundle
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentManager
|
||||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
import androidx.fragment.app.FragmentPagerAdapter
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import androidx.viewpager.widget.ViewPager
|
||||||
|
import com.google.android.material.tabs.TabLayout
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
import de.jrpie.android.launcher.REQUEST_CHOOSE_APP
|
||||||
import de.jrpie.android.launcher.databinding.SettingsBinding
|
import de.jrpie.android.launcher.databinding.SettingsBinding
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import de.jrpie.android.launcher.preferences.theme.Background
|
import de.jrpie.android.launcher.preferences.theme.Background
|
||||||
import de.jrpie.android.launcher.preferences.theme.ColorTheme
|
import de.jrpie.android.launcher.preferences.theme.ColorTheme
|
||||||
|
import de.jrpie.android.launcher.saveListActivityChoice
|
||||||
import de.jrpie.android.launcher.ui.UIObject
|
import de.jrpie.android.launcher.ui.UIObject
|
||||||
import de.jrpie.android.launcher.ui.settings.actions.SettingsFragmentActions
|
import de.jrpie.android.launcher.ui.settings.actions.SettingsFragmentActions
|
||||||
import de.jrpie.android.launcher.ui.settings.launcher.SettingsFragmentLauncher
|
import de.jrpie.android.launcher.ui.settings.launcher.SettingsFragmentLauncher
|
||||||
|
@ -45,7 +49,7 @@ class SettingsActivity : AppCompatActivity(), UIObject {
|
||||||
// This ugly workaround causes a jump to the top of the list, but at least
|
// This ugly workaround causes a jump to the top of the list, but at least
|
||||||
// the text stays readable.
|
// the text stays readable.
|
||||||
val i = Intent(this, SettingsActivity::class.java)
|
val i = Intent(this, SettingsActivity::class.java)
|
||||||
.also { it.putExtra(EXTRA_TAB, 1) }
|
.also { it.putExtra("tab", 1) }
|
||||||
finish()
|
finish()
|
||||||
startActivity(i)
|
startActivity(i)
|
||||||
} else
|
} else
|
||||||
|
@ -67,14 +71,15 @@ class SettingsActivity : AppCompatActivity(), UIObject {
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
// set up tabs and swiping in settings
|
// set up tabs and swiping in settings
|
||||||
val sectionsPagerAdapter = SettingsSectionsPagerAdapter(this)
|
val sectionsPagerAdapter = SettingsSectionsPagerAdapter(this, supportFragmentManager)
|
||||||
binding.settingsViewpager.apply {
|
val viewPager: ViewPager = findViewById(R.id.settings_viewpager)
|
||||||
adapter = sectionsPagerAdapter
|
viewPager.adapter = sectionsPagerAdapter
|
||||||
setCurrentItem(intent.getIntExtra(EXTRA_TAB, 0), false)
|
|
||||||
|
val tabs: TabLayout = findViewById(R.id.settings_tabs)
|
||||||
|
tabs.setupWithViewPager(viewPager)
|
||||||
|
if (intent.hasExtra("tab")) {
|
||||||
|
tabs.getTabAt(intent.getIntExtra("tab", 0))?.select()
|
||||||
}
|
}
|
||||||
TabLayoutMediator(binding.settingsTabs, binding.settingsViewpager) { tab, position ->
|
|
||||||
tab.text = sectionsPagerAdapter.getPageTitle(position)
|
|
||||||
}.attach()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
|
@ -103,8 +108,11 @@ class SettingsActivity : AppCompatActivity(), UIObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
private const val EXTRA_TAB = "tab"
|
when (requestCode) {
|
||||||
|
REQUEST_CHOOSE_APP -> saveListActivityChoice(data)
|
||||||
|
else -> super.onActivityResult(requestCode, resultCode, data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,10 +122,10 @@ private val TAB_TITLES = arrayOf(
|
||||||
R.string.settings_tab_meta
|
R.string.settings_tab_meta
|
||||||
)
|
)
|
||||||
|
|
||||||
class SettingsSectionsPagerAdapter(private val activity: FragmentActivity) :
|
class SettingsSectionsPagerAdapter(private val context: Context, fm: FragmentManager) :
|
||||||
FragmentStateAdapter(activity) {
|
FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
||||||
|
|
||||||
override fun createFragment(position: Int): Fragment {
|
override fun getItem(position: Int): Fragment {
|
||||||
return when (position) {
|
return when (position) {
|
||||||
0 -> SettingsFragmentActions()
|
0 -> SettingsFragmentActions()
|
||||||
1 -> SettingsFragmentLauncher()
|
1 -> SettingsFragmentLauncher()
|
||||||
|
@ -126,11 +134,11 @@ class SettingsSectionsPagerAdapter(private val activity: FragmentActivity) :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getPageTitle(position: Int): CharSequence {
|
override fun getPageTitle(position: Int): CharSequence {
|
||||||
return activity.resources.getString(TAB_TITLES[position])
|
return context.resources.getString(TAB_TITLES[position])
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getCount(): Int {
|
||||||
return 3
|
return 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import androidx.fragment.app.Fragment
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
import de.jrpie.android.launcher.REQUEST_CHOOSE_APP
|
||||||
import de.jrpie.android.launcher.actions.Action
|
import de.jrpie.android.launcher.actions.Action
|
||||||
import de.jrpie.android.launcher.actions.Gesture
|
import de.jrpie.android.launcher.actions.Gesture
|
||||||
import de.jrpie.android.launcher.apps.AppFilter
|
import de.jrpie.android.launcher.apps.AppFilter
|
||||||
|
@ -178,6 +179,9 @@ class ActionsRecyclerAdapter(val activity: Activity) :
|
||||||
intent.putExtra("intention", ListActivity.ListActivityIntention.PICK.toString())
|
intent.putExtra("intention", ListActivity.ListActivityIntention.PICK.toString())
|
||||||
intent.putExtra("hiddenVisibility", AppFilter.Companion.AppSetVisibility.VISIBLE)
|
intent.putExtra("hiddenVisibility", AppFilter.Companion.AppSetVisibility.VISIBLE)
|
||||||
intent.putExtra("forGesture", gesture.id) // for which action we choose the app
|
intent.putExtra("forGesture", gesture.id) // for which action we choose the app
|
||||||
activity.startActivity(intent)
|
activity.startActivityForResult(
|
||||||
|
intent,
|
||||||
|
REQUEST_CHOOSE_APP
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.jrpie.android.launcher.ui.settings.meta
|
||||||
|
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -19,6 +20,7 @@ import de.jrpie.android.launcher.openTutorial
|
||||||
import de.jrpie.android.launcher.preferences.resetPreferences
|
import de.jrpie.android.launcher.preferences.resetPreferences
|
||||||
import de.jrpie.android.launcher.ui.LegalInfoActivity
|
import de.jrpie.android.launcher.ui.LegalInfoActivity
|
||||||
import de.jrpie.android.launcher.ui.UIObject
|
import de.jrpie.android.launcher.ui.UIObject
|
||||||
|
import de.jrpie.android.launcher.ui.tutorial.TutorialActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [SettingsFragmentMeta] is a used as a tab in the SettingsActivity.
|
* The [SettingsFragmentMeta] is a used as a tab in the SettingsActivity.
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package de.jrpie.android.launcher.ui.tutorial
|
package de.jrpie.android.launcher.ui.tutorial
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
@ -11,8 +12,10 @@ import androidx.fragment.app.FragmentActivity
|
||||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||||
import androidx.viewpager2.widget.ViewPager2
|
import androidx.viewpager2.widget.ViewPager2
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
|
import de.jrpie.android.launcher.REQUEST_CHOOSE_APP
|
||||||
import de.jrpie.android.launcher.databinding.TutorialBinding
|
import de.jrpie.android.launcher.databinding.TutorialBinding
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
|
import de.jrpie.android.launcher.saveListActivityChoice
|
||||||
import de.jrpie.android.launcher.ui.UIObject
|
import de.jrpie.android.launcher.ui.UIObject
|
||||||
import de.jrpie.android.launcher.ui.blink
|
import de.jrpie.android.launcher.ui.blink
|
||||||
import de.jrpie.android.launcher.ui.tutorial.tabs.TutorialFragment0Start
|
import de.jrpie.android.launcher.ui.tutorial.tabs.TutorialFragment0Start
|
||||||
|
@ -33,7 +36,6 @@ class TutorialActivity : AppCompatActivity(), UIObject {
|
||||||
|
|
||||||
private lateinit var binding: TutorialBinding
|
private lateinit var binding: TutorialBinding
|
||||||
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super<AppCompatActivity>.onCreate(savedInstanceState)
|
super<AppCompatActivity>.onCreate(savedInstanceState)
|
||||||
super<UIObject>.onCreate()
|
super<UIObject>.onCreate()
|
||||||
|
@ -111,9 +113,14 @@ class TutorialActivity : AppCompatActivity(), UIObject {
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
when (requestCode) {
|
||||||
|
REQUEST_CHOOSE_APP -> saveListActivityChoice(data)
|
||||||
|
else -> super.onActivityResult(requestCode, resultCode, data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// prevent going back when the tutorial is shown for the first time
|
// prevent going back when the tutorial is shown for the first time
|
||||||
@Deprecated("Deprecated in Java", ReplaceWith("use anyway"))
|
|
||||||
@Suppress("deprecation") // support API level < 33
|
|
||||||
override fun onBackPressed() {
|
override fun onBackPressed() {
|
||||||
if (LauncherPreferences.internal().started())
|
if (LauncherPreferences.internal().started())
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
|
|
|
@ -12,7 +12,6 @@ class HtmlTextView(context: Context, attr: AttributeSet?, int: Int) :
|
||||||
constructor(context: Context) : this(context, null, 0)
|
constructor(context: Context) : this(context, null, 0)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
@Suppress("deprecation") // required to support API level < 24
|
|
||||||
text = Html.fromHtml(text.toString())
|
text = Html.fromHtml(text.toString())
|
||||||
movementMethod = LinkMovementMethod.getInstance()
|
movementMethod = LinkMovementMethod.getInstance()
|
||||||
}
|
}
|
||||||
|
|
11
app/src/main/res/drawable/baseline_more_horiz_24.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:width="24dp">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="?android:textColor"
|
||||||
|
android:pathData="M6,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
|
||||||
|
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#252827"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
</vector>
|
6
app/src/main/res/drawable/round_outline.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- https://stackoverflow.com/a/30692466 -->
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
</shape>
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
@ -116,7 +116,7 @@
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@android:string/ok"
|
android:text="@string/pin_shortcut_button_ok"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -95,7 +95,7 @@
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager.widget.ViewPager
|
||||||
android:id="@+id/list_viewpager"
|
android:id="@+id/list_viewpager"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager.widget.ViewPager
|
||||||
android:id="@+id/settings_viewpager"
|
android:id="@+id/settings_viewpager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tutorial_setup_title" />
|
app:layout_constraintTop_toBottomOf="@id/tutorial_setup_title" />
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<fragment
|
||||||
android:id="@+id/tutorial_setup_actions_rview_fragment"
|
android:id="@+id/tutorial_setup_actions_rview_fragment"
|
||||||
android:name="de.jrpie.android.launcher.ui.settings.actions.SettingsFragmentActionsRecycler"
|
android:name="de.jrpie.android.launcher.ui.settings.actions.SettingsFragmentActionsRecycler"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 612 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 372 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 880 B |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
Normal file
After Width: | Height: | Size: 2 KiB |
|
@ -67,6 +67,7 @@
|
||||||
<string name="settings_gesture_time">Uhr</string>
|
<string name="settings_gesture_time">Uhr</string>
|
||||||
<string name="settings_gesture_description_time">Auf die Uhrzeit klicken</string>
|
<string name="settings_gesture_description_time">Auf die Uhrzeit klicken</string>
|
||||||
<string name="settings_apps_choose">App wählen</string>
|
<string name="settings_apps_choose">App wählen</string>
|
||||||
|
<string name="settings_apps_view_all">Alle Anwendungen</string>
|
||||||
<string name="settings_apps_install">Apps installieren</string>
|
<string name="settings_apps_install">Apps installieren</string>
|
||||||
<string name="settings_apps_toast_store_not_found">Store nicht gefunden</string>
|
<string name="settings_apps_toast_store_not_found">Store nicht gefunden</string>
|
||||||
<!--
|
<!--
|
||||||
|
@ -93,8 +94,10 @@
|
||||||
<string name="settings_theme_color_theme_item_dark">Dunkel</string>
|
<string name="settings_theme_color_theme_item_dark">Dunkel</string>
|
||||||
<string name="settings_theme_color_theme_item_light">Hell</string>
|
<string name="settings_theme_color_theme_item_light">Hell</string>
|
||||||
<string name="settings_theme_wallpaper">Hintergrund auswählen</string>
|
<string name="settings_theme_wallpaper">Hintergrund auswählen</string>
|
||||||
|
<string name="settings_launcher_change_wallpaper">Hintergrund ändern</string>
|
||||||
<string name="settings_launcher_section_display">Bildschirm</string>
|
<string name="settings_launcher_section_display">Bildschirm</string>
|
||||||
<string name="settings_display_screen_timeout_disabled">Bildschirm nicht ausschalten</string>
|
<string name="settings_display_screen_timeout_disabled">Bildschirm nicht ausschalten</string>
|
||||||
|
<string name="settings_display_full_screen">Vollbild</string>
|
||||||
<string name="settings_display_rotate_screen">Bildschirm drehen</string>
|
<string name="settings_display_rotate_screen">Bildschirm drehen</string>
|
||||||
<string name="settings_launcher_section_functionality">Funktionalität</string>
|
<string name="settings_launcher_section_functionality">Funktionalität</string>
|
||||||
<string name="settings_enabled_gestures_double_swipe">Doppelte Wischaktionen</string>
|
<string name="settings_enabled_gestures_double_swipe">Doppelte Wischaktionen</string>
|
||||||
|
@ -115,6 +118,7 @@
|
||||||
<string name="settings_list_layout_item_grid">Raster</string>
|
<string name="settings_list_layout_item_grid">Raster</string>
|
||||||
<string name="settings_general_choose_home_screen">Launcher wählen</string>
|
<string name="settings_general_choose_home_screen">Launcher wählen</string>
|
||||||
<string name="settings_meta_cant_select_launcher">App Info</string>
|
<string name="settings_meta_cant_select_launcher">App Info</string>
|
||||||
|
<string name="settings_meta_cant_select_launcher_msg">Das Gerät unterstützt diese Funktion nicht. Stattdessen die App Details bearbeiten?</string>
|
||||||
<string name="settings_meta_show_tutorial">Zum Tutorial</string>
|
<string name="settings_meta_show_tutorial">Zum Tutorial</string>
|
||||||
<string name="settings_meta_reset">Einstellungen zurücksetzen</string>
|
<string name="settings_meta_reset">Einstellungen zurücksetzen</string>
|
||||||
<string name="settings_meta_reset_confirm">Alle Einstellungen gehen verloren. Weitermachen?</string>
|
<string name="settings_meta_reset_confirm">Alle Einstellungen gehen verloren. Weitermachen?</string>
|
||||||
|
@ -141,6 +145,8 @@
|
||||||
<string name="list_app_info">App Info</string>
|
<string name="list_app_info">App Info</string>
|
||||||
<string name="list_app_hidden_remove">Sichtbar machen</string>
|
<string name="list_app_hidden_remove">Sichtbar machen</string>
|
||||||
<string name="list_app_rename">Umbenennen</string>
|
<string name="list_app_rename">Umbenennen</string>
|
||||||
|
<string name="list_removed">Die App wurde entfernt</string>
|
||||||
|
<string name="list_not_removed">Die App konnte nicht entfernt werden</string>
|
||||||
<string name="list_apps_search_hint">Anwendungen suchen</string>
|
<string name="list_apps_search_hint">Anwendungen suchen</string>
|
||||||
<string name="list_apps_search_hint_no_auto_launch">Suchen (kein Schnellstart)</string>
|
<string name="list_apps_search_hint_no_auto_launch">Suchen (kein Schnellstart)</string>
|
||||||
<string name="list_other_settings">µLauncher Einstellungen</string>
|
<string name="list_other_settings">µLauncher Einstellungen</string>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<string name="settings_gesture_date">Toca la fecha</string>
|
<string name="settings_gesture_date">Toca la fecha</string>
|
||||||
<string name="settings_gesture_time">Toca el reloj</string>
|
<string name="settings_gesture_time">Toca el reloj</string>
|
||||||
<string name="settings_apps_choose">Elegir Aplicación</string>
|
<string name="settings_apps_choose">Elegir Aplicación</string>
|
||||||
|
<string name="settings_apps_view_all">Todas las aplicaciones</string>
|
||||||
<string name="settings_apps_install">Instalar aplicaciones</string>
|
<string name="settings_apps_install">Instalar aplicaciones</string>
|
||||||
<string name="settings_apps_toast_store_not_found">No se encontró la Store</string>
|
<string name="settings_apps_toast_store_not_found">No se encontró la Store</string>
|
||||||
<!--
|
<!--
|
||||||
|
@ -59,8 +60,10 @@
|
||||||
<string name="settings_theme_color_theme_item_dark">Oscuro</string>
|
<string name="settings_theme_color_theme_item_dark">Oscuro</string>
|
||||||
<string name="settings_theme_color_theme_item_light">Luminoso</string>
|
<string name="settings_theme_color_theme_item_light">Luminoso</string>
|
||||||
<string name="settings_theme_wallpaper">Seleccionar fondo de pantalla</string>
|
<string name="settings_theme_wallpaper">Seleccionar fondo de pantalla</string>
|
||||||
|
<string name="settings_launcher_change_wallpaper">Cambiar fondo de pantalla</string>
|
||||||
<string name="settings_launcher_section_display">Pantalla</string>
|
<string name="settings_launcher_section_display">Pantalla</string>
|
||||||
<string name="settings_display_screen_timeout_disabled">Mantener encendida</string>
|
<string name="settings_display_screen_timeout_disabled">Mantener encendida</string>
|
||||||
|
<string name="settings_display_full_screen">Pantalla completa</string>
|
||||||
<string name="settings_launcher_section_functionality">Funciones</string>
|
<string name="settings_launcher_section_functionality">Funciones</string>
|
||||||
<string name="settings_enabled_gestures_double_swipe">Deslizar con dos dedos</string>
|
<string name="settings_enabled_gestures_double_swipe">Deslizar con dos dedos</string>
|
||||||
<string name="settings_functionality_auto_launch">Auto-lanzar búsquedas</string>
|
<string name="settings_functionality_auto_launch">Auto-lanzar búsquedas</string>
|
||||||
|
@ -73,6 +76,7 @@
|
||||||
-->
|
-->
|
||||||
<string name="settings_general_choose_home_screen">Seleccionar Launcher</string>
|
<string name="settings_general_choose_home_screen">Seleccionar Launcher</string>
|
||||||
<string name="settings_meta_cant_select_launcher">Información de la aplicación</string>
|
<string name="settings_meta_cant_select_launcher">Información de la aplicación</string>
|
||||||
|
<string name="settings_meta_cant_select_launcher_msg">Su dispositivo no posee esta caracrerística. Desea cambiar los detalles de la aplicación?</string>
|
||||||
<string name="settings_meta_show_tutorial">Ver tutorial de Launcher</string>
|
<string name="settings_meta_show_tutorial">Ver tutorial de Launcher</string>
|
||||||
<string name="settings_meta_reset">Configuración por defecto</string>
|
<string name="settings_meta_reset">Configuración por defecto</string>
|
||||||
<string name="settings_meta_reset_confirm">Todas sus preferencias se eliminarán. Desea continuar?</string>
|
<string name="settings_meta_reset_confirm">Todas sus preferencias se eliminarán. Desea continuar?</string>
|
||||||
|
@ -92,6 +96,8 @@
|
||||||
<string name="list_tab_other">Otros</string>
|
<string name="list_tab_other">Otros</string>
|
||||||
<string name="list_app_delete">Desinstalar</string>
|
<string name="list_app_delete">Desinstalar</string>
|
||||||
<string name="list_app_info">Información</string>
|
<string name="list_app_info">Información</string>
|
||||||
|
<string name="list_removed">Se eliminó la aplicación</string>
|
||||||
|
<string name="list_not_removed">No se pudo eliminar la aplicación</string>
|
||||||
<string name="list_apps_search_hint">Buscar Aplicaciones</string>
|
<string name="list_apps_search_hint">Buscar Aplicaciones</string>
|
||||||
<string name="list_other_settings">Configuración de Launcher</string>
|
<string name="list_other_settings">Configuración de Launcher</string>
|
||||||
<string name="list_other_list">Aplicaciones</string>
|
<string name="list_other_list">Aplicaciones</string>
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
<string name="settings_gesture_date">Date</string>
|
<string name="settings_gesture_date">Date</string>
|
||||||
<string name="settings_gesture_time">Horloge</string>
|
<string name="settings_gesture_time">Horloge</string>
|
||||||
<string name="settings_apps_choose">Choisir une application</string>
|
<string name="settings_apps_choose">Choisir une application</string>
|
||||||
|
<string name="settings_apps_view_all">Voir toutes les applications</string>
|
||||||
<string name="settings_apps_install">Installer des applications</string>
|
<string name="settings_apps_install">Installer des applications</string>
|
||||||
<string name="settings_apps_toast_store_not_found">Magasin d\'applications introuvable</string>
|
<string name="settings_apps_toast_store_not_found">Magasin d\'applications introuvable</string>
|
||||||
<!--
|
<!--
|
||||||
|
@ -51,8 +52,10 @@
|
||||||
<string name="settings_theme_color_theme_item_dark">Sombre</string>
|
<string name="settings_theme_color_theme_item_dark">Sombre</string>
|
||||||
<string name="settings_theme_color_theme_item_light">Clair</string>
|
<string name="settings_theme_color_theme_item_light">Clair</string>
|
||||||
<string name="settings_theme_wallpaper">Choisir un fond d\'écran</string>
|
<string name="settings_theme_wallpaper">Choisir un fond d\'écran</string>
|
||||||
|
<string name="settings_launcher_change_wallpaper">Changer le fond d\'écran</string>
|
||||||
<string name="settings_launcher_section_display">Écran</string>
|
<string name="settings_launcher_section_display">Écran</string>
|
||||||
<string name="settings_display_screen_timeout_disabled">Garder l\'écran allumé</string>
|
<string name="settings_display_screen_timeout_disabled">Garder l\'écran allumé</string>
|
||||||
|
<string name="settings_display_full_screen">Utiliser le plein écran</string>
|
||||||
<string name="settings_launcher_section_functionality">Fonctions</string>
|
<string name="settings_launcher_section_functionality">Fonctions</string>
|
||||||
<string name="settings_enabled_gestures_double_swipe">Actions de double balayage</string>
|
<string name="settings_enabled_gestures_double_swipe">Actions de double balayage</string>
|
||||||
<string name="settings_functionality_auto_launch">Lancer apps par recherche</string>
|
<string name="settings_functionality_auto_launch">Lancer apps par recherche</string>
|
||||||
|
@ -65,6 +68,7 @@
|
||||||
-->
|
-->
|
||||||
<string name="settings_general_choose_home_screen">Choisir μLauncher comme application d\'écran d\'accueil par défaut</string>
|
<string name="settings_general_choose_home_screen">Choisir μLauncher comme application d\'écran d\'accueil par défaut</string>
|
||||||
<string name="settings_meta_cant_select_launcher">Informations sur l\'application</string>
|
<string name="settings_meta_cant_select_launcher">Informations sur l\'application</string>
|
||||||
|
<string name="settings_meta_cant_select_launcher_msg">Votre appareil ne prend pas en charge cette fonctionnalité. Souhaitez-vous plutôt accéder aux détails de l\'application ?</string>
|
||||||
<string name="settings_meta_show_tutorial">Regarder le tutoriel</string>
|
<string name="settings_meta_show_tutorial">Regarder le tutoriel</string>
|
||||||
<string name="settings_meta_reset">Réinitialiser</string>
|
<string name="settings_meta_reset">Réinitialiser</string>
|
||||||
<string name="settings_meta_reset_confirm">Vous allez réinitialiser tous vos paramètres. Souhaitez-vous poursuivre ?</string>
|
<string name="settings_meta_reset_confirm">Vous allez réinitialiser tous vos paramètres. Souhaitez-vous poursuivre ?</string>
|
||||||
|
@ -84,6 +88,8 @@
|
||||||
<string name="list_tab_other">Autre</string>
|
<string name="list_tab_other">Autre</string>
|
||||||
<string name="list_app_delete">Désinstaller</string>
|
<string name="list_app_delete">Désinstaller</string>
|
||||||
<string name="list_app_info">Informations</string>
|
<string name="list_app_info">Informations</string>
|
||||||
|
<string name="list_removed">Application supprimée</string>
|
||||||
|
<string name="list_not_removed">Impossible de désinstaller l\'application</string>
|
||||||
<string name="list_apps_search_hint">Chercher des applications</string>
|
<string name="list_apps_search_hint">Chercher des applications</string>
|
||||||
<string name="list_other_settings">Réglages d\'µLauncher</string>
|
<string name="list_other_settings">Réglages d\'µLauncher</string>
|
||||||
<string name="list_other_list">Toutes les Applications</string>
|
<string name="list_other_list">Toutes les Applications</string>
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
<br/><br/><br/><br/>
|
<br/><br/><br/><br/>
|
||||||
Puoi cambiare le tue scelte in seguito nelle impostazioni.
|
Puoi cambiare le tue scelte in seguito nelle impostazioni.
|
||||||
]]></string>
|
]]></string>
|
||||||
|
<string name="settings_meta_cant_select_launcher_msg">Il tuo dispositivo non supporta questa funzione. Vuoi aprire la pagina di dettaglio dell\'applicazione?</string>
|
||||||
<string name="alert_cant_open_title">Impossibile aprire l\'applicazione</string>
|
<string name="alert_cant_open_title">Impossibile aprire l\'applicazione</string>
|
||||||
<string name="alert_cant_open_message">Desideri modificare le impostazioni?</string>
|
<string name="alert_cant_open_message">Desideri modificare le impostazioni?</string>
|
||||||
<string name="toast_cant_open_message">Apri le impostazioni per abbinare un\'azione a questo gesto</string>
|
<string name="toast_cant_open_message">Apri le impostazioni per abbinare un\'azione a questo gesto</string>
|
||||||
|
@ -82,6 +83,7 @@
|
||||||
<string name="settings_gesture_description_vol_up">Premi il pulsante di aumento del volume</string>
|
<string name="settings_gesture_description_vol_up">Premi il pulsante di aumento del volume</string>
|
||||||
<string name="settings_gesture_vol_down">Riduci il volume</string>
|
<string name="settings_gesture_vol_down">Riduci il volume</string>
|
||||||
<string name="settings_gesture_description_vol_down">Premi il pulsante per ridurre il volume</string>
|
<string name="settings_gesture_description_vol_down">Premi il pulsante per ridurre il volume</string>
|
||||||
|
<string name="settings_apps_view_all">Vedi tutte le applicazioni</string>
|
||||||
<string name="settings_apps_install">Installa le applicazioni</string>
|
<string name="settings_apps_install">Installa le applicazioni</string>
|
||||||
<string name="settings_theme_monochrome_icons">Icone monocromatiche</string>
|
<string name="settings_theme_monochrome_icons">Icone monocromatiche</string>
|
||||||
<string name="settings_clock_time_visible">Mostra l\'ora</string>
|
<string name="settings_clock_time_visible">Mostra l\'ora</string>
|
||||||
|
@ -110,8 +112,10 @@
|
||||||
<string name="settings_theme_font">Font</string>
|
<string name="settings_theme_font">Font</string>
|
||||||
<string name="settings_clock_flip_date_time">Inverti data e ora</string>
|
<string name="settings_clock_flip_date_time">Inverti data e ora</string>
|
||||||
<string name="settings_theme_wallpaper">Scegli uno sfondo</string>
|
<string name="settings_theme_wallpaper">Scegli uno sfondo</string>
|
||||||
|
<string name="settings_launcher_change_wallpaper">Cambia immagine di sfondo</string>
|
||||||
<string name="settings_launcher_section_display">Schermo</string>
|
<string name="settings_launcher_section_display">Schermo</string>
|
||||||
<string name="settings_display_screen_timeout_disabled">Mantieni lo schermo acceso</string>
|
<string name="settings_display_screen_timeout_disabled">Mantieni lo schermo acceso</string>
|
||||||
|
<string name="settings_display_full_screen">Schermo intero</string>
|
||||||
<string name="settings_display_rotate_screen">Ruota lo schermo</string>
|
<string name="settings_display_rotate_screen">Ruota lo schermo</string>
|
||||||
<string name="settings_launcher_section_functionality">Funzionalità</string>
|
<string name="settings_launcher_section_functionality">Funzionalità</string>
|
||||||
<string name="settings_functionality_auto_keyboard">Apri automaticamente la tastiera per cercare</string>
|
<string name="settings_functionality_auto_keyboard">Apri automaticamente la tastiera per cercare</string>
|
||||||
|
@ -177,6 +181,7 @@
|
||||||
<string name="list_app_hidden_add">Nascondi</string>
|
<string name="list_app_hidden_add">Nascondi</string>
|
||||||
<string name="list_app_hidden_remove">Mostra</string>
|
<string name="list_app_hidden_remove">Mostra</string>
|
||||||
<string name="list_app_rename">Rinomina</string>
|
<string name="list_app_rename">Rinomina</string>
|
||||||
|
<string name="list_removed">Le applicazioni selezionate sono state rimosse</string>
|
||||||
<string name="list_apps_search_hint">Cerca</string>
|
<string name="list_apps_search_hint">Cerca</string>
|
||||||
<string name="list_other_settings">Impostazioni μLauncher</string>
|
<string name="list_other_settings">Impostazioni μLauncher</string>
|
||||||
<string name="list_other_expand_notifications_panel">Espandi il pannello notifiche</string>
|
<string name="list_other_expand_notifications_panel">Espandi il pannello notifiche</string>
|
||||||
|
@ -192,6 +197,7 @@
|
||||||
<string name="alert_requires_android_m">Questa funzione richiede Android 6 o successivi.</string>
|
<string name="alert_requires_android_m">Questa funzione richiede Android 6 o successivi.</string>
|
||||||
<string name="dialog_rename_ok">Ok</string>
|
<string name="dialog_rename_ok">Ok</string>
|
||||||
<string name="dialog_rename_title">Rinomina %1$s</string>
|
<string name="dialog_rename_title">Rinomina %1$s</string>
|
||||||
|
<string name="list_not_removed">Impossibile rimuovere l\'applicazione</string>
|
||||||
<string name="settings_theme_color_theme_item_dynamic">Dinamico</string>
|
<string name="settings_theme_color_theme_item_dynamic">Dinamico</string>
|
||||||
<string name="settings_clock_color">Colore</string>
|
<string name="settings_clock_color">Colore</string>
|
||||||
<string name="settings_gesture_double_up">Due dita verso l\'alto</string>
|
<string name="settings_gesture_double_up">Due dita verso l\'alto</string>
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
<string name="settings_gesture_date">Data</string>
|
<string name="settings_gesture_date">Data</string>
|
||||||
<string name="settings_gesture_time">Hora</string>
|
<string name="settings_gesture_time">Hora</string>
|
||||||
<string name="settings_apps_choose">Selecione um app</string>
|
<string name="settings_apps_choose">Selecione um app</string>
|
||||||
|
<string name="settings_apps_view_all">Ver todos os apps</string>
|
||||||
<string name="settings_apps_install">Instalar aplicativos</string>
|
<string name="settings_apps_install">Instalar aplicativos</string>
|
||||||
<string name="settings_apps_toast_store_not_found">Loja não encontrada</string>
|
<string name="settings_apps_toast_store_not_found">Loja não encontrada</string>
|
||||||
<!--
|
<!--
|
||||||
|
@ -62,8 +63,10 @@
|
||||||
<string name="settings_clock_localized">Use formato de data localizado</string>
|
<string name="settings_clock_localized">Use formato de data localizado</string>
|
||||||
<string name="settings_clock_flip_date_time">Inverter data e hora</string>
|
<string name="settings_clock_flip_date_time">Inverter data e hora</string>
|
||||||
<string name="settings_theme_wallpaper">Escolha papel de parede</string>
|
<string name="settings_theme_wallpaper">Escolha papel de parede</string>
|
||||||
|
<string name="settings_launcher_change_wallpaper">Alterar papel de parede</string>
|
||||||
<string name="settings_launcher_section_display">Exibição</string>
|
<string name="settings_launcher_section_display">Exibição</string>
|
||||||
<string name="settings_display_screen_timeout_disabled">Manter a tela ligada</string>
|
<string name="settings_display_screen_timeout_disabled">Manter a tela ligada</string>
|
||||||
|
<string name="settings_display_full_screen">Usar tela cheia</string>
|
||||||
<string name="settings_launcher_section_functionality">Funcionalidades</string>
|
<string name="settings_launcher_section_functionality">Funcionalidades</string>
|
||||||
<string name="settings_enabled_gestures_double_swipe">Gestos com 2 dedos</string>
|
<string name="settings_enabled_gestures_double_swipe">Gestos com 2 dedos</string>
|
||||||
<string name="settings_enabled_gestures_edge_swipe">Ações de deslize nas bordas</string>
|
<string name="settings_enabled_gestures_edge_swipe">Ações de deslize nas bordas</string>
|
||||||
|
@ -77,6 +80,7 @@
|
||||||
-->
|
-->
|
||||||
<string name="settings_general_choose_home_screen">Definir o μLauncher como tela inicial</string>
|
<string name="settings_general_choose_home_screen">Definir o μLauncher como tela inicial</string>
|
||||||
<string name="settings_meta_cant_select_launcher">Informações do aplicativo</string>
|
<string name="settings_meta_cant_select_launcher">Informações do aplicativo</string>
|
||||||
|
<string name="settings_meta_cant_select_launcher_msg">Seu dispositivo não é compatível com esse recurso. Gerenciar detalhes do app em vez disso?</string>
|
||||||
<string name="settings_meta_show_tutorial">Ver tutorial do launcher</string>
|
<string name="settings_meta_show_tutorial">Ver tutorial do launcher</string>
|
||||||
<string name="settings_meta_reset">Redefinir configuraçãos</string>
|
<string name="settings_meta_reset">Redefinir configuraçãos</string>
|
||||||
<string name="settings_meta_reset_confirm">Você vai descartar todas as suas preferências. Continuar?</string>
|
<string name="settings_meta_reset_confirm">Você vai descartar todas as suas preferências. Continuar?</string>
|
||||||
|
@ -96,6 +100,8 @@
|
||||||
<string name="list_tab_other">Outros</string>
|
<string name="list_tab_other">Outros</string>
|
||||||
<string name="list_app_delete">Desinstalar</string>
|
<string name="list_app_delete">Desinstalar</string>
|
||||||
<string name="list_app_info">Informações do aplicativo</string>
|
<string name="list_app_info">Informações do aplicativo</string>
|
||||||
|
<string name="list_removed">O app selecionado foi removido</string>
|
||||||
|
<string name="list_not_removed">Não foi possível remover o app</string>
|
||||||
<string name="list_apps_search_hint">Busque</string>
|
<string name="list_apps_search_hint">Busque</string>
|
||||||
<string name="list_other_settings">Configurações do µLauncher</string>
|
<string name="list_other_settings">Configurações do µLauncher</string>
|
||||||
<string name="list_other_list">Todos os apps</string>
|
<string name="list_other_list">Todos os apps</string>
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
<string name="settings_gesture_time">Saat</string>
|
<string name="settings_gesture_time">Saat</string>
|
||||||
<string name="settings_gesture_description_time">Saate tıklayın</string>
|
<string name="settings_gesture_description_time">Saate tıklayın</string>
|
||||||
<string name="settings_apps_choose">Uygulama Seçin</string>
|
<string name="settings_apps_choose">Uygulama Seçin</string>
|
||||||
|
<string name="settings_apps_view_all">Tüm uygulamaları göster</string>
|
||||||
<string name="settings_apps_install">Uygulamaları yükle</string>
|
<string name="settings_apps_install">Uygulamaları yükle</string>
|
||||||
<string name="settings_apps_toast_store_not_found">Mağaza bulunamadı</string>
|
<string name="settings_apps_toast_store_not_found">Mağaza bulunamadı</string>
|
||||||
<string name="settings_launcher_section_appearance">Görünüş</string>
|
<string name="settings_launcher_section_appearance">Görünüş</string>
|
||||||
|
@ -119,6 +120,8 @@
|
||||||
<string name="list_other_nop">Hiçbir şey yapma</string>
|
<string name="list_other_nop">Hiçbir şey yapma</string>
|
||||||
<string name="settings_meta_view_code">Kaynak kodunu göster</string>
|
<string name="settings_meta_view_code">Kaynak kodunu göster</string>
|
||||||
<string name="settings_meta_report_bug">Hatayı bildirin</string>
|
<string name="settings_meta_report_bug">Hatayı bildirin</string>
|
||||||
|
<string name="list_removed">Seçilen uygulama kaldırıldı</string>
|
||||||
|
<string name="list_not_removed">Uygulama kaldırılamadı</string>
|
||||||
<string name="list_apps_search_hint">Uygulamaları Ara</string>
|
<string name="list_apps_search_hint">Uygulamaları Ara</string>
|
||||||
<string name="list_other_list">Tüm Uygulamalar</string>
|
<string name="list_other_list">Tüm Uygulamalar</string>
|
||||||
<string name="list_other_list_favorites">Favori Uygulamalar</string>
|
<string name="list_other_list_favorites">Favori Uygulamalar</string>
|
||||||
|
@ -131,8 +134,10 @@
|
||||||
<string name="settings_clock_show_seconds">Saniyeleri gösteri</string>
|
<string name="settings_clock_show_seconds">Saniyeleri gösteri</string>
|
||||||
<string name="settings_clock_flip_date_time">Tarih ile zamanı yer değiştir</string>
|
<string name="settings_clock_flip_date_time">Tarih ile zamanı yer değiştir</string>
|
||||||
<string name="settings_theme_wallpaper">Duvar kağıdı seç</string>
|
<string name="settings_theme_wallpaper">Duvar kağıdı seç</string>
|
||||||
|
<string name="settings_launcher_change_wallpaper">Duvar kağıdını değiştir</string>
|
||||||
<string name="settings_launcher_section_display">Ekran</string>
|
<string name="settings_launcher_section_display">Ekran</string>
|
||||||
<string name="settings_display_screen_timeout_disabled">Ekranı açık tut</string>
|
<string name="settings_display_screen_timeout_disabled">Ekranı açık tut</string>
|
||||||
|
<string name="settings_display_full_screen">Tam ekran kullan</string>
|
||||||
<string name="settings_display_rotate_screen">Ekranı döndür</string>
|
<string name="settings_display_rotate_screen">Ekranı döndür</string>
|
||||||
<string name="settings_launcher_section_functionality">İşlevsellik</string>
|
<string name="settings_launcher_section_functionality">İşlevsellik</string>
|
||||||
<string name="settings_enabled_gestures_edge_swipe_summary">Ekranın köşesinden kaydırın</string>
|
<string name="settings_enabled_gestures_edge_swipe_summary">Ekranın köşesinden kaydırın</string>
|
||||||
|
@ -160,6 +165,7 @@
|
||||||
<string name="settings_list_layout_item_text">Metin</string>
|
<string name="settings_list_layout_item_text">Metin</string>
|
||||||
<string name="settings_list_layout_item_grid">Izgara</string>
|
<string name="settings_list_layout_item_grid">Izgara</string>
|
||||||
<string name="settings_meta_cant_select_launcher">Uygulama Detayı</string>
|
<string name="settings_meta_cant_select_launcher">Uygulama Detayı</string>
|
||||||
|
<string name="settings_meta_cant_select_launcher_msg">Sizin cihazınız bu özelliği desteklemiyor. Onun yerine uygulama detaylarını düzenleyin?</string>
|
||||||
<string name="settings_meta_reset">Ayarları Sıfırlayın</string>
|
<string name="settings_meta_reset">Ayarları Sıfırlayın</string>
|
||||||
<string name="settings_meta_reset_confirm">Tüm tercihlerinizi bir kenara bırakacaksınız. Devam mı?</string>
|
<string name="settings_meta_reset_confirm">Tüm tercihlerinizi bir kenara bırakacaksınız. Devam mı?</string>
|
||||||
<string name="settings_theme_font_item_monospace">Tek uzay</string>
|
<string name="settings_theme_font_item_monospace">Tek uzay</string>
|
||||||
|
|
6
app/src/main/res/values-w820dp/dimens.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<resources>
|
||||||
|
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||||
|
(such as screen margins) for screens with more than 820dp of available width. This
|
||||||
|
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||||
|
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||||
|
</resources>
|
|
@ -37,17 +37,21 @@
|
||||||
<string name="settings_gesture_date">日期</string>
|
<string name="settings_gesture_date">日期</string>
|
||||||
<string name="settings_gesture_time">时间</string>
|
<string name="settings_gesture_time">时间</string>
|
||||||
<string name="settings_apps_choose">选择应用</string>
|
<string name="settings_apps_choose">选择应用</string>
|
||||||
|
<string name="settings_apps_view_all">浏览全部应用</string>
|
||||||
<string name="settings_apps_install">安装应用</string>
|
<string name="settings_apps_install">安装应用</string>
|
||||||
<string name="settings_apps_toast_store_not_found">没有找到应用市场</string>
|
<string name="settings_apps_toast_store_not_found">没有找到应用市场</string>
|
||||||
<string name="settings_launcher_section_date_time"><![CDATA[日期和时间]]></string>
|
<string name="settings_launcher_section_date_time"><![CDATA[日期和时间]]></string>
|
||||||
<string name="settings_theme_wallpaper">选择一个壁纸</string>
|
<string name="settings_theme_wallpaper">选择一个壁纸</string>
|
||||||
|
<string name="settings_launcher_change_wallpaper">换壁纸</string>
|
||||||
<string name="settings_display_screen_timeout_disabled">保持屏幕常亮</string>
|
<string name="settings_display_screen_timeout_disabled">保持屏幕常亮</string>
|
||||||
|
<string name="settings_display_full_screen">使用全屏</string>
|
||||||
<string name="settings_launcher_section_functionality">功能</string>
|
<string name="settings_launcher_section_functionality">功能</string>
|
||||||
<string name="settings_enabled_gestures_edge_swipe">边缘滑动动作</string>
|
<string name="settings_enabled_gestures_edge_swipe">边缘滑动动作</string>
|
||||||
<string name="settings_functionality_auto_launch">零点击启动唯一搜索结果</string>
|
<string name="settings_functionality_auto_launch">零点击启动唯一搜索结果</string>
|
||||||
<string name="settings_functionality_auto_keyboard">搜索时呼出键盘</string>
|
<string name="settings_functionality_auto_keyboard">搜索时呼出键盘</string>
|
||||||
<string name="settings_launcher_sensitivity">灵敏度</string>
|
<string name="settings_launcher_sensitivity">灵敏度</string>
|
||||||
<string name="settings_meta_cant_select_launcher">应用信息</string>
|
<string name="settings_meta_cant_select_launcher">应用信息</string>
|
||||||
|
<string name="settings_meta_cant_select_launcher_msg">您的设备不支持此功能。要不打开应用程序详细?</string>
|
||||||
<string name="settings_meta_show_tutorial">查看启动器教程</string>
|
<string name="settings_meta_show_tutorial">查看启动器教程</string>
|
||||||
<string name="settings_meta_reset">重置设置</string>
|
<string name="settings_meta_reset">重置设置</string>
|
||||||
<string name="settings_meta_reset_confirm">你将放弃你所有的配置。继续吗?</string>
|
<string name="settings_meta_reset_confirm">你将放弃你所有的配置。继续吗?</string>
|
||||||
|
@ -70,6 +74,8 @@
|
||||||
<string name="list_tab_app">应用</string>
|
<string name="list_tab_app">应用</string>
|
||||||
<string name="list_app_delete">卸载</string>
|
<string name="list_app_delete">卸载</string>
|
||||||
<string name="list_app_info">应用信息</string>
|
<string name="list_app_info">应用信息</string>
|
||||||
|
<string name="list_not_removed">无法移除应用</string>
|
||||||
|
<string name="list_removed">移除了选定的应用</string>
|
||||||
<string name="list_apps_search_hint">搜索</string>
|
<string name="list_apps_search_hint">搜索</string>
|
||||||
<string name="list_other_settings">启动器设置</string>
|
<string name="list_other_settings">启动器设置</string>
|
||||||
<string name="list_other_list">全部应用</string>
|
<string name="list_other_list">全部应用</string>
|
||||||
|
|
4
app/src/main/res/values/ic_launcher_background.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#000000</color>
|
||||||
|
</resources>
|
|
@ -101,6 +101,8 @@
|
||||||
|
|
||||||
<string name="settings_apps_choose">Choose App</string>
|
<string name="settings_apps_choose">Choose App</string>
|
||||||
|
|
||||||
|
<string name="settings_apps_view_all">View all apps</string>
|
||||||
|
|
||||||
<string name="settings_apps_install">Install apps</string>
|
<string name="settings_apps_install">Install apps</string>
|
||||||
<string name="settings_apps_toast_store_not_found">Store not found</string>
|
<string name="settings_apps_toast_store_not_found">Store not found</string>
|
||||||
|
|
||||||
|
@ -146,6 +148,7 @@
|
||||||
<string name="settings_clock_flip_date_time">Flip date and time</string>
|
<string name="settings_clock_flip_date_time">Flip date and time</string>
|
||||||
|
|
||||||
<string name="settings_theme_wallpaper">Choose a wallpaper</string>
|
<string name="settings_theme_wallpaper">Choose a wallpaper</string>
|
||||||
|
<string name="settings_launcher_change_wallpaper">Change wallpaper</string>
|
||||||
|
|
||||||
<string name="settings_launcher_section_display">Display</string>
|
<string name="settings_launcher_section_display">Display</string>
|
||||||
|
|
||||||
|
@ -237,6 +240,9 @@
|
||||||
<string name="list_app_hidden_remove">Show</string>
|
<string name="list_app_hidden_remove">Show</string>
|
||||||
<string name="list_app_rename">Rename</string>
|
<string name="list_app_rename">Rename</string>
|
||||||
|
|
||||||
|
<string name="list_removed">Removed the selected application</string>
|
||||||
|
<string name="list_not_removed">Unable to remove application</string>
|
||||||
|
|
||||||
<string name="list_apps_search_hint">Search</string>
|
<string name="list_apps_search_hint">Search</string>
|
||||||
<string name="list_apps_search_hint_no_auto_launch">Search (no auto launch)</string>
|
<string name="list_apps_search_hint_no_auto_launch">Search (no auto launch)</string>
|
||||||
|
|
||||||
|
@ -259,6 +265,7 @@
|
||||||
<!-- Pin shortcuts -->
|
<!-- Pin shortcuts -->
|
||||||
<string name="pin_shortcut_title">Add Shortcut</string>
|
<string name="pin_shortcut_title">Add Shortcut</string>
|
||||||
<string name="pin_shortcut_button_bind">Bind to gesture</string>
|
<string name="pin_shortcut_button_bind">Bind to gesture</string>
|
||||||
|
<string name="pin_shortcut_button_ok">Ok</string>
|
||||||
<string name="pin_shortcut_switch_visible">Show in app list</string>
|
<string name="pin_shortcut_switch_visible">Show in app list</string>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -354,11 +361,13 @@
|
||||||
<string name="screen_lock_method_use_accessibility">Use Accessibility Service</string>
|
<string name="screen_lock_method_use_accessibility">Use Accessibility Service</string>
|
||||||
<string name="screen_lock_method_use_device_admin">Use Device Admin</string>
|
<string name="screen_lock_method_use_device_admin">Use Device Admin</string>
|
||||||
<string name="settings_actions_lock_method">Choose method for locking the screen</string>
|
<string name="settings_actions_lock_method">Choose method for locking the screen</string>
|
||||||
|
<string name="dialog_rename_ok">Ok</string>
|
||||||
<string name="dialog_rename_title">Rename %1$s</string>
|
<string name="dialog_rename_title">Rename %1$s</string>
|
||||||
<string name="dialog_select_color_red">Red</string>
|
<string name="dialog_select_color_red">Red</string>
|
||||||
<string name="dialog_select_color_alpha">Alpha</string>
|
<string name="dialog_select_color_alpha">Alpha</string>
|
||||||
<string name="dialog_select_color_blue">Blue</string>
|
<string name="dialog_select_color_blue">Blue</string>
|
||||||
<string name="dialog_select_color_green">Green</string>
|
<string name="dialog_select_color_green">Green</string>
|
||||||
|
<string name="dialog_select_color_ok">Ok</string>
|
||||||
<string name="dialog_select_color_color_hex">Color</string>
|
<string name="dialog_select_color_color_hex">Color</string>
|
||||||
<string name="dialog_choose_color_title">Choose color</string>
|
<string name="dialog_choose_color_title">Choose color</string>
|
||||||
<string name="dialog_consent_accessibility_privileges">I am aware that this will grant far-reaching privileges to μLauncher.</string>
|
<string name="dialog_consent_accessibility_privileges">I am aware that this will grant far-reaching privileges to μLauncher.</string>
|
||||||
|
|
|
@ -105,6 +105,17 @@
|
||||||
<item name="android:fontFamily">serif</item>
|
<item name="android:fontFamily">serif</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="textColorWhite">
|
||||||
|
<item name="android:textColor">@color/finnmglasTheme_text_color</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="textColorWhiteAndShadow">
|
||||||
|
<item name="android:textColor">@color/finnmglasTheme_text_color</item>
|
||||||
|
</style>
|
||||||
|
<style name="textColorBlack">
|
||||||
|
<item name="android:textColor">#000</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="PopupMenuCustom" parent="@android:style/Widget.PopupMenu" tools:keep="@style/PopupMenuCustom">
|
<style name="PopupMenuCustom" parent="@android:style/Widget.PopupMenu" tools:keep="@style/PopupMenuCustom">
|
||||||
<item name="android:popupBackground">#252827</item>
|
<item name="android:popupBackground">#252827</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -47,4 +47,3 @@ The complete list of changes can be viewed [here](https://github.com/jrpie/launc
|
||||||
|
|
||||||
---
|
---
|
||||||
[original-repo]: https://github.com/finnmglas/Launcher
|
[original-repo]: https://github.com/finnmglas/Launcher
|
||||||
[hack-font]: https://sourcefoundry.org/hack/
|
|
||||||
|
|
|
@ -19,6 +19,6 @@ android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
# Kotlin code style for this project: "official" or "obsolete":
|
# Kotlin code style for this project: "official" or "obsolete":
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=false
|
||||||
android.nonFinalResIds=true
|
android.nonFinalResIds=false
|
||||||
org.gradle.configuration-cache=true
|
org.gradle.configuration-cache=true
|
||||||
|
|