mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 14:31:30 +01:00
renamed preferences
This commit is contained in:
parent
5dc2ee3901
commit
89093f6b9e
71 changed files with 676 additions and 884 deletions
|
@ -41,10 +41,12 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
// minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
namespace 'de.jrpie.android.launcher'
|
namespace 'de.jrpie.android.launcher'
|
||||||
|
@ -62,9 +64,8 @@ dependencies {
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation "eu.jonahbauer:android-preference-annotations:1.1.2"
|
implementation "eu.jonahbauer:android-preference-annotations:1.1.2"
|
||||||
|
annotationProcessor "eu.jonahbauer:android-preference-annotations:1.1.2"
|
||||||
implementation 'androidx.preference:preference-ktx:1.2.1'
|
implementation 'androidx.preference:preference-ktx:1.2.1'
|
||||||
//kapt "eu.jonahbauer:android-preference-annotations:1.1.2"
|
|
||||||
//annotationProcessor "eu.jonahbauer:android-preference-annotations:1.1.2"
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
|
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
|
||||||
<uses-permission
|
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
|
||||||
android:name="android.permission.QUERY_ALL_PACKAGES"
|
|
||||||
tools:ignore="QueryAllPackagesPermission" />
|
tools:ignore="QueryAllPackagesPermission" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_HIDDEN_PROFILES" />
|
<uses-permission android:name="android.permission.ACCESS_HIDDEN_PROFILES" />
|
||||||
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
|
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
|
||||||
|
@ -21,15 +20,14 @@
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".HomeActivity"
|
android:name=".HomeActivity"
|
||||||
android:clearTaskOnLaunch="true"
|
|
||||||
android:excludeFromRecents="true"
|
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
android:excludeFromRecents="true"
|
||||||
|
android:clearTaskOnLaunch="true"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
tools:ignore="LockedOrientationActivity">
|
tools:ignore="LockedOrientationActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.HOME" />
|
<category android:name="android.intent.category.HOME" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
@ -38,20 +36,22 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".tutorial.TutorialActivity"
|
android:name=".tutorial.TutorialActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
tools:ignore="LockedOrientationActivity"></activity>
|
tools:ignore="LockedOrientationActivity">
|
||||||
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".list.ListActivity"
|
android:name=".list.ListActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustResize"
|
android:windowSoftInputMode="adjustResize"
|
||||||
tools:ignore="LockedOrientationActivity"></activity>
|
tools:ignore="LockedOrientationActivity">
|
||||||
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".settings.SettingsActivity"
|
android:name=".settings.SettingsActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
tools:ignore="LockedOrientationActivity">
|
tools:ignore="LockedOrientationActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
|
<action android:name="android.intent.action.APPLICATION_PREFERENCES"/>
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
package de.jrpie.android.launcher
|
package de.jrpie.android.launcher
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import androidx.preference.PreferenceManager
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
|
|
||||||
class Application : android.app.Application() {
|
class Application: android.app.Application() {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
|
||||||
val preferences = getSharedPreferences(
|
val preferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
this.getString(R.string.preference_file_key),
|
|
||||||
Context.MODE_PRIVATE
|
|
||||||
)
|
|
||||||
LauncherPreferences.init(preferences, this.resources)
|
LauncherPreferences.init(preferences, this.resources)
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,8 +10,12 @@ import android.content.pm.ApplicationInfo
|
||||||
import android.content.pm.LauncherActivityInfo
|
import android.content.pm.LauncherActivityInfo
|
||||||
import android.content.pm.LauncherApps
|
import android.content.pm.LauncherApps
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
|
import android.graphics.BlendMode
|
||||||
|
import android.graphics.BlendModeColorFilter
|
||||||
import android.graphics.ColorMatrix
|
import android.graphics.ColorMatrix
|
||||||
import android.graphics.ColorMatrixColorFilter
|
import android.graphics.ColorMatrixColorFilter
|
||||||
|
import android.graphics.PorterDuff
|
||||||
|
import android.graphics.PorterDuffColorFilter
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.media.AudioManager
|
import android.media.AudioManager
|
||||||
|
@ -26,11 +30,16 @@ import android.util.DisplayMetrics
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.KeyEvent
|
import android.view.KeyEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.Window
|
||||||
|
import android.view.WindowManager
|
||||||
import android.view.animation.AlphaAnimation
|
import android.view.animation.AlphaAnimation
|
||||||
import android.view.animation.Animation
|
import android.view.animation.Animation
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
|
import android.widget.Button
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import android.widget.Switch
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import de.jrpie.android.launcher.list.ListActivity
|
import de.jrpie.android.launcher.list.ListActivity
|
||||||
import de.jrpie.android.launcher.list.apps.AppInfo
|
import de.jrpie.android.launcher.list.apps.AppInfo
|
||||||
import de.jrpie.android.launcher.list.apps.AppsRecyclerAdapter
|
import de.jrpie.android.launcher.list.apps.AppsRecyclerAdapter
|
||||||
|
@ -78,23 +87,19 @@ fun setDefaultHomeScreen(context: Context, checkDefault: Boolean = false) {
|
||||||
|
|
||||||
if (checkDefault
|
if (checkDefault
|
||||||
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
||||||
&& context is Activity
|
&& context is Activity) {
|
||||||
) {
|
|
||||||
val roleManager = context.getSystemService(RoleManager::class.java)
|
val roleManager = context.getSystemService(RoleManager::class.java)
|
||||||
if (!roleManager.isRoleHeld(RoleManager.ROLE_HOME)) {
|
if(!roleManager.isRoleHeld(RoleManager.ROLE_HOME)) {
|
||||||
context.startActivityForResult(
|
context.startActivityForResult(roleManager.createRequestRoleIntent(RoleManager.ROLE_HOME), REQUEST_SET_DEFAULT_HOME)
|
||||||
roleManager.createRequestRoleIntent(RoleManager.ROLE_HOME),
|
|
||||||
REQUEST_SET_DEFAULT_HOME
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkDefault) {
|
if(checkDefault) {
|
||||||
val testIntent = Intent(Intent.ACTION_MAIN)
|
val testIntent = Intent(Intent.ACTION_MAIN)
|
||||||
testIntent.addCategory(Intent.CATEGORY_HOME)
|
testIntent.addCategory(Intent.CATEGORY_HOME)
|
||||||
val defaultHome = testIntent.resolveActivity(context.packageManager)?.packageName
|
val defaultHome = testIntent.resolveActivity(context.packageManager)?.packageName
|
||||||
if (defaultHome == context.packageName) {
|
if(defaultHome == context.packageName){
|
||||||
// Launcher is already the default home app
|
// Launcher is already the default home app
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -111,8 +116,7 @@ fun isInstalled(uri: String, context: Context): Boolean {
|
||||||
try {
|
try {
|
||||||
context.packageManager.getPackageInfo(uri, PackageManager.GET_ACTIVITIES)
|
context.packageManager.getPackageInfo(uri, PackageManager.GET_ACTIVITIES)
|
||||||
return true
|
return true
|
||||||
} catch (_: PackageManager.NameNotFoundException) {
|
} catch (_: PackageManager.NameNotFoundException) { }
|
||||||
}
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,8 +133,9 @@ fun launch(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (LauncherAction.isOtherAction(data)) { // [type]:[info]
|
if (LauncherAction.isOtherAction(data)) { // [type]:[info]
|
||||||
LauncherAction.byId(data)?.let { it.launch(activity) }
|
LauncherAction.byId(data)?.let {it.launch(activity) }
|
||||||
} else launchApp(data, user, activity) // app
|
}
|
||||||
|
else launchApp(data, user, activity) // app
|
||||||
|
|
||||||
activity.overridePendingTransition(animationIn, animationOut)
|
activity.overridePendingTransition(animationIn, animationOut)
|
||||||
}
|
}
|
||||||
|
@ -143,8 +148,7 @@ fun audioNextTrack(activity: Activity) {
|
||||||
|
|
||||||
val eventTime: Long = SystemClock.uptimeMillis()
|
val eventTime: Long = SystemClock.uptimeMillis()
|
||||||
|
|
||||||
val downEvent =
|
val downEvent = KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_NEXT, 0)
|
||||||
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_NEXT, 0)
|
|
||||||
mAudioManager.dispatchMediaKeyEvent(downEvent)
|
mAudioManager.dispatchMediaKeyEvent(downEvent)
|
||||||
|
|
||||||
val upEvent = KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_NEXT, 0)
|
val upEvent = KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_NEXT, 0)
|
||||||
|
@ -160,8 +164,7 @@ fun audioPreviousTrack(activity: Activity) {
|
||||||
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0)
|
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0)
|
||||||
mAudioManager.dispatchMediaKeyEvent(downEvent)
|
mAudioManager.dispatchMediaKeyEvent(downEvent)
|
||||||
|
|
||||||
val upEvent =
|
val upEvent = KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0)
|
||||||
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0)
|
|
||||||
mAudioManager.dispatchMediaKeyEvent(upEvent)
|
mAudioManager.dispatchMediaKeyEvent(upEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,11 +199,7 @@ fun expandNotificationsPanel(context: Context) {
|
||||||
val showStatusBar = statusBarManager.getMethod("expandNotificationsPanel")
|
val showStatusBar = statusBarManager.getMethod("expandNotificationsPanel")
|
||||||
showStatusBar.invoke(statusBarService)
|
showStatusBar.invoke(statusBarService)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Toast.makeText(
|
Toast.makeText(context, context.getString(R.string.alert_cant_expand_notifications_panel), Toast.LENGTH_LONG).show()
|
||||||
context,
|
|
||||||
context.getString(R.string.alert_cant_expand_notifications_panel),
|
|
||||||
Toast.LENGTH_LONG
|
|
||||||
).show()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,39 +209,32 @@ fun getUserFromId(user: Int?, context: Context): UserHandle? {
|
||||||
val userManager = context.getSystemService(Service.USER_SERVICE) as UserManager
|
val userManager = context.getSystemService(Service.USER_SERVICE) as UserManager
|
||||||
return userManager.userProfiles.firstOrNull { it.hashCode() == user }
|
return userManager.userProfiles.firstOrNull { it.hashCode() == user }
|
||||||
}
|
}
|
||||||
|
fun getLauncherActivityInfo(packageName: String, user: Int?, context: Context): LauncherActivityInfo? {
|
||||||
fun getLauncherActivityInfo(
|
|
||||||
packageName: String,
|
|
||||||
user: Int?,
|
|
||||||
context: Context
|
|
||||||
): LauncherActivityInfo? {
|
|
||||||
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
|
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
|
||||||
return getUserFromId(user, context)?.let { userHandle ->
|
return getUserFromId(user,context)?.let {
|
||||||
launcherApps.getActivityList(packageName, userHandle).firstOrNull()
|
userHandle -> launcherApps.getActivityList(packageName, userHandle).firstOrNull()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun uninstallApp(packageName: String, user: Int?, activity: Activity) {
|
fun uninstallApp(packageName: String, user: Int?, activity: Activity) {
|
||||||
Log.i("Launcher", "uninstalling $packageName ($user)")
|
Log.i("Launcher", "uninstalling $packageName ($user)")
|
||||||
val intent = Intent(Intent.ACTION_UNINSTALL_PACKAGE)
|
val intent = Intent(Intent.ACTION_UNINSTALL_PACKAGE)
|
||||||
intent.data = Uri.parse("package:$packageName")
|
intent.data = Uri.parse("package:$packageName")
|
||||||
getUserFromId(user, activity)?.let { user ->
|
getUserFromId(user, activity)?.let {
|
||||||
intent.putExtra(Intent.EXTRA_USER, user)
|
user -> intent.putExtra(Intent.EXTRA_USER, user)
|
||||||
}
|
}
|
||||||
|
|
||||||
intent.putExtra(Intent.EXTRA_RETURN_RESULT, true)
|
intent.putExtra(Intent.EXTRA_RETURN_RESULT, true)
|
||||||
activity.startActivityForResult(
|
activity.startActivityForResult(intent,
|
||||||
intent,
|
|
||||||
REQUEST_UNINSTALL
|
REQUEST_UNINSTALL
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun launchApp(packageName: String, user: Int?, context: Context, rect: Rect? = null) {
|
fun launchApp(packageName: String, user: Int?, context: Context, rect: Rect? = null) {
|
||||||
Log.i("Launcher", "Starting: " + packageName + " (user " + user.toString() + ")")
|
Log.i("Launcher", "Starting: " + packageName + " (user " +user.toString()+ ")")
|
||||||
if (user != null) {
|
if (user != null && user != INVALID_USER) {
|
||||||
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
|
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
|
||||||
getLauncherActivityInfo(packageName, user, context)?.let { app ->
|
getLauncherActivityInfo(packageName,user,context)?.let {
|
||||||
launcherApps.startMainActivity(app.componentName, app.user, rect, null)
|
app -> launcherApps.startMainActivity(app.componentName, app.user, rect, null)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -252,7 +244,7 @@ fun launchApp(packageName: String, user: Int?, context: Context, rect: Rect? = n
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
} else {
|
} else {
|
||||||
if (isInstalled(packageName, context)) {
|
if (isInstalled(packageName, context)){
|
||||||
|
|
||||||
AlertDialog.Builder(
|
AlertDialog.Builder(
|
||||||
context,
|
context,
|
||||||
|
@ -260,8 +252,7 @@ fun launchApp(packageName: String, user: Int?, context: Context, rect: Rect? = n
|
||||||
)
|
)
|
||||||
.setTitle(context.getString(R.string.alert_cant_open_title))
|
.setTitle(context.getString(R.string.alert_cant_open_title))
|
||||||
.setMessage(context.getString(R.string.alert_cant_open_message))
|
.setMessage(context.getString(R.string.alert_cant_open_message))
|
||||||
.setPositiveButton(
|
.setPositiveButton(android.R.string.ok
|
||||||
android.R.string.ok
|
|
||||||
) { _, _ ->
|
) { _, _ ->
|
||||||
openAppSettings(
|
openAppSettings(
|
||||||
packageName,
|
packageName,
|
||||||
|
@ -292,16 +283,10 @@ fun openNewTabWindow(urls: String, context: Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun openAppSettings(
|
fun openAppSettings(packageName: String, user: Int?, context: Context, sourceBounds: Rect? = null, opts: Bundle? = null) {
|
||||||
packageName: String,
|
|
||||||
user: Int?,
|
|
||||||
context: Context,
|
|
||||||
sourceBounds: Rect? = null,
|
|
||||||
opts: Bundle? = null
|
|
||||||
) {
|
|
||||||
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
|
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
|
||||||
getLauncherActivityInfo(packageName, user, context)?.let { app ->
|
getLauncherActivityInfo(packageName, user, context)?.let {
|
||||||
launcherApps.startAppDetailsActivity(app.componentName, app.user, sourceBounds, opts)
|
app -> launcherApps.startAppDetailsActivity(app.componentName, app.user, sourceBounds, opts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,11 +294,11 @@ fun openSettings(activity: Activity) {
|
||||||
activity.startActivity(Intent(activity, SettingsActivity::class.java))
|
activity.startActivity(Intent(activity, SettingsActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun openTutorial(activity: Activity) {
|
fun openTutorial(activity: Activity){
|
||||||
activity.startActivity(Intent(activity, TutorialActivity::class.java))
|
activity.startActivity(Intent(activity, TutorialActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun openAppsList(activity: Activity) {
|
fun openAppsList(activity: Activity){
|
||||||
val intent = Intent(activity, ListActivity::class.java)
|
val intent = Intent(activity, ListActivity::class.java)
|
||||||
intent.putExtra("intention", ListActivity.ListActivityIntention.VIEW.toString())
|
intent.putExtra("intention", ListActivity.ListActivityIntention.VIEW.toString())
|
||||||
activity.startActivity(intent)
|
activity.startActivity(intent)
|
||||||
|
@ -322,9 +307,9 @@ fun openAppsList(activity: Activity) {
|
||||||
fun getAppIcon(context: Context, packageName: String, user: Int?): Drawable {
|
fun getAppIcon(context: Context, packageName: String, user: Int?): Drawable {
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
|
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
|
||||||
getUserFromId(user, context)?.let { userHandle ->
|
getUserFromId(user,context)?.let {
|
||||||
launcherApps.getActivityList(packageName, userHandle).firstOrNull()?.let { app ->
|
userHandle -> launcherApps.getActivityList(packageName, userHandle).firstOrNull()?.let {
|
||||||
return app.getBadgedIcon(0)
|
app -> return app.getBadgedIcon(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -343,22 +328,21 @@ fun loadApps(packageManager: PackageManager, context: Context) {
|
||||||
|
|
||||||
// TODO: shortcuts - launcherApps.getShortcuts()
|
// TODO: shortcuts - launcherApps.getShortcuts()
|
||||||
val users = userManager.userProfiles
|
val users = userManager.userProfiles
|
||||||
for (user in users) {
|
for(user in users) {
|
||||||
for (activityInfo in launcherApps.getActivityList(null, user)) {
|
for (activityInfo in launcherApps.getActivityList(null,user)) {
|
||||||
val app = AppInfo()
|
val app = AppInfo()
|
||||||
app.label = activityInfo.label
|
app.label = activityInfo.label
|
||||||
app.packageName = activityInfo.applicationInfo.packageName
|
app.packageName = activityInfo.applicationInfo.packageName
|
||||||
app.icon = activityInfo.getBadgedIcon(0)
|
app.icon = activityInfo.getBadgedIcon(0)
|
||||||
app.user = user.hashCode()
|
app.user = user.hashCode()
|
||||||
app.isSystemApp =
|
app.isSystemApp = activityInfo.applicationInfo.flags.and(ApplicationInfo.FLAG_SYSTEM) != 0
|
||||||
activityInfo.applicationInfo.flags.and(ApplicationInfo.FLAG_SYSTEM) != 0
|
|
||||||
loadList.add(app)
|
loadList.add(app)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// fallback option
|
// fallback option
|
||||||
if (loadList.isEmpty()) {
|
if(loadList.isEmpty()){
|
||||||
Log.i("Launcher", "using fallback option to load packages")
|
Log.i("Launcher", "using fallback option to load packages")
|
||||||
val i = Intent(Intent.ACTION_MAIN, null)
|
val i = Intent(Intent.ACTION_MAIN, null)
|
||||||
i.addCategory(Intent.CATEGORY_LAUNCHER)
|
i.addCategory(Intent.CATEGORY_LAUNCHER)
|
||||||
|
@ -380,8 +364,8 @@ fun loadApps(packageManager: PackageManager, context: Context) {
|
||||||
// Used in Tutorial and Settings `ActivityOnResult`
|
// Used in Tutorial and Settings `ActivityOnResult`
|
||||||
fun saveListActivityChoice(context: Context, data: Intent?) {
|
fun saveListActivityChoice(context: Context, data: Intent?) {
|
||||||
val value = data?.getStringExtra("value")
|
val value = data?.getStringExtra("value")
|
||||||
var user = data?.getIntExtra("user", INVALID_USER)
|
var user = data?.getIntExtra("user", INVALID_USER)
|
||||||
user = user?.let { if (it == INVALID_USER) null else it }
|
user = user?.let{ if(it == INVALID_USER) null else it }
|
||||||
|
|
||||||
val forGesture = data?.getStringExtra("forGesture") ?: return
|
val forGesture = data?.getStringExtra("forGesture") ?: return
|
||||||
|
|
||||||
|
@ -397,7 +381,7 @@ fun openSoftKeyboard(context: Context, view: View) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Taken from: https://stackoverflow.com/a/30340794/12787264
|
// Taken from: https://stackoverflow.com/a/30340794/12787264
|
||||||
fun transformGrayscale(imageView: ImageView) {
|
fun transformGrayscale(imageView: ImageView){
|
||||||
val matrix = ColorMatrix()
|
val matrix = ColorMatrix()
|
||||||
matrix.setSaturation(0f)
|
matrix.setSaturation(0f)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.jrpie.android.launcher
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.util.Log
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,160 +12,59 @@ import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
* @param animationIn res id of transition animation (in) when using the gesture to launch an app.
|
* @param animationIn res id of transition animation (in) when using the gesture to launch an app.
|
||||||
* @param animationOut res id of transition animation (out) when using the gesture to launch an app.
|
* @param animationOut res id of transition animation (out) when using the gesture to launch an app.
|
||||||
*/
|
*/
|
||||||
enum class Gesture(
|
enum class Gesture (val id: String, private val labelResource: Int,
|
||||||
val id: String, private val labelResource: Int,
|
private val defaultsResource: Int,
|
||||||
private val defaultsResource: Int,
|
private val animationIn: Int = android.R.anim.fade_in,
|
||||||
private val animationIn: Int = android.R.anim.fade_in,
|
private val animationOut: Int = android.R.anim.fade_out){
|
||||||
private val animationOut: Int = android.R.anim.fade_out
|
VOLUME_UP("action.volume_up", R.string.settings_gesture_vol_up, R.array.default_volume_up, 0,0),
|
||||||
) {
|
VOLUME_DOWN("action.volume_down", R.string.settings_gesture_vol_down, R.array.default_volume_down,0,0),
|
||||||
VOLUME_UP(
|
TIME("action.time", R.string.settings_gesture_time, R.array.default_time),
|
||||||
"action_volumeUpApp",
|
DATE("action.date", R.string.settings_gesture_date, R.array.default_date),
|
||||||
R.string.settings_gesture_vol_up,
|
LONG_CLICK("action.long_click", R.string.settings_gesture_long_click, R.array.default_long_click, 0,0),
|
||||||
R.array.default_volume_up,
|
DOUBLE_CLICK("action.double_click", R.string.settings_gesture_double_click, R.array.default_double_click,0,0),
|
||||||
0,
|
SWIPE_UP("action.up", R.string.settings_gesture_up, R.array.default_up, R.anim.bottom_up),
|
||||||
0
|
SWIPE_UP_LEFT_EDGE("action.up_left", R.string.settings_gesture_up_left_edge, R.array.default_up_left, R.anim.bottom_up),
|
||||||
),
|
SWIPE_UP_RIGHT_EDGE("action.up_right", R.string.settings_gesture_up_right_edge, R.array.default_up_right, R.anim.bottom_up),
|
||||||
VOLUME_DOWN(
|
SWIPE_UP_DOUBLE( "action.double_up", R.string.settings_gesture_double_up, R.array.default_double_up, R.anim.bottom_up),
|
||||||
"action_volumeDownApp",
|
SWIPE_DOWN("action.down", R.string.settings_gesture_down, R.array.default_down, R.anim.top_down),
|
||||||
R.string.settings_gesture_vol_down,
|
SWIPE_DOWN_LEFT_EDGE("action.down_left", R.string.settings_gesture_down_left_edge, R.array.default_down_left, R.anim.top_down),
|
||||||
R.array.default_volume_down,
|
SWIPE_DOWN_RIGHT_EDGE("action.down_right", R.string.settings_gesture_down_right_edge, R.array.default_down_right, R.anim.top_down),
|
||||||
0,
|
SWIPE_DOWN_DOUBLE("action.double_down", R.string.settings_gesture_double_down, R.array.default_double_down, R.anim.top_down),
|
||||||
0
|
SWIPE_LEFT("action.left", R.string.settings_gesture_left, R.array.default_left, R.anim.right_left),
|
||||||
),
|
SWIPE_LEFT_TOP_EDGE("action.left_top", R.string.settings_gesture_left_top_edge, R.array.default_left_top, R.anim.right_left),
|
||||||
TIME("action_timeApp", R.string.settings_gesture_time, R.array.default_time),
|
SWIPE_LEFT_BOTTOM_EDGE("action.left_bottom", R.string.settings_gesture_left_bottom_edge, R.array.default_left_bottom, R.anim.right_left),
|
||||||
DATE("action_dateApp", R.string.settings_gesture_date, R.array.default_date),
|
SWIPE_LEFT_DOUBLE("action.double_left", R.string.settings_gesture_double_left, R.array.default_double_left, R.anim.right_left),
|
||||||
LONG_CLICK(
|
SWIPE_RIGHT("action.right", R.string.settings_gesture_right, R.array.default_right, R.anim.left_right),
|
||||||
"action_longClickApp",
|
SWIPE_RIGHT_TOP_EDGE("action.right_top", R.string.settings_gesture_right_top_edge, R.array.default_right_top, R.anim.left_right),
|
||||||
R.string.settings_gesture_long_click,
|
SWIPE_RIGHT_BOTTOM_EDGE("action.right_bottom", R.string.settings_gesture_right_bottom_edge, R.array.default_right_bottom, R.anim.left_right),
|
||||||
R.array.default_long_click,
|
SWIPE_RIGHT_DOUBLE("action.double_right", R.string.settings_gesture_double_right, R.array.default_double_right, R.anim.left_right);
|
||||||
0,
|
|
||||||
0
|
|
||||||
),
|
|
||||||
DOUBLE_CLICK(
|
|
||||||
"action_doubleClickApp",
|
|
||||||
R.string.settings_gesture_double_click,
|
|
||||||
R.array.default_double_click,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
),
|
|
||||||
SWIPE_UP("action_upApp", R.string.settings_gesture_up, R.array.default_up, R.anim.bottom_up),
|
|
||||||
SWIPE_UP_LEFT_EDGE(
|
|
||||||
"action_up_leftApp",
|
|
||||||
R.string.settings_gesture_up_left_edge,
|
|
||||||
R.array.default_up_left,
|
|
||||||
R.anim.bottom_up
|
|
||||||
),
|
|
||||||
SWIPE_UP_RIGHT_EDGE(
|
|
||||||
"action_up_rightApp",
|
|
||||||
R.string.settings_gesture_up_right_edge,
|
|
||||||
R.array.default_up_right,
|
|
||||||
R.anim.bottom_up
|
|
||||||
),
|
|
||||||
SWIPE_UP_DOUBLE(
|
|
||||||
"action_doubleUpApp",
|
|
||||||
R.string.settings_gesture_double_up,
|
|
||||||
R.array.default_double_up,
|
|
||||||
R.anim.bottom_up
|
|
||||||
),
|
|
||||||
SWIPE_DOWN(
|
|
||||||
"action_downApp",
|
|
||||||
R.string.settings_gesture_down,
|
|
||||||
R.array.default_down,
|
|
||||||
R.anim.top_down
|
|
||||||
),
|
|
||||||
SWIPE_DOWN_LEFT_EDGE(
|
|
||||||
"action_down_leftApp",
|
|
||||||
R.string.settings_gesture_down_left_edge,
|
|
||||||
R.array.default_down_left,
|
|
||||||
R.anim.top_down
|
|
||||||
),
|
|
||||||
SWIPE_DOWN_RIGHT_EDGE(
|
|
||||||
"action_down_rightApp",
|
|
||||||
R.string.settings_gesture_down_right_edge,
|
|
||||||
R.array.default_down_right,
|
|
||||||
R.anim.top_down
|
|
||||||
),
|
|
||||||
SWIPE_DOWN_DOUBLE(
|
|
||||||
"action_doubleDownApp",
|
|
||||||
R.string.settings_gesture_double_down,
|
|
||||||
R.array.default_double_down,
|
|
||||||
R.anim.top_down
|
|
||||||
),
|
|
||||||
SWIPE_LEFT(
|
|
||||||
"action_leftApp",
|
|
||||||
R.string.settings_gesture_left,
|
|
||||||
R.array.default_left,
|
|
||||||
R.anim.right_left
|
|
||||||
),
|
|
||||||
SWIPE_LEFT_TOP_EDGE(
|
|
||||||
"action_left_topApp",
|
|
||||||
R.string.settings_gesture_left_top_edge,
|
|
||||||
R.array.default_left_top,
|
|
||||||
R.anim.right_left
|
|
||||||
),
|
|
||||||
SWIPE_LEFT_BOTTOM_EDGE(
|
|
||||||
"action_left_bottomApp",
|
|
||||||
R.string.settings_gesture_left_bottom_edge,
|
|
||||||
R.array.default_left_bottom,
|
|
||||||
R.anim.right_left
|
|
||||||
),
|
|
||||||
SWIPE_LEFT_DOUBLE(
|
|
||||||
"action_doubleLeftApp",
|
|
||||||
R.string.settings_gesture_double_left,
|
|
||||||
R.array.default_double_left,
|
|
||||||
R.anim.right_left
|
|
||||||
),
|
|
||||||
SWIPE_RIGHT(
|
|
||||||
"action_rightApp",
|
|
||||||
R.string.settings_gesture_right,
|
|
||||||
R.array.default_right,
|
|
||||||
R.anim.left_right
|
|
||||||
),
|
|
||||||
SWIPE_RIGHT_TOP_EDGE(
|
|
||||||
"action_right_topApp",
|
|
||||||
R.string.settings_gesture_right_top_edge,
|
|
||||||
R.array.default_right_top,
|
|
||||||
R.anim.left_right
|
|
||||||
),
|
|
||||||
SWIPE_RIGHT_BOTTOM_EDGE(
|
|
||||||
"action_right_bottomApp",
|
|
||||||
R.string.settings_gesture_right_bottom_edge,
|
|
||||||
R.array.default_right_bottom,
|
|
||||||
R.anim.left_right
|
|
||||||
),
|
|
||||||
SWIPE_RIGHT_DOUBLE(
|
|
||||||
"action_doubleRightApp",
|
|
||||||
R.string.settings_gesture_double_right,
|
|
||||||
R.array.default_double_right,
|
|
||||||
R.anim.left_right
|
|
||||||
);
|
|
||||||
|
|
||||||
enum class Edge {
|
enum class Edge{
|
||||||
TOP, BOTTOM, LEFT, RIGHT
|
TOP, BOTTOM, LEFT, RIGHT
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getApp(context: Context): Pair<String, Int?> {
|
fun getApp(context: Context): Pair<String, Int?> {
|
||||||
val preferences = LauncherPreferences.getSharedPreferences()
|
val preferences = LauncherPreferences.getSharedPreferences()
|
||||||
var packageName = preferences.getString(this.id, "")!!
|
var packageName = preferences.getString(this.id + ".app", "")!!
|
||||||
var u: Int? = preferences.getInt(this.id + "_user", INVALID_USER)
|
var u: Int? = preferences.getInt(this.id + ".user", INVALID_USER)
|
||||||
u = if (u == INVALID_USER) null else u
|
u = if(u == INVALID_USER) null else u
|
||||||
return Pair(packageName, u)
|
return Pair(packageName,u)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun removeApp(context: Context) {
|
fun removeApp(context: Context) {
|
||||||
LauncherPreferences.getSharedPreferences().edit()
|
LauncherPreferences.getSharedPreferences().edit()
|
||||||
.putString(this.id, "") // clear it
|
.putString(this.id + ".app", "") // clear it
|
||||||
.apply()
|
.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setApp(context: Context, app: String, user: Int?) {
|
fun setApp(context: Context, app: String, user: Int?) {
|
||||||
LauncherPreferences.getSharedPreferences().edit()
|
LauncherPreferences.getSharedPreferences().edit()
|
||||||
.putString(this.id, app)
|
.putString(this.id + ".app", app)
|
||||||
.apply()
|
.apply()
|
||||||
|
|
||||||
val u = user ?: INVALID_USER
|
val u = user?: INVALID_USER
|
||||||
LauncherPreferences.getSharedPreferences().edit()
|
LauncherPreferences.getSharedPreferences().edit()
|
||||||
.putInt(this.id + "_user", u)
|
.putInt(this.id + ".user", u)
|
||||||
.apply()
|
.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +72,7 @@ enum class Gesture(
|
||||||
return context.resources.getString(this.labelResource)
|
return context.resources.getString(this.labelResource)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun pickDefaultApp(context: Context): String {
|
fun pickDefaultApp(context: Context) : String {
|
||||||
return context.resources
|
return context.resources
|
||||||
.getStringArray(this.defaultsResource)
|
.getStringArray(this.defaultsResource)
|
||||||
.firstOrNull { isInstalled(it, context) }
|
.firstOrNull { isInstalled(it, context) }
|
||||||
|
@ -180,7 +80,7 @@ enum class Gesture(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getDoubleVariant(): Gesture {
|
fun getDoubleVariant(): Gesture {
|
||||||
return when (this) {
|
return when(this) {
|
||||||
SWIPE_UP -> SWIPE_UP_DOUBLE
|
SWIPE_UP -> SWIPE_UP_DOUBLE
|
||||||
SWIPE_DOWN -> SWIPE_DOWN_DOUBLE
|
SWIPE_DOWN -> SWIPE_DOWN_DOUBLE
|
||||||
SWIPE_LEFT -> SWIPE_LEFT_DOUBLE
|
SWIPE_LEFT -> SWIPE_LEFT_DOUBLE
|
||||||
|
@ -190,30 +90,27 @@ enum class Gesture(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getEdgeVariant(edge: Edge): Gesture {
|
fun getEdgeVariant(edge: Edge): Gesture {
|
||||||
return when (edge) {
|
return when(edge) {
|
||||||
Edge.TOP ->
|
Edge.TOP ->
|
||||||
when (this) {
|
when(this) {
|
||||||
SWIPE_LEFT -> SWIPE_LEFT_TOP_EDGE
|
SWIPE_LEFT -> SWIPE_LEFT_TOP_EDGE
|
||||||
SWIPE_RIGHT -> SWIPE_RIGHT_TOP_EDGE
|
SWIPE_RIGHT -> SWIPE_RIGHT_TOP_EDGE
|
||||||
else -> this
|
else -> this
|
||||||
}
|
}
|
||||||
|
|
||||||
Edge.BOTTOM ->
|
Edge.BOTTOM ->
|
||||||
when (this) {
|
when(this) {
|
||||||
SWIPE_LEFT -> SWIPE_LEFT_BOTTOM_EDGE
|
SWIPE_LEFT -> SWIPE_LEFT_BOTTOM_EDGE
|
||||||
SWIPE_RIGHT -> SWIPE_RIGHT_BOTTOM_EDGE
|
SWIPE_RIGHT -> SWIPE_RIGHT_BOTTOM_EDGE
|
||||||
else -> this
|
else -> this
|
||||||
}
|
}
|
||||||
|
|
||||||
Edge.LEFT ->
|
Edge.LEFT ->
|
||||||
when (this) {
|
when(this) {
|
||||||
SWIPE_UP -> SWIPE_UP_LEFT_EDGE
|
SWIPE_UP -> SWIPE_UP_LEFT_EDGE
|
||||||
SWIPE_DOWN -> SWIPE_DOWN_LEFT_EDGE
|
SWIPE_DOWN -> SWIPE_DOWN_LEFT_EDGE
|
||||||
else -> this
|
else -> this
|
||||||
}
|
}
|
||||||
|
|
||||||
Edge.RIGHT ->
|
Edge.RIGHT ->
|
||||||
when (this) {
|
when(this) {
|
||||||
SWIPE_UP -> SWIPE_UP_RIGHT_EDGE
|
SWIPE_UP -> SWIPE_UP_RIGHT_EDGE
|
||||||
SWIPE_DOWN -> SWIPE_DOWN_RIGHT_EDGE
|
SWIPE_DOWN -> SWIPE_DOWN_RIGHT_EDGE
|
||||||
else -> this
|
else -> this
|
||||||
|
@ -222,39 +119,38 @@ enum class Gesture(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isDoubleVariant(): Boolean {
|
fun isDoubleVariant(): Boolean {
|
||||||
return when (this) {
|
return when(this){
|
||||||
SWIPE_UP_DOUBLE,
|
SWIPE_UP_DOUBLE,
|
||||||
SWIPE_DOWN_DOUBLE,
|
SWIPE_DOWN_DOUBLE,
|
||||||
SWIPE_LEFT_DOUBLE,
|
SWIPE_LEFT_DOUBLE,
|
||||||
SWIPE_RIGHT_DOUBLE -> true
|
SWIPE_RIGHT_DOUBLE -> true
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isEdgeVariant(): Boolean {
|
fun isEdgeVariant(): Boolean {
|
||||||
return when (this) {
|
return when(this){
|
||||||
SWIPE_UP_RIGHT_EDGE,
|
SWIPE_UP_RIGHT_EDGE,
|
||||||
SWIPE_UP_LEFT_EDGE,
|
SWIPE_UP_LEFT_EDGE,
|
||||||
SWIPE_DOWN_LEFT_EDGE,
|
SWIPE_DOWN_LEFT_EDGE,
|
||||||
SWIPE_DOWN_RIGHT_EDGE,
|
SWIPE_DOWN_RIGHT_EDGE,
|
||||||
SWIPE_LEFT_TOP_EDGE,
|
SWIPE_LEFT_TOP_EDGE,
|
||||||
SWIPE_LEFT_BOTTOM_EDGE,
|
SWIPE_LEFT_BOTTOM_EDGE,
|
||||||
SWIPE_RIGHT_TOP_EDGE,
|
SWIPE_RIGHT_TOP_EDGE,
|
||||||
SWIPE_RIGHT_BOTTOM_EDGE -> true
|
SWIPE_RIGHT_BOTTOM_EDGE -> true
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
operator fun invoke(activity: Activity) {
|
operator fun invoke(activity: Activity) {
|
||||||
val app = this.getApp(activity)
|
val app = this.getApp(activity)
|
||||||
|
Log.d("LAUNCHER", "Launching ${app.first} (user: ${app.second}) ${this.toString()}")
|
||||||
launch(app.first, app.second, activity, this.animationIn, this.animationOut)
|
launch(app.first, app.second, activity, this.animationIn, this.animationOut)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun byId(id: String): Gesture? {
|
fun byId(id: String): Gesture? {
|
||||||
return Gesture.values().firstOrNull { it.id == id }
|
return Gesture.values().firstOrNull {it.id == id }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.content.Intent
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
import android.os.AsyncTask
|
import android.os.AsyncTask
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
import android.view.GestureDetector
|
import android.view.GestureDetector
|
||||||
import android.view.KeyEvent
|
import android.view.KeyEvent
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
|
@ -13,7 +14,6 @@ import androidx.core.view.isVisible
|
||||||
import de.jrpie.android.launcher.databinding.HomeBinding
|
import de.jrpie.android.launcher.databinding.HomeBinding
|
||||||
import de.jrpie.android.launcher.list.other.LauncherAction
|
import de.jrpie.android.launcher.list.other.LauncherAction
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import de.jrpie.android.launcher.preferences.migrateToNewVersion
|
|
||||||
import de.jrpie.android.launcher.tutorial.TutorialActivity
|
import de.jrpie.android.launcher.tutorial.TutorialActivity
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
@ -21,6 +21,9 @@ import kotlin.concurrent.fixedRateTimer
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
import android.util.DisplayMetrics
|
||||||
|
import de.jrpie.android.launcher.preferences.migratePreferencesToNewVersion
|
||||||
|
import de.jrpie.android.launcher.preferences.resetPreferences
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,7 +38,7 @@ import kotlin.math.min
|
||||||
* - Setting global variables (preferences etc.)
|
* - Setting global variables (preferences etc.)
|
||||||
* - Opening the [TutorialActivity] on new installations
|
* - Opening the [TutorialActivity] on new installations
|
||||||
*/
|
*/
|
||||||
class HomeActivity : UIObject, AppCompatActivity(),
|
class HomeActivity: UIObject, AppCompatActivity(),
|
||||||
GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener {
|
GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener {
|
||||||
|
|
||||||
private lateinit var binding: HomeBinding
|
private lateinit var binding: HomeBinding
|
||||||
|
@ -52,14 +55,15 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
// Try to restore old preferences
|
||||||
|
migratePreferencesToNewVersion(this)
|
||||||
|
|
||||||
// First time opening the app: show Tutorial, else: check versions
|
// First time opening the app: set defaults and start tutorial
|
||||||
if (!LauncherPreferences.internal().started()) {
|
if (!LauncherPreferences.internal().started()) {
|
||||||
|
resetPreferences(this)
|
||||||
|
|
||||||
LauncherPreferences.internal().started(true)
|
LauncherPreferences.internal().started(true)
|
||||||
startActivity(Intent(this, TutorialActivity::class.java))
|
startActivity(Intent(this, TutorialActivity::class.java))
|
||||||
} else {
|
|
||||||
migrateToNewVersion(this)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Preload apps to speed up the Apps Recycler
|
// Preload apps to speed up the Apps Recycler
|
||||||
|
@ -70,7 +74,7 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart(){
|
||||||
super<AppCompatActivity>.onStart()
|
super<AppCompatActivity>.onStart()
|
||||||
|
|
||||||
mDetector = GestureDetectorCompat(this, this)
|
mDetector = GestureDetectorCompat(this, this)
|
||||||
|
@ -97,7 +101,7 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
var upperVisible = dateVisible
|
var upperVisible = dateVisible
|
||||||
var lowerVisible = timeVisible
|
var lowerVisible = timeVisible
|
||||||
|
|
||||||
if (LauncherPreferences.clock().flipDateTime()) {
|
if(LauncherPreferences.clock().flipDateTime()) {
|
||||||
upperFormat = lowerFormat.also { lowerFormat = upperFormat }
|
upperFormat = lowerFormat.also { lowerFormat = upperFormat }
|
||||||
upperVisible = lowerVisible.also { lowerVisible = upperVisible }
|
upperVisible = lowerVisible.also { lowerVisible = upperVisible }
|
||||||
}
|
}
|
||||||
|
@ -151,8 +155,15 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
|
|
||||||
if (e1 == null) return false
|
if (e1 == null) return false
|
||||||
|
|
||||||
val width = displayMetrics.widthPixels
|
|
||||||
val height = displayMetrics.heightPixels
|
|
||||||
|
val displayMetrics: DisplayMetrics? = DisplayMetrics()
|
||||||
|
windowManager.defaultDisplay.getMetrics(displayMetrics)
|
||||||
|
|
||||||
|
val width = displayMetrics!!.widthPixels
|
||||||
|
val height = displayMetrics!!.heightPixels
|
||||||
|
|
||||||
|
Log.i("LAUNCHER", "width: $width, height: $height, ${e1.x}, ${e1.y}, ${e2.x}, ${e2.y}")
|
||||||
|
|
||||||
val diffX = e1.x - e2.x
|
val diffX = e1.x - e2.x
|
||||||
val diffY = e1.y - e2.y
|
val diffY = e1.y - e2.y
|
||||||
|
@ -161,7 +172,7 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
val edgeActions = LauncherPreferences.enabled_gestures().edgeSwipe()
|
val edgeActions = LauncherPreferences.enabled_gestures().edgeSwipe()
|
||||||
val edgeStrictness = 0.15
|
val edgeStrictness = 0.15
|
||||||
|
|
||||||
var gesture = if (abs(diffX) > abs(diffY)) { // horizontal swipe
|
var gesture = if(abs(diffX) > abs(diffY)) { // horizontal swipe
|
||||||
if (diffX > width / 4)
|
if (diffX > width / 4)
|
||||||
Gesture.SWIPE_LEFT
|
Gesture.SWIPE_LEFT
|
||||||
else if (diffX < -width / 4)
|
else if (diffX < -width / 4)
|
||||||
|
@ -181,16 +192,16 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if (edgeActions) {
|
if (edgeActions) {
|
||||||
if (max(e1.x, e2.x) < edgeStrictness * width) {
|
if(max(e1.x, e2.x) < edgeStrictness * width){
|
||||||
gesture = gesture?.let { it.getEdgeVariant(Gesture.Edge.LEFT) }
|
gesture = gesture?.let{it.getEdgeVariant(Gesture.Edge.LEFT)}
|
||||||
} else if (min(e1.x, e2.x) > (1 - edgeStrictness) * width) {
|
} else if (min(e1.x, e2.x) > (1-edgeStrictness) * width){
|
||||||
gesture = gesture?.let { it.getEdgeVariant(Gesture.Edge.RIGHT) }
|
gesture = gesture?.let{it.getEdgeVariant(Gesture.Edge.RIGHT)}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max(e1.y, e2.y) < edgeStrictness * height) {
|
if(max(e1.y, e2.y) < edgeStrictness * height){
|
||||||
gesture = gesture?.let { it.getEdgeVariant(Gesture.Edge.TOP) }
|
gesture = gesture?.let{it.getEdgeVariant(Gesture.Edge.TOP)}
|
||||||
} else if (min(e1.y, e2.y) > (1 - edgeStrictness) * height) {
|
} else if (min(e1.y, e2.y) > (1-edgeStrictness) * height){
|
||||||
gesture = gesture?.let { it.getEdgeVariant(Gesture.Edge.BOTTOM) }
|
gesture = gesture?.let{it.getEdgeVariant(Gesture.Edge.BOTTOM)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gesture?.invoke(this)
|
gesture?.invoke(this)
|
||||||
|
@ -224,17 +235,13 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (mDetector.onTouchEvent(event)) {
|
return if (mDetector.onTouchEvent(event)) { false } else { super.onTouchEvent(event) }
|
||||||
false
|
|
||||||
} else {
|
|
||||||
super.onTouchEvent(event)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setOnClicks() {
|
override fun setOnClicks() {
|
||||||
|
|
||||||
binding.homeUpperView.setOnClickListener {
|
binding.homeUpperView.setOnClickListener {
|
||||||
if (LauncherPreferences.clock().flipDateTime()) {
|
if(LauncherPreferences.clock().flipDateTime()) {
|
||||||
Gesture.TIME(this)
|
Gesture.TIME(this)
|
||||||
} else {
|
} else {
|
||||||
Gesture.DATE(this)
|
Gesture.DATE(this)
|
||||||
|
@ -242,7 +249,7 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.homeLowerView.setOnClickListener {
|
binding.homeLowerView.setOnClickListener {
|
||||||
if (LauncherPreferences.clock().flipDateTime()) {
|
if(LauncherPreferences.clock().flipDateTime()) {
|
||||||
Gesture.DATE(this)
|
Gesture.DATE(this)
|
||||||
} else {
|
} else {
|
||||||
Gesture.TIME(this)
|
Gesture.TIME(this)
|
||||||
|
@ -252,22 +259,11 @@ class HomeActivity : UIObject, AppCompatActivity(),
|
||||||
|
|
||||||
/* TODO: Remove those. For now they are necessary
|
/* TODO: Remove those. For now they are necessary
|
||||||
* because this inherits from GestureDetector.OnGestureListener */
|
* because this inherits from GestureDetector.OnGestureListener */
|
||||||
override fun onDoubleTapEvent(event: MotionEvent): Boolean {
|
override fun onDoubleTapEvent(event: MotionEvent): Boolean { return false }
|
||||||
return false
|
override fun onDown(event: MotionEvent): Boolean { return false }
|
||||||
}
|
override fun onScroll(e1: MotionEvent?, e2: MotionEvent, dX: Float, dY: Float): Boolean { return false }
|
||||||
|
|
||||||
override fun onDown(event: MotionEvent): Boolean {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onScroll(e1: MotionEvent?, e2: MotionEvent, dX: Float, dY: Float): Boolean {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onShowPress(event: MotionEvent) {}
|
override fun onShowPress(event: MotionEvent) {}
|
||||||
override fun onSingleTapUp(event: MotionEvent): Boolean {
|
override fun onSingleTapUp(event: MotionEvent): Boolean { return false }
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun isHomeScreen(): Boolean {
|
override fun isHomeScreen(): Boolean {
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.jrpie.android.launcher
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
|
import android.os.Build
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
|
@ -42,7 +43,6 @@ interface UIObject {
|
||||||
setOnClicks()
|
setOnClicks()
|
||||||
adjustLayout()
|
adjustLayout()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun modifyTheme(theme: Resources.Theme): Resources.Theme {
|
fun modifyTheme(theme: Resources.Theme): Resources.Theme {
|
||||||
LauncherPreferences.theme().colorTheme().applyToTheme(theme)
|
LauncherPreferences.theme().colorTheme().applyToTheme(theme)
|
||||||
LauncherPreferences.theme().background().applyToTheme(theme)
|
LauncherPreferences.theme().background().applyToTheme(theme)
|
||||||
|
@ -52,8 +52,8 @@ interface UIObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
// fun applyTheme() { }
|
// fun applyTheme() { }
|
||||||
fun setOnClicks() {}
|
fun setOnClicks() { }
|
||||||
fun adjustLayout() {}
|
fun adjustLayout() { }
|
||||||
|
|
||||||
fun isHomeScreen(): Boolean {
|
fun isHomeScreen(): Boolean {
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -44,7 +44,6 @@ class ListActivity : AppCompatActivity(), UIObject {
|
||||||
VIEW(R.string.list_title_view), /* view list of apps */
|
VIEW(R.string.list_title_view), /* view list of apps */
|
||||||
PICK(R.string.list_title_pick) /* choose app or action to associate to a gesture */
|
PICK(R.string.list_title_pick) /* choose app or action to associate to a gesture */
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
@ -67,8 +66,7 @@ class ListActivity : AppCompatActivity(), UIObject {
|
||||||
binding.listContainer.context.resources.displayMetrics.heightPixels
|
binding.listContainer.context.resources.displayMetrics.heightPixels
|
||||||
val diff = height - r.bottom
|
val diff = height - r.bottom
|
||||||
if (diff != 0 &&
|
if (diff != 0 &&
|
||||||
LauncherPreferences.display().fullScreen()
|
LauncherPreferences.display().fullScreen()) {
|
||||||
) {
|
|
||||||
if (binding.listContainer.paddingBottom !== diff) {
|
if (binding.listContainer.paddingBottom !== diff) {
|
||||||
binding.listContainer.setPadding(0, 0, 0, diff)
|
binding.listContainer.setPadding(0, 0, 0, diff)
|
||||||
}
|
}
|
||||||
|
@ -82,7 +80,7 @@ class ListActivity : AppCompatActivity(), UIObject {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart(){
|
||||||
super<AppCompatActivity>.onStart()
|
super<AppCompatActivity>.onStart()
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
@ -148,11 +146,11 @@ 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 context: Context, fm: FragmentManager) :
|
class ListSectionsPagerAdapter(private val context: Context, fm: FragmentManager)
|
||||||
FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
: FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
||||||
|
|
||||||
override fun getItem(position: Int): Fragment {
|
override fun getItem(position: Int): Fragment {
|
||||||
return when (position) {
|
return when (position){
|
||||||
0 -> ListFragmentApps()
|
0 -> ListFragmentApps()
|
||||||
1 -> ListFragmentOther()
|
1 -> ListFragmentOther()
|
||||||
else -> Fragment()
|
else -> Fragment()
|
||||||
|
|
|
@ -34,12 +34,10 @@ import kotlin.text.Regex.Companion.escapeReplacement
|
||||||
* @param intention - why the list is displayed ("view", "pick")
|
* @param intention - why the list is displayed ("view", "pick")
|
||||||
* @param forGesture - the action which an app is chosen for (when the intention is "pick")
|
* @param forGesture - the action which an app is chosen for (when the intention is "pick")
|
||||||
*/
|
*/
|
||||||
class AppsRecyclerAdapter(
|
class AppsRecyclerAdapter(val activity: Activity,
|
||||||
val activity: Activity,
|
private val intention: ListActivity.ListActivityIntention
|
||||||
private val intention: ListActivity.ListActivityIntention
|
= ListActivity.ListActivityIntention.VIEW,
|
||||||
= ListActivity.ListActivityIntention.VIEW,
|
private val forGesture: String? = ""):
|
||||||
private val forGesture: String? = ""
|
|
||||||
) :
|
|
||||||
RecyclerView.Adapter<AppsRecyclerAdapter.ViewHolder>() {
|
RecyclerView.Adapter<AppsRecyclerAdapter.ViewHolder>() {
|
||||||
|
|
||||||
private val appsListDisplayed: MutableList<AppInfo>
|
private val appsListDisplayed: MutableList<AppInfo>
|
||||||
|
@ -55,9 +53,7 @@ class AppsRecyclerAdapter(
|
||||||
selectItem(adapterPosition, rect)
|
selectItem(adapterPosition, rect)
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init { itemView.setOnClickListener(this) }
|
||||||
itemView.setOnClickListener(this)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
||||||
|
@ -76,35 +72,16 @@ class AppsRecyclerAdapter(
|
||||||
|
|
||||||
// decide when to show the options popup menu about
|
// decide when to show the options popup menu about
|
||||||
if (intention == ListActivity.ListActivityIntention.VIEW) {
|
if (intention == ListActivity.ListActivityIntention.VIEW) {
|
||||||
viewHolder.textView.setOnLongClickListener {
|
viewHolder.textView.setOnLongClickListener{ showOptionsPopup(viewHolder, appPackageName, appUser, isSystemApp) }
|
||||||
showOptionsPopup(
|
viewHolder.img.setOnLongClickListener{ showOptionsPopup(viewHolder, appPackageName, appUser, isSystemApp) }
|
||||||
viewHolder,
|
|
||||||
appPackageName,
|
|
||||||
appUser,
|
|
||||||
isSystemApp
|
|
||||||
)
|
|
||||||
}
|
|
||||||
viewHolder.img.setOnLongClickListener {
|
|
||||||
showOptionsPopup(
|
|
||||||
viewHolder,
|
|
||||||
appPackageName,
|
|
||||||
appUser,
|
|
||||||
isSystemApp
|
|
||||||
)
|
|
||||||
}
|
|
||||||
// ensure onClicks are actually caught
|
// ensure onClicks are actually caught
|
||||||
viewHolder.textView.setOnClickListener { viewHolder.onClick(viewHolder.textView) }
|
viewHolder.textView.setOnClickListener{ viewHolder.onClick(viewHolder.textView) }
|
||||||
viewHolder.img.setOnClickListener { viewHolder.onClick(viewHolder.img) }
|
viewHolder.img.setOnClickListener{ viewHolder.onClick(viewHolder.img) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("SameReturnValue")
|
@Suppress("SameReturnValue")
|
||||||
private fun showOptionsPopup(
|
private fun showOptionsPopup(viewHolder: ViewHolder, appPackageName: String, user: Int?, isSystemApp: Boolean): Boolean {
|
||||||
viewHolder: ViewHolder,
|
|
||||||
appPackageName: String,
|
|
||||||
user: Int?,
|
|
||||||
isSystemApp: Boolean
|
|
||||||
): Boolean {
|
|
||||||
//create the popup menu
|
//create the popup menu
|
||||||
|
|
||||||
val popup = PopupMenu(activity, viewHolder.img)
|
val popup = PopupMenu(activity, viewHolder.img)
|
||||||
|
@ -120,12 +97,10 @@ class AppsRecyclerAdapter(
|
||||||
uninstallApp(appPackageName, user, activity)
|
uninstallApp(appPackageName, user, activity)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.app_menu_info -> {
|
R.id.app_menu_info -> {
|
||||||
openAppSettings(appPackageName, user, activity)
|
openAppSettings(appPackageName, user, activity)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,9 +109,7 @@ class AppsRecyclerAdapter(
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int { return appsListDisplayed.size }
|
||||||
return appsListDisplayed.size
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
val inflater = LayoutInflater.from(parent.context)
|
val inflater = LayoutInflater.from(parent.context)
|
||||||
|
@ -158,20 +131,19 @@ class AppsRecyclerAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun selectItem(pos: Int, rect: Rect = Rect()) {
|
fun selectItem(pos: Int, rect: Rect = Rect()) {
|
||||||
if (pos >= appsListDisplayed.size) {
|
if(pos >= appsListDisplayed.size) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val appPackageName = appsListDisplayed[pos].packageName.toString()
|
val appPackageName = appsListDisplayed[pos].packageName.toString()
|
||||||
val appUser = appsListDisplayed[pos].user
|
val appUser = appsListDisplayed[pos].user
|
||||||
when (intention) {
|
when (intention){
|
||||||
ListActivity.ListActivityIntention.VIEW -> {
|
ListActivity.ListActivityIntention.VIEW -> {
|
||||||
launchApp(appPackageName, appUser, activity, rect)
|
launchApp(appPackageName, appUser, activity, rect)
|
||||||
}
|
}
|
||||||
|
|
||||||
ListActivity.ListActivityIntention.PICK -> {
|
ListActivity.ListActivityIntention.PICK -> {
|
||||||
val returnIntent = Intent()
|
val returnIntent = Intent()
|
||||||
returnIntent.putExtra("value", appPackageName)
|
returnIntent.putExtra("value", appPackageName)
|
||||||
appUser?.let { returnIntent.putExtra("user", it) }
|
appUser?.let{ returnIntent.putExtra("user", it) }
|
||||||
returnIntent.putExtra("forGesture", forGesture)
|
returnIntent.putExtra("forGesture", forGesture)
|
||||||
activity.setResult(REQUEST_CHOOSE_APP, returnIntent)
|
activity.setResult(REQUEST_CHOOSE_APP, returnIntent)
|
||||||
activity.finish()
|
activity.finish()
|
||||||
|
@ -188,12 +160,12 @@ class AppsRecyclerAdapter(
|
||||||
.lowercase(Locale.ROOT)
|
.lowercase(Locale.ROOT)
|
||||||
.toCharArray()
|
.toCharArray()
|
||||||
.distinct()
|
.distinct()
|
||||||
.filter { c -> !((c in 'a'..'z') || (c in '0'..'9')) }
|
.filter { c -> ! ((c in 'a'..'z') || (c in '0'..'9')) }
|
||||||
.map { c -> escapeReplacement(c.toString()) }
|
.map { c -> escapeReplacement(c.toString())}
|
||||||
.fold("") { x, y -> x + y }
|
.fold("") { x,y -> x+y }
|
||||||
var disallowedCharsRegex = "[^a-z0-9$allowedSpecialCharacters]".toRegex()
|
var disallowedCharsRegex = "[^a-z0-9$allowedSpecialCharacters]".toRegex()
|
||||||
|
|
||||||
fun normalize(text: String): String {
|
fun normalize(text: String): String{
|
||||||
return text.lowercase(Locale.ROOT).replace(disallowedCharsRegex, "")
|
return text.lowercase(Locale.ROOT).replace(disallowedCharsRegex, "")
|
||||||
}
|
}
|
||||||
appsListDisplayed.clear()
|
appsListDisplayed.clear()
|
||||||
|
@ -207,7 +179,7 @@ class AppsRecyclerAdapter(
|
||||||
|
|
||||||
if (itemLabel.startsWith(normalizedText)) {
|
if (itemLabel.startsWith(normalizedText)) {
|
||||||
appsListDisplayed.add(item)
|
appsListDisplayed.add(item)
|
||||||
} else if (itemLabel.contains(normalizedText)) {
|
}else if(itemLabel.contains(normalizedText)){
|
||||||
appsSecondary.add(item)
|
appsSecondary.add(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,13 +187,11 @@ class AppsRecyclerAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appsListDisplayed.size == 1 && intention == ListActivity.ListActivityIntention.VIEW
|
if (appsListDisplayed.size == 1 && intention == ListActivity.ListActivityIntention.VIEW
|
||||||
&& LauncherPreferences.functionality().searchAutoLaunch()
|
&& LauncherPreferences.functionality().searchAutoLaunch()) {
|
||||||
) {
|
|
||||||
val info = appsListDisplayed[0]
|
val info = appsListDisplayed[0]
|
||||||
launch(info.packageName.toString(), info.user, activity)
|
launch(info.packageName.toString(), info.user, activity)
|
||||||
|
|
||||||
val inputMethodManager =
|
val inputMethodManager = activity.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
activity.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
|
||||||
inputMethodManager.hideSoftInputFromWindow(View(activity).windowToken, 0)
|
inputMethodManager.hideSoftInputFromWindow(View(activity).windowToken, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class ListFragmentApps : Fragment(), UIObject {
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setOnClicks() {}
|
override fun setOnClicks() { }
|
||||||
|
|
||||||
override fun adjustLayout() {
|
override fun adjustLayout() {
|
||||||
|
|
||||||
|
@ -66,8 +66,7 @@ class ListFragmentApps : Fragment(), UIObject {
|
||||||
})
|
})
|
||||||
|
|
||||||
if (intention == ListActivity.ListActivityIntention.VIEW
|
if (intention == ListActivity.ListActivityIntention.VIEW
|
||||||
&& LauncherPreferences.functionality().searchAutoOpenKeyboard()
|
&& LauncherPreferences.functionality().searchAutoOpenKeyboard()){
|
||||||
) {
|
|
||||||
openSoftKeyboard(requireContext(), binding.listAppsSearchview)
|
openSoftKeyboard(requireContext(), binding.listAppsSearchview)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,50 +10,25 @@ import de.jrpie.android.launcher.expandNotificationsPanel
|
||||||
import de.jrpie.android.launcher.openAppsList
|
import de.jrpie.android.launcher.openAppsList
|
||||||
import de.jrpie.android.launcher.openSettings
|
import de.jrpie.android.launcher.openSettings
|
||||||
|
|
||||||
enum class LauncherAction(
|
enum class LauncherAction(val id: String, val label: Int, val icon: Int, val launch: (Activity) -> Unit) {
|
||||||
val id: String,
|
SETTINGS("launcher:settings", R.string.list_other_settings, R.drawable.baseline_settings_24, ::openSettings),
|
||||||
val label: Int,
|
CHOOSE("launcher:choose", R.string.list_other_list, R.drawable.baseline_menu_24, ::openAppsList),
|
||||||
val icon: Int,
|
VOLUME_UP("launcher:volumeUp",
|
||||||
val launch: (Activity) -> Unit
|
|
||||||
) {
|
|
||||||
SETTINGS(
|
|
||||||
"launcher:settings",
|
|
||||||
R.string.list_other_settings,
|
|
||||||
R.drawable.baseline_settings_24,
|
|
||||||
::openSettings
|
|
||||||
),
|
|
||||||
CHOOSE(
|
|
||||||
"launcher:choose",
|
|
||||||
R.string.list_other_list,
|
|
||||||
R.drawable.baseline_menu_24,
|
|
||||||
::openAppsList
|
|
||||||
),
|
|
||||||
VOLUME_UP(
|
|
||||||
"launcher:volumeUp",
|
|
||||||
R.string.list_other_volume_up,
|
R.string.list_other_volume_up,
|
||||||
R.drawable.baseline_volume_up_24, ::audioVolumeUp
|
R.drawable.baseline_volume_up_24, ::audioVolumeUp),
|
||||||
),
|
VOLUME_DOWN("launcher:volumeDown",
|
||||||
VOLUME_DOWN(
|
|
||||||
"launcher:volumeDown",
|
|
||||||
R.string.list_other_volume_down,
|
R.string.list_other_volume_down,
|
||||||
R.drawable.baseline_volume_down_24, ::audioVolumeDown
|
R.drawable.baseline_volume_down_24, ::audioVolumeDown),
|
||||||
),
|
TRACK_NEXT("launcher:nextTrack",
|
||||||
TRACK_NEXT(
|
|
||||||
"launcher:nextTrack",
|
|
||||||
R.string.list_other_track_next,
|
R.string.list_other_track_next,
|
||||||
R.drawable.baseline_skip_next_24, ::audioNextTrack
|
R.drawable.baseline_skip_next_24, ::audioNextTrack),
|
||||||
),
|
TRACK_PREV("launcher:previousTrack",
|
||||||
TRACK_PREV(
|
|
||||||
"launcher:previousTrack",
|
|
||||||
R.string.list_other_track_previous,
|
R.string.list_other_track_previous,
|
||||||
R.drawable.baseline_skip_previous_24, ::audioPreviousTrack
|
R.drawable.baseline_skip_previous_24, ::audioPreviousTrack),
|
||||||
),
|
EXPAND_NOTIFICATIONS_PANEL("launcher:expandNotificationsPanel",
|
||||||
EXPAND_NOTIFICATIONS_PANEL(
|
|
||||||
"launcher:expandNotificationsPanel",
|
|
||||||
R.string.list_other_expand_notifications_panel,
|
R.string.list_other_expand_notifications_panel,
|
||||||
R.drawable.baseline_notifications_24,
|
R.drawable.baseline_notifications_24,
|
||||||
::expandNotificationsPanel
|
::expandNotificationsPanel),
|
||||||
),
|
|
||||||
NOP("launcher:nop", R.string.list_other_nop, R.drawable.baseline_not_interested_24, {});
|
NOP("launcher:nop", R.string.list_other_nop, R.drawable.baseline_not_interested_24, {});
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import de.jrpie.android.launcher.R
|
||||||
import de.jrpie.android.launcher.databinding.ListOtherBinding
|
import de.jrpie.android.launcher.databinding.ListOtherBinding
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -20,7 +20,7 @@ import de.jrpie.android.launcher.list.forGesture
|
||||||
* It lists `other` things to be launched that are not really represented by a URI,
|
* It lists `other` things to be launched that are not really represented by a URI,
|
||||||
* rather by Launcher- internal conventions.
|
* rather by Launcher- internal conventions.
|
||||||
*/
|
*/
|
||||||
class OtherRecyclerAdapter(val activity: Activity) :
|
class OtherRecyclerAdapter(val activity: Activity):
|
||||||
RecyclerView.Adapter<OtherRecyclerAdapter.ViewHolder>() {
|
RecyclerView.Adapter<OtherRecyclerAdapter.ViewHolder>() {
|
||||||
|
|
||||||
private val othersList: Array<LauncherAction> = LauncherAction.values()
|
private val othersList: Array<LauncherAction> = LauncherAction.values()
|
||||||
|
@ -38,9 +38,7 @@ class OtherRecyclerAdapter(val activity: Activity) :
|
||||||
forGesture?.let { returnChoiceIntent(it, content.id) }
|
forGesture?.let { returnChoiceIntent(it, content.id) }
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init { itemView.setOnClickListener(this) }
|
||||||
itemView.setOnClickListener(this)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
||||||
|
@ -51,9 +49,7 @@ class OtherRecyclerAdapter(val activity: Activity) :
|
||||||
viewHolder.iconView.setImageResource(icon)
|
viewHolder.iconView.setImageResource(icon)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int { return othersList.size }
|
||||||
return othersList.size
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
val inflater = LayoutInflater.from(parent.context)
|
val inflater = LayoutInflater.from(parent.context)
|
||||||
|
|
|
@ -13,41 +13,41 @@ import eu.jonahbauer.android.preference.annotations.Preferences;
|
||||||
makeFile = true,
|
makeFile = true,
|
||||||
r = R.class,
|
r = R.class,
|
||||||
value = {
|
value = {
|
||||||
@PreferenceGroup(name = "internal", prefix = "settings_internal_", suffix = "_key", value = {
|
@PreferenceGroup(name = "internal", prefix = "settings_internal_", suffix = "_key", value = {
|
||||||
@Preference(name = "started", type = boolean.class, defaultValue = "false"),
|
@Preference(name = "started", type = boolean.class, defaultValue = "false"),
|
||||||
@Preference(name = "started_time", type = long.class),
|
@Preference(name = "started_time", type = long.class),
|
||||||
@Preference(name = "version_code", type = int.class, defaultValue = "-1"),
|
@Preference(name = "version_code", type = int.class, defaultValue = "-1"),
|
||||||
}),
|
}),
|
||||||
@PreferenceGroup(name = "gestures", prefix = "settings_gesture_", suffix = "_key", value = {
|
@PreferenceGroup( name = "gestures", prefix = "settings_gesture_", suffix = "_key", value = {
|
||||||
}),
|
}),
|
||||||
@PreferenceGroup(name = "general", prefix = "settings_general_", suffix = "_key", value = {
|
@PreferenceGroup(name = "general", prefix = "settings_general_", suffix = "_key", value = {
|
||||||
@Preference(name = "choose_home_screen", type = void.class)
|
@Preference(name = "choose_home_screen", type = void.class)
|
||||||
}),
|
}),
|
||||||
@PreferenceGroup(name = "theme", prefix = "settings_theme_", suffix = "_key", value = {
|
@PreferenceGroup(name = "theme", prefix = "settings_theme_", suffix = "_key", value = {
|
||||||
@Preference(name = "wallpaper", type = void.class),
|
@Preference(name = "wallpaper", type = void.class),
|
||||||
@Preference(name = "color_theme", type = ColorTheme.class, defaultValue = "DEFAULT"),
|
@Preference(name = "color_theme", type = ColorTheme.class, defaultValue = "DEFAULT"),
|
||||||
@Preference(name = "background", type = Background.class, defaultValue = "BLUR"),
|
@Preference(name = "background", type = Background.class, defaultValue = "BLUR"),
|
||||||
@Preference(name = "font", type = Font.class, defaultValue = "HACK"),
|
@Preference(name = "font", type = Font.class, defaultValue = "HACK"),
|
||||||
@Preference(name = "monochrome_icons", type = boolean.class, defaultValue = "false"),
|
@Preference(name = "monochrome_icons", type = boolean.class, defaultValue = "false"),
|
||||||
}),
|
}),
|
||||||
@PreferenceGroup(name = "clock", prefix = "settings_clock_", suffix = "_key", value = {
|
@PreferenceGroup(name = "clock", prefix = "settings_clock_", suffix = "_key", value = {
|
||||||
@Preference(name = "date_visible", type = boolean.class, defaultValue = "true"),
|
@Preference(name = "date_visible", type = boolean.class, defaultValue = "true"),
|
||||||
@Preference(name = "time_visible", type = boolean.class, defaultValue = "true"),
|
@Preference(name = "time_visible", type = boolean.class, defaultValue = "true"),
|
||||||
@Preference(name = "flip_date_time", type = boolean.class, defaultValue = "false"),
|
@Preference(name = "flip_date_time", type = boolean.class, defaultValue = "false"),
|
||||||
@Preference(name = "localized", type = boolean.class, defaultValue = "false"),
|
@Preference(name = "localized", type = boolean.class, defaultValue = "false"),
|
||||||
}),
|
}),
|
||||||
@PreferenceGroup(name = "display", prefix = "settings_display_", suffix = "_key", value = {
|
@PreferenceGroup(name = "display", prefix = "settings_display_", suffix = "_key", value = {
|
||||||
@Preference(name = "screen_timeout_disabled", type = boolean.class, defaultValue = "false"),
|
@Preference(name = "screen_timeout_disabled", type = boolean.class, defaultValue = "false"),
|
||||||
@Preference(name = "full_screen", type = boolean.class, defaultValue = "true"),
|
@Preference(name = "full_screen", type = boolean.class, defaultValue = "true"),
|
||||||
}),
|
}),
|
||||||
@PreferenceGroup(name = "functionality", prefix = "settings_functionality_", suffix = "_key", value = {
|
@PreferenceGroup( name = "functionality", prefix = "settings_functionality_", suffix = "_key", value = {
|
||||||
@Preference(name = "search_auto_launch", type = boolean.class, defaultValue = "true"),
|
@Preference(name = "search_auto_launch", type = boolean.class, defaultValue = "true"),
|
||||||
@Preference(name = "search_auto_open_keyboard", type = boolean.class, defaultValue = "true"),
|
@Preference(name = "search_auto_open_keyboard", type = boolean.class, defaultValue = "true"),
|
||||||
}),
|
}),
|
||||||
@PreferenceGroup(name = "enabled_gestures", prefix = "settings_enabled_gestures_", suffix = "_key", value = {
|
@PreferenceGroup(name = "enabled_gestures", prefix = "settings_enabled_gestures_", suffix = "_key", value = {
|
||||||
@Preference(name = "double_swipe", type = boolean.class, defaultValue = "true"),
|
@Preference(name = "double_swipe", type = boolean.class, defaultValue = "true"),
|
||||||
@Preference(name = "edge_swipe", type = boolean.class, defaultValue = "true"),
|
@Preference(name = "edge_swipe", type = boolean.class, defaultValue = "true"),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
public final class LauncherPreferences$Config {
|
public final class LauncherPreferences$Config {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,58 +1,141 @@
|
||||||
package de.jrpie.android.launcher.preferences
|
package de.jrpie.android.launcher.preferences
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.SharedPreferences
|
||||||
import de.jrpie.android.launcher.BuildConfig.VERSION_CODE
|
import android.util.Log
|
||||||
|
import android.widget.Toast
|
||||||
import de.jrpie.android.launcher.Gesture
|
import de.jrpie.android.launcher.Gesture
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.preferences.theme.Background
|
||||||
import de.jrpie.android.launcher.tutorial.TutorialActivity
|
import de.jrpie.android.launcher.preferences.theme.ColorTheme
|
||||||
|
|
||||||
|
/* Current version of the structure of preferences.
|
||||||
|
* Increase when breaking changes are introduced and write an appropriate case in
|
||||||
|
* `migratePreferencesToNewVersion`
|
||||||
|
*/
|
||||||
|
const val PREFERENCE_VERSION = 1
|
||||||
|
const val UNKNOWN_PREFERENCE_VERSION = -1
|
||||||
|
|
||||||
|
|
||||||
fun migrateToNewVersion(activity: Activity) {
|
private fun migrateStringPreference(oldPrefs: SharedPreferences, newPreferences: SharedPreferences.Editor, oldKey: String, newKey: String, default: String) {
|
||||||
|
val s = oldPrefs.getString(oldKey, default)
|
||||||
|
newPreferences.putString(newKey, s)
|
||||||
|
}
|
||||||
|
private fun migrateIntPreference(oldPrefs: SharedPreferences, newPreferences: SharedPreferences.Editor, oldKey: String, newKey: String, default: Int) {
|
||||||
|
val s = oldPrefs.getInt(oldKey, default)
|
||||||
|
newPreferences.putInt(newKey, s)
|
||||||
|
}
|
||||||
|
private fun migrateBooleanPreference(oldPrefs: SharedPreferences, newPreferences: SharedPreferences.Editor, oldKey: String, newKey: String, default: Boolean) {
|
||||||
|
val s = oldPrefs.getBoolean(oldKey, default)
|
||||||
|
newPreferences.putBoolean(newKey, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun migratePreferencesToNewVersion(context: Context) {
|
||||||
when (LauncherPreferences.internal().versionCode()) {
|
when (LauncherPreferences.internal().versionCode()) {
|
||||||
// Check versions, make sure transitions between versions go well
|
// Check versions, make sure transitions between versions go well
|
||||||
|
PREFERENCE_VERSION -> { /* the version installed and used previously are the same */ }
|
||||||
|
UNKNOWN_PREFERENCE_VERSION -> { /* still using the old preferences file */
|
||||||
|
Log.i("Launcher", "Unknown preference version, trying to restore preferences from old version.")
|
||||||
|
|
||||||
VERSION_CODE -> { /* the version installed and used previously are the same */
|
|
||||||
}
|
|
||||||
|
|
||||||
21, 22, 23 -> {
|
val oldPrefs = context.getSharedPreferences(
|
||||||
// TODO
|
"V3RYR4ND0MK3YCR4P",
|
||||||
}
|
Context.MODE_PRIVATE
|
||||||
|
)
|
||||||
|
if(!oldPrefs.contains("startedBefore")) {
|
||||||
|
Log.i("Launcher", "No old preferences found.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
val newPrefs = LauncherPreferences.getSharedPreferences().edit()
|
||||||
|
|
||||||
else -> { /* The version used before was pre- v1.3.0,
|
migrateBooleanPreference(oldPrefs, newPrefs, "startedBefore", "internal.started_before", false)
|
||||||
as version tracking started then */
|
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_volumeUpApp", "action.volume_up.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_volumeUpApp_user", "action.volume_up.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_volumeDownApp", "action.volume_down.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_volumeDownApp_user", "action.volume_down.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_timeApp", "action.time.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_timeApp_user", "action.time.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_dateApp", "action.date.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_dateApp_user", "action.date.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_longClickApp", "action.long_click.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_longClickApp_user", "action.long_click.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_doubleClickApp", "action.double_click.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_doubleClickApp_user", "action.double_click.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_upApp", "action.up.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_upApp_user", "action.up.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_up_leftApp", "action.up_left.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_up_leftApp_user", "action.up_left.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_up_rightApp", "action.up_right.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_up_rightApp_user", "action.up_right.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_doubleUpApp", "action.double_up.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_doubleUpApp_user", "action.double_up.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_downApp", "action.down.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_downApp_user", "action.down.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_down_leftApp", "action.down_left.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_down_leftApp_user", "action.down_left.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_down_rightApp", "action.down_right.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_down_rightApp_user", "action.down_right.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_doubleDownApp", "action.double_down.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_doubleDownApp_user", "action.double_down.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_leftApp", "action.left.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_leftApp_user", "action.left.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_left_topApp", "action.left_top.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_left_topApp_user", "action.left_top.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_left_bottomApp", "action.left_bottom.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_left_bottomApp_user", "action.left_bottom.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_doubleLeftApp", "action.double_left.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_doubleLeftApp_user", "action.double_left.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_rightApp", "action.right.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_rightApp_user", "action.right.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_right_topApp", "action.right_top.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_right_topApp_user", "action.right_top.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_right_bottomApp", "action.right_bottom.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_right_bottomApp_user", "action.right_bottom.user", -1)
|
||||||
|
migrateStringPreference(oldPrefs, newPrefs, "action_doubleRightApp", "action.double_right.app", "")
|
||||||
|
migrateIntPreference(oldPrefs, newPrefs, "action_doubleRightApp_user", "action.double_right.user", -1)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "timeVisible", "clock.time_visible", true)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "dateVisible", "clock.date_visible", true)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "dateLocalized", "clock.date_localized", false)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "dateTimeFlip", "clock.date_time_flip", false)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "disableTimeout", "display.disable_timeout", false)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "useFullScreen", "display.use_full_screen", true)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "enableDoubleActions", "enabled_gestures.double_actions", true)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "enableEdgeActions", "enabled_gestures.edge_actions", true)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "searchAutoLaunch", "functionality.search_auto_launch", true)
|
||||||
|
migrateBooleanPreference(oldPrefs, newPrefs, "searchAutoKeyboard", "functionality.search_auto_keyboard", true)
|
||||||
|
|
||||||
|
newPrefs.apply()
|
||||||
|
|
||||||
|
when(oldPrefs.getString("theme", "finn")) {
|
||||||
|
"finn" -> {
|
||||||
|
LauncherPreferences.theme().colorTheme(ColorTheme.DEFAULT)
|
||||||
|
LauncherPreferences.theme().monochromeIcons(false)
|
||||||
|
LauncherPreferences.theme().background(Background.BLUR)
|
||||||
|
}
|
||||||
|
"dark" -> {
|
||||||
|
LauncherPreferences.theme().colorTheme(ColorTheme.DARK)
|
||||||
|
LauncherPreferences.theme().monochromeIcons(true)
|
||||||
|
LauncherPreferences.theme().background(Background.BLUR)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
|
||||||
|
Log.i("Launcher", "migration of preferences complete.")
|
||||||
|
|
||||||
/*
|
|
||||||
* before, the dominant and vibrant color of the `finn` and `dark` theme
|
|
||||||
* were not stored anywhere. Now they have to be stored:
|
|
||||||
* -> we just reset them using newly implemented functions
|
|
||||||
*/
|
|
||||||
/*when (LauncherPreferences.theme().colorTheme()) {
|
|
||||||
"finn" -> resetToDefaultTheme(activity)
|
|
||||||
"dark" -> resetToDarkTheme(activity)
|
|
||||||
} */
|
|
||||||
LauncherPreferences.internal().versionCode(VERSION_CODE)
|
|
||||||
// show the new tutorial
|
// show the new tutorial
|
||||||
activity.startActivity(Intent(activity, TutorialActivity::class.java))
|
// context.startActivity(Intent(context, TutorialActivity::class.java))
|
||||||
}
|
}
|
||||||
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun resetSettings(context: Context) {
|
fun resetPreferences(context: Context) {
|
||||||
|
Log.i("Launcher", "resetting preferences")
|
||||||
|
LauncherPreferences.clear()
|
||||||
|
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
|
||||||
val editor = LauncherPreferences.getSharedPreferences().edit()
|
val editor = LauncherPreferences.getSharedPreferences().edit()
|
||||||
Gesture.values().forEach { editor.putString(it.id, it.pickDefaultApp(context)) }
|
Gesture.values().forEach { editor.putString(it.id + ".app", it.pickDefaultApp(context)) }
|
||||||
|
Gesture.values().forEach { editor.putInt(it.id + ".user", -1) }
|
||||||
editor.apply()
|
editor.apply()
|
||||||
|
|
||||||
// set default theme
|
|
||||||
val dominantColor = context.resources.getColor(R.color.finnmglasTheme_background_color)
|
|
||||||
val vibrantColor = context.resources.getColor(R.color.finnmglasTheme_accent_color)
|
|
||||||
|
|
||||||
|
|
||||||
LauncherPreferences.theme().dominant(dominantColor)
|
|
||||||
LauncherPreferences.theme().vibrant(vibrantColor)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,14 @@ import android.content.res.Resources
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.viewpager.widget.ViewPager
|
||||||
|
import de.jrpie.android.launcher.*
|
||||||
|
import com.google.android.material.tabs.TabLayout
|
||||||
|
import de.jrpie.android.launcher.databinding.SettingsBinding
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
import androidx.fragment.app.FragmentPagerAdapter
|
import androidx.fragment.app.FragmentPagerAdapter
|
||||||
import androidx.viewpager.widget.ViewPager
|
|
||||||
import com.google.android.material.tabs.TabLayout
|
|
||||||
import de.jrpie.android.launcher.R
|
|
||||||
import de.jrpie.android.launcher.REQUEST_CHOOSE_APP
|
|
||||||
import de.jrpie.android.launcher.UIObject
|
|
||||||
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.saveListActivityChoice
|
|
||||||
import de.jrpie.android.launcher.settings.actions.SettingsFragmentActions
|
import de.jrpie.android.launcher.settings.actions.SettingsFragmentActions
|
||||||
import de.jrpie.android.launcher.settings.launcher.SettingsFragmentLauncher
|
import de.jrpie.android.launcher.settings.launcher.SettingsFragmentLauncher
|
||||||
import de.jrpie.android.launcher.settings.meta.SettingsFragmentMeta
|
import de.jrpie.android.launcher.settings.meta.SettingsFragmentMeta
|
||||||
|
@ -31,11 +28,11 @@ import de.jrpie.android.launcher.settings.meta.SettingsFragmentMeta
|
||||||
*
|
*
|
||||||
* Settings are closed automatically if the activity goes `onPause` unexpectedly.
|
* Settings are closed automatically if the activity goes `onPause` unexpectedly.
|
||||||
*/
|
*/
|
||||||
class SettingsActivity : AppCompatActivity(), UIObject {
|
class SettingsActivity: AppCompatActivity(), UIObject {
|
||||||
|
|
||||||
private var sharedPreferencesListener =
|
private var sharedPreferencesListener =
|
||||||
SharedPreferences.OnSharedPreferenceChangeListener { _, prefKey ->
|
SharedPreferences.OnSharedPreferenceChangeListener { _,prefKey ->
|
||||||
if (prefKey?.startsWith("theme.") == true) {
|
if(prefKey?.startsWith("theme.") == true) {
|
||||||
recreate()
|
recreate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,13 +56,11 @@ class SettingsActivity : AppCompatActivity(), UIObject {
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
super<AppCompatActivity>.onStart()
|
super<AppCompatActivity>.onStart()
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
LauncherPreferences.getSharedPreferences()
|
LauncherPreferences.getSharedPreferences().registerOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
||||||
.registerOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
LauncherPreferences.getSharedPreferences()
|
LauncherPreferences.getSharedPreferences().unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
||||||
.unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
|
||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +68,7 @@ class SettingsActivity : AppCompatActivity(), UIObject {
|
||||||
return modifyTheme(super.getTheme())
|
return modifyTheme(super.getTheme())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setOnClicks() {
|
override fun setOnClicks(){
|
||||||
// As older APIs somehow do not recognize the xml defined onClick
|
// As older APIs somehow do not recognize the xml defined onClick
|
||||||
binding.settingsClose.setOnClickListener { finish() }
|
binding.settingsClose.setOnClickListener { finish() }
|
||||||
// open device settings (see https://stackoverflow.com/a/62092663/12787264)
|
// open device settings (see https://stackoverflow.com/a/62092663/12787264)
|
||||||
|
@ -96,11 +91,11 @@ private val TAB_TITLES = arrayOf(
|
||||||
R.string.settings_tab_meta
|
R.string.settings_tab_meta
|
||||||
)
|
)
|
||||||
|
|
||||||
class SettingsSectionsPagerAdapter(private val context: Context, fm: FragmentManager) :
|
class SettingsSectionsPagerAdapter(private val context: Context, fm: FragmentManager)
|
||||||
FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
: FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
||||||
|
|
||||||
override fun getItem(position: Int): Fragment {
|
override fun getItem(position: Int): Fragment {
|
||||||
return when (position) {
|
return when (position){
|
||||||
0 -> SettingsFragmentActions()
|
0 -> SettingsFragmentActions()
|
||||||
1 -> SettingsFragmentLauncher()
|
1 -> SettingsFragmentLauncher()
|
||||||
2 -> SettingsFragmentMeta()
|
2 -> SettingsFragmentMeta()
|
||||||
|
@ -112,7 +107,5 @@ class SettingsSectionsPagerAdapter(private val context: Context, fm: FragmentMan
|
||||||
return context.resources.getString(TAB_TITLES[position])
|
return context.resources.getString(TAB_TITLES[position])
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getCount(): Int {
|
override fun getCount(): Int { return 3 }
|
||||||
return 3
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,22 +44,18 @@ SettingsFragmentActions : Fragment(), UIObject {
|
||||||
override fun setOnClicks() {
|
override fun setOnClicks() {
|
||||||
|
|
||||||
// App management buttons
|
// App management buttons
|
||||||
binding!!.settingsActionsButtonViewApps.setOnClickListener {
|
binding!!.settingsActionsButtonViewApps.setOnClickListener{
|
||||||
val intent = Intent(this.context, ListActivity::class.java)
|
val intent = Intent(this.context, ListActivity::class.java)
|
||||||
intent.putExtra("intention", ListActivity.ListActivityIntention.VIEW.toString())
|
intent.putExtra("intention", ListActivity.ListActivityIntention.VIEW.toString())
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
binding!!.settingsActionsButtonInstallApps.setOnClickListener {
|
binding!!.settingsActionsButtonInstallApps.setOnClickListener{
|
||||||
try {
|
try {
|
||||||
val intent = Intent(Intent.ACTION_MAIN)
|
val intent = Intent(Intent.ACTION_MAIN)
|
||||||
intent.addCategory(Intent.CATEGORY_APP_MARKET)
|
intent.addCategory(Intent.CATEGORY_APP_MARKET)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} catch (e: ActivityNotFoundException) {
|
} catch (e: ActivityNotFoundException) {
|
||||||
Toast.makeText(
|
Toast.makeText(context, getString(R.string.settings_apps_toast_store_not_found), Toast.LENGTH_SHORT).show()
|
||||||
context,
|
|
||||||
getString(R.string.settings_apps_toast_store_not_found),
|
|
||||||
Toast.LENGTH_SHORT
|
|
||||||
).show()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,25 @@
|
||||||
package de.jrpie.android.launcher.settings.actions
|
package de.jrpie.android.launcher.settings.actions
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.content.Intent
|
|
||||||
import android.content.SharedPreferences
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import de.jrpie.android.launcher.*
|
||||||
|
import de.jrpie.android.launcher.list.ListActivity
|
||||||
|
import android.app.Activity
|
||||||
|
import android.content.Intent
|
||||||
|
import android.content.SharedPreferences
|
||||||
|
import android.util.Log
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import de.jrpie.android.launcher.Gesture
|
|
||||||
import de.jrpie.android.launcher.R
|
|
||||||
import de.jrpie.android.launcher.REQUEST_CHOOSE_APP
|
|
||||||
import de.jrpie.android.launcher.UIObject
|
|
||||||
import de.jrpie.android.launcher.databinding.SettingsActionsRecyclerBinding
|
|
||||||
import de.jrpie.android.launcher.getAppIcon
|
|
||||||
import de.jrpie.android.launcher.list.ListActivity
|
|
||||||
import de.jrpie.android.launcher.list.other.LauncherAction
|
import de.jrpie.android.launcher.list.other.LauncherAction
|
||||||
|
import de.jrpie.android.launcher.databinding.SettingsActionsRecyclerBinding
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import de.jrpie.android.launcher.transformGrayscale
|
import java.lang.Exception
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [SettingsFragmentActionsRecycler] is a fragment containing the [ActionsRecyclerAdapter],
|
* The [SettingsFragmentActionsRecycler] is a fragment containing the [ActionsRecyclerAdapter],
|
||||||
|
@ -52,7 +49,7 @@ class SettingsFragmentActionsRecycler : Fragment(), UIObject {
|
||||||
|
|
||||||
// set up the list / recycler
|
// set up the list / recycler
|
||||||
val actionViewManager = LinearLayoutManager(context)
|
val actionViewManager = LinearLayoutManager(context)
|
||||||
actionViewAdapter = ActionsRecyclerAdapter(requireActivity())
|
actionViewAdapter = ActionsRecyclerAdapter( requireActivity() )
|
||||||
|
|
||||||
binding.settingsActionsRview.apply {
|
binding.settingsActionsRview.apply {
|
||||||
// improve performance (since content changes don't change the layout size)
|
// improve performance (since content changes don't change the layout size)
|
||||||
|
@ -60,21 +57,19 @@ class SettingsFragmentActionsRecycler : Fragment(), UIObject {
|
||||||
layoutManager = actionViewManager
|
layoutManager = actionViewManager
|
||||||
adapter = actionViewAdapter
|
adapter = actionViewAdapter
|
||||||
}
|
}
|
||||||
LauncherPreferences.getSharedPreferences()
|
LauncherPreferences.getSharedPreferences().registerOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
||||||
.registerOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
|
||||||
|
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
LauncherPreferences.getSharedPreferences()
|
LauncherPreferences.getSharedPreferences().unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
||||||
.unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
|
||||||
|
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ActionsRecyclerAdapter(val activity: Activity) :
|
class ActionsRecyclerAdapter(val activity: Activity):
|
||||||
RecyclerView.Adapter<ActionsRecyclerAdapter.ViewHolder>() {
|
RecyclerView.Adapter<ActionsRecyclerAdapter.ViewHolder>() {
|
||||||
|
|
||||||
private val gesturesList: ArrayList<Gesture>
|
private val gesturesList: ArrayList<Gesture>
|
||||||
|
@ -86,11 +81,9 @@ class ActionsRecyclerAdapter(val activity: Activity) :
|
||||||
var chooseButton: Button = itemView.findViewById(R.id.settings_actions_row_button_choose)
|
var chooseButton: Button = itemView.findViewById(R.id.settings_actions_row_button_choose)
|
||||||
var removeAction: ImageView = itemView.findViewById(R.id.settings_actions_row_remove)
|
var removeAction: ImageView = itemView.findViewById(R.id.settings_actions_row_remove)
|
||||||
|
|
||||||
override fun onClick(v: View) {}
|
override fun onClick(v: View) { }
|
||||||
|
|
||||||
init {
|
init { itemView.setOnClickListener(this) }
|
||||||
itemView.setOnClickListener(this)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateViewHolder(gesture: Gesture, viewHolder: ViewHolder) {
|
private fun updateViewHolder(gesture: Gesture, viewHolder: ViewHolder) {
|
||||||
|
@ -99,11 +92,12 @@ class ActionsRecyclerAdapter(val activity: Activity) :
|
||||||
viewHolder.img.visibility = View.VISIBLE
|
viewHolder.img.visibility = View.VISIBLE
|
||||||
viewHolder.removeAction.visibility = View.VISIBLE
|
viewHolder.removeAction.visibility = View.VISIBLE
|
||||||
viewHolder.chooseButton.visibility = View.INVISIBLE
|
viewHolder.chooseButton.visibility = View.INVISIBLE
|
||||||
if (content.isEmpty()) {
|
if (content.isEmpty()){
|
||||||
viewHolder.img.visibility = View.INVISIBLE
|
viewHolder.img.visibility = View.INVISIBLE
|
||||||
viewHolder.removeAction.visibility = View.GONE
|
viewHolder.removeAction.visibility = View.GONE
|
||||||
viewHolder.chooseButton.visibility = View.VISIBLE
|
viewHolder.chooseButton.visibility = View.VISIBLE
|
||||||
} else if (LauncherAction.isOtherAction(content)) {
|
}
|
||||||
|
else if (LauncherAction.isOtherAction(content)) {
|
||||||
LauncherAction.byId(content)?.let {
|
LauncherAction.byId(content)?.let {
|
||||||
viewHolder.img.setImageResource(it.icon)
|
viewHolder.img.setImageResource(it.icon)
|
||||||
}
|
}
|
||||||
|
@ -111,7 +105,7 @@ class ActionsRecyclerAdapter(val activity: Activity) :
|
||||||
// Set image icon (by packageName)
|
// Set image icon (by packageName)
|
||||||
try {
|
try {
|
||||||
viewHolder.img.setImageDrawable(getAppIcon(activity, content, app.second))
|
viewHolder.img.setImageDrawable(getAppIcon(activity, content, app.second))
|
||||||
} catch (e: Exception) {
|
} catch (e : Exception) {
|
||||||
// Probably the app was uninstalled
|
// Probably the app was uninstalled
|
||||||
// the button is shown, user asked to select an action
|
// the button is shown, user asked to select an action
|
||||||
viewHolder.img.visibility = View.INVISIBLE
|
viewHolder.img.visibility = View.INVISIBLE
|
||||||
|
@ -125,16 +119,14 @@ class ActionsRecyclerAdapter(val activity: Activity) :
|
||||||
val gesture = gesturesList[i]
|
val gesture = gesturesList[i]
|
||||||
viewHolder.textView.text = gesture.getLabel(activity)
|
viewHolder.textView.text = gesture.getLabel(activity)
|
||||||
if (LauncherPreferences.theme().monochromeIcons())
|
if (LauncherPreferences.theme().monochromeIcons())
|
||||||
transformGrayscale(viewHolder.img)
|
transformGrayscale( viewHolder.img )
|
||||||
updateViewHolder(gesture, viewHolder)
|
updateViewHolder(gesture, viewHolder)
|
||||||
viewHolder.img.setOnClickListener { chooseApp(gesture) }
|
viewHolder.img.setOnClickListener{ chooseApp(gesture) }
|
||||||
viewHolder.chooseButton.setOnClickListener { chooseApp(gesture) }
|
viewHolder.chooseButton.setOnClickListener{ chooseApp(gesture) }
|
||||||
viewHolder.removeAction.setOnClickListener { gesture.removeApp(activity) }
|
viewHolder.removeAction.setOnClickListener{ gesture.removeApp(activity) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int { return gesturesList.size }
|
||||||
return gesturesList.size
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
val inflater = LayoutInflater.from(parent.context)
|
val inflater = LayoutInflater.from(parent.context)
|
||||||
|
@ -147,8 +139,7 @@ class ActionsRecyclerAdapter(val activity: Activity) :
|
||||||
val edgeActions = LauncherPreferences.enabled_gestures().edgeSwipe()
|
val edgeActions = LauncherPreferences.enabled_gestures().edgeSwipe()
|
||||||
gesturesList = Gesture.values().filter {
|
gesturesList = Gesture.values().filter {
|
||||||
(doubleActions || !it.isDoubleVariant())
|
(doubleActions || !it.isDoubleVariant())
|
||||||
&& (edgeActions || !it.isEdgeVariant())
|
&& (edgeActions || !it.isEdgeVariant())} as ArrayList<Gesture>
|
||||||
} as ArrayList<Gesture>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun updateActions() {
|
fun updateActions() {
|
||||||
|
@ -157,8 +148,7 @@ class ActionsRecyclerAdapter(val activity: Activity) :
|
||||||
this.gesturesList.clear()
|
this.gesturesList.clear()
|
||||||
gesturesList.addAll(Gesture.values().filter {
|
gesturesList.addAll(Gesture.values().filter {
|
||||||
(doubleActions || !it.isDoubleVariant())
|
(doubleActions || !it.isDoubleVariant())
|
||||||
&& (edgeActions || !it.isEdgeVariant())
|
&& (edgeActions || !it.isEdgeVariant())})
|
||||||
})
|
|
||||||
|
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
@ -168,8 +158,7 @@ class ActionsRecyclerAdapter(val activity: Activity) :
|
||||||
val intent = Intent(activity, ListActivity::class.java)
|
val intent = Intent(activity, ListActivity::class.java)
|
||||||
intent.putExtra("intention", ListActivity.ListActivityIntention.PICK.toString())
|
intent.putExtra("intention", ListActivity.ListActivityIntention.PICK.toString())
|
||||||
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.startActivityForResult(
|
activity.startActivityForResult(intent,
|
||||||
intent,
|
|
||||||
REQUEST_CHOOSE_APP
|
REQUEST_CHOOSE_APP
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import de.jrpie.android.launcher.R
|
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
|
import de.jrpie.android.launcher.R
|
||||||
import de.jrpie.android.launcher.setDefaultHomeScreen
|
import de.jrpie.android.launcher.setDefaultHomeScreen
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,13 +17,9 @@ import de.jrpie.android.launcher.setDefaultHomeScreen
|
||||||
class SettingsFragmentLauncher : PreferenceFragmentCompat() {
|
class SettingsFragmentLauncher : PreferenceFragmentCompat() {
|
||||||
|
|
||||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||||
preferenceManager.sharedPreferencesName = getString(R.string.preference_file_key)
|
|
||||||
preferenceManager.sharedPreferencesMode = Context.MODE_PRIVATE
|
|
||||||
setPreferencesFromResource(R.xml.preferences, rootKey)
|
setPreferencesFromResource(R.xml.preferences, rootKey)
|
||||||
|
|
||||||
val selectWallpaper = findPreference<androidx.preference.Preference>(
|
val selectWallpaper = findPreference<androidx.preference.Preference>(LauncherPreferences.theme().keys().wallpaper())
|
||||||
LauncherPreferences.theme().keys().wallpaper()
|
|
||||||
)
|
|
||||||
selectWallpaper?.setOnPreferenceClickListener {
|
selectWallpaper?.setOnPreferenceClickListener {
|
||||||
// https://github.com/LineageOS/android_packages_apps_Trebuchet/blob/6caab89b21b2b91f0a439e1fd8c4510dcb255819/src/com/android/launcher3/views/OptionsPopupView.java#L271
|
// https://github.com/LineageOS/android_packages_apps_Trebuchet/blob/6caab89b21b2b91f0a439e1fd8c4510dcb255819/src/com/android/launcher3/views/OptionsPopupView.java#L271
|
||||||
val intent = Intent(Intent.ACTION_SET_WALLPAPER)
|
val intent = Intent(Intent.ACTION_SET_WALLPAPER)
|
||||||
|
@ -32,9 +28,7 @@ class SettingsFragmentLauncher : PreferenceFragmentCompat() {
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
val chooseHomeScreen = findPreference<androidx.preference.Preference>(
|
val chooseHomeScreen = findPreference<androidx.preference.Preference>(LauncherPreferences.general().keys().chooseHomeScreen())
|
||||||
LauncherPreferences.general().keys().chooseHomeScreen()
|
|
||||||
)
|
|
||||||
chooseHomeScreen?.setOnPreferenceClickListener {
|
chooseHomeScreen?.setOnPreferenceClickListener {
|
||||||
setDefaultHomeScreen(requireContext(), checkDefault = false)
|
setDefaultHomeScreen(requireContext(), checkDefault = false)
|
||||||
true
|
true
|
||||||
|
|
|
@ -10,10 +10,10 @@ import android.view.ViewGroup
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
import de.jrpie.android.launcher.UIObject
|
import de.jrpie.android.launcher.UIObject
|
||||||
import de.jrpie.android.launcher.databinding.SettingsMetaBinding
|
|
||||||
import de.jrpie.android.launcher.openNewTabWindow
|
import de.jrpie.android.launcher.openNewTabWindow
|
||||||
import de.jrpie.android.launcher.preferences.resetSettings
|
|
||||||
import de.jrpie.android.launcher.tutorial.TutorialActivity
|
import de.jrpie.android.launcher.tutorial.TutorialActivity
|
||||||
|
import de.jrpie.android.launcher.databinding.SettingsMetaBinding
|
||||||
|
import de.jrpie.android.launcher.preferences.resetPreferences
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [SettingsFragmentMeta] is a used as a tab in the SettingsActivity.
|
* The [SettingsFragmentMeta] is a used as a tab in the SettingsActivity.
|
||||||
|
@ -65,10 +65,9 @@ class SettingsFragmentMeta : Fragment(), UIObject {
|
||||||
AlertDialog.Builder(this.requireContext(), R.style.AlertDialogCustom)
|
AlertDialog.Builder(this.requireContext(), R.style.AlertDialogCustom)
|
||||||
.setTitle(getString(R.string.settings_meta_reset))
|
.setTitle(getString(R.string.settings_meta_reset))
|
||||||
.setMessage(getString(R.string.settings_meta_reset_confirm))
|
.setMessage(getString(R.string.settings_meta_reset_confirm))
|
||||||
.setPositiveButton(
|
.setPositiveButton(android.R.string.ok
|
||||||
android.R.string.ok
|
|
||||||
) { _, _ ->
|
) { _, _ ->
|
||||||
resetSettings(this.requireContext())
|
resetPreferences(this.requireContext())
|
||||||
requireActivity().finish()
|
requireActivity().finish()
|
||||||
}
|
}
|
||||||
.setNegativeButton(android.R.string.cancel, null)
|
.setNegativeButton(android.R.string.cancel, null)
|
||||||
|
@ -86,6 +85,7 @@ class SettingsFragmentMeta : Fragment(), UIObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// contact developer
|
// contact developer
|
||||||
binding.settingsMetaButtonContact.setOnClickListener {
|
binding.settingsMetaButtonContact.setOnClickListener {
|
||||||
openNewTabWindow(
|
openNewTabWindow(
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package de.jrpie.android.launcher.tutorial
|
package de.jrpie.android.launcher.tutorial
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.res.Resources
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
|
@ -8,11 +9,10 @@ import androidx.fragment.app.FragmentManager
|
||||||
import androidx.fragment.app.FragmentPagerAdapter
|
import androidx.fragment.app.FragmentPagerAdapter
|
||||||
import androidx.viewpager.widget.ViewPager
|
import androidx.viewpager.widget.ViewPager
|
||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
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.REQUEST_CHOOSE_APP
|
||||||
import de.jrpie.android.launcher.UIObject
|
import de.jrpie.android.launcher.UIObject
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
|
||||||
import de.jrpie.android.launcher.preferences.resetSettings
|
|
||||||
import de.jrpie.android.launcher.saveListActivityChoice
|
import de.jrpie.android.launcher.saveListActivityChoice
|
||||||
import de.jrpie.android.launcher.tutorial.tabs.TutorialFragmentConcept
|
import de.jrpie.android.launcher.tutorial.tabs.TutorialFragmentConcept
|
||||||
import de.jrpie.android.launcher.tutorial.tabs.TutorialFragmentFinish
|
import de.jrpie.android.launcher.tutorial.tabs.TutorialFragmentFinish
|
||||||
|
@ -27,7 +27,7 @@ import de.jrpie.android.launcher.tutorial.tabs.TutorialFragmentUsage
|
||||||
* It tells the user about the concept behind launcher
|
* It tells the user about the concept behind launcher
|
||||||
* and helps with the setup process (on new installations)
|
* and helps with the setup process (on new installations)
|
||||||
*/
|
*/
|
||||||
class TutorialActivity : AppCompatActivity(), UIObject {
|
class TutorialActivity: AppCompatActivity(), UIObject {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -35,10 +35,6 @@ class TutorialActivity : AppCompatActivity(), UIObject {
|
||||||
// Initialise layout
|
// Initialise layout
|
||||||
setContentView(R.layout.tutorial)
|
setContentView(R.layout.tutorial)
|
||||||
|
|
||||||
// Check if the app was started before
|
|
||||||
if (!LauncherPreferences.internal().started())
|
|
||||||
resetSettings(this)
|
|
||||||
|
|
||||||
// set up tabs and swiping in settings
|
// set up tabs and swiping in settings
|
||||||
val sectionsPagerAdapter = TutorialSectionsPagerAdapter(supportFragmentManager)
|
val sectionsPagerAdapter = TutorialSectionsPagerAdapter(supportFragmentManager)
|
||||||
val viewPager: ViewPager = findViewById(R.id.tutorial_viewpager)
|
val viewPager: ViewPager = findViewById(R.id.tutorial_viewpager)
|
||||||
|
@ -47,6 +43,10 @@ class TutorialActivity : AppCompatActivity(), UIObject {
|
||||||
tabs.setupWithViewPager(viewPager)
|
tabs.setupWithViewPager(viewPager)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getTheme(): Resources.Theme {
|
||||||
|
return modifyTheme(super.getTheme())
|
||||||
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
super<AppCompatActivity>.onStart()
|
super<AppCompatActivity>.onStart()
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
|
@ -54,7 +54,7 @@ class TutorialActivity : AppCompatActivity(), UIObject {
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
when (requestCode) {
|
when (requestCode) {
|
||||||
REQUEST_CHOOSE_APP -> saveListActivityChoice(this, data)
|
REQUEST_CHOOSE_APP -> saveListActivityChoice(this,data)
|
||||||
else -> super.onActivityResult(requestCode, resultCode, data)
|
else -> super.onActivityResult(requestCode, resultCode, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,11 +73,11 @@ class TutorialActivity : AppCompatActivity(), UIObject {
|
||||||
*
|
*
|
||||||
* Tabs: (Start | Concept | Usage | Setup | Finish)
|
* Tabs: (Start | Concept | Usage | Setup | Finish)
|
||||||
*/
|
*/
|
||||||
class TutorialSectionsPagerAdapter(fm: FragmentManager) :
|
class TutorialSectionsPagerAdapter(fm: FragmentManager)
|
||||||
FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
: FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
||||||
|
|
||||||
override fun getItem(position: Int): Fragment {
|
override fun getItem(position: Int): Fragment {
|
||||||
return when (position) {
|
return when (position){
|
||||||
0 -> TutorialFragmentStart()
|
0 -> TutorialFragmentStart()
|
||||||
1 -> TutorialFragmentConcept()
|
1 -> TutorialFragmentConcept()
|
||||||
2 -> TutorialFragmentUsage()
|
2 -> TutorialFragmentUsage()
|
||||||
|
@ -88,11 +88,6 @@ class TutorialSectionsPagerAdapter(fm: FragmentManager) :
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We don't use titles here, as we have the dots */
|
/* We don't use titles here, as we have the dots */
|
||||||
override fun getPageTitle(position: Int): CharSequence {
|
override fun getPageTitle(position: Int): CharSequence { return "" }
|
||||||
return ""
|
override fun getCount(): Int { return 5 }
|
||||||
}
|
|
||||||
|
|
||||||
override fun getCount(): Int {
|
|
||||||
return 5
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import androidx.fragment.app.Fragment
|
||||||
import de.jrpie.android.launcher.BuildConfig
|
import de.jrpie.android.launcher.BuildConfig
|
||||||
import de.jrpie.android.launcher.UIObject
|
import de.jrpie.android.launcher.UIObject
|
||||||
import de.jrpie.android.launcher.databinding.TutorialConceptBinding
|
import de.jrpie.android.launcher.databinding.TutorialConceptBinding
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [TutorialFragmentConcept] is a used as a tab in the TutorialActivity.
|
* The [TutorialFragmentConcept] is a used as a tab in the TutorialActivity.
|
||||||
*
|
*
|
||||||
|
@ -26,7 +25,7 @@ class TutorialFragmentConcept : Fragment(), UIObject {
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart(){
|
||||||
super<Fragment>.onStart()
|
super<Fragment>.onStart()
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
package de.jrpie.android.launcher.tutorial.tabs
|
package de.jrpie.android.launcher.tutorial.tabs
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.fragment.app.Fragment
|
import de.jrpie.android.launcher.*
|
||||||
import de.jrpie.android.launcher.BuildConfig.VERSION_CODE
|
import de.jrpie.android.launcher.BuildConfig.VERSION_CODE
|
||||||
import de.jrpie.android.launcher.UIObject
|
|
||||||
import de.jrpie.android.launcher.databinding.TutorialFinishBinding
|
import de.jrpie.android.launcher.databinding.TutorialFinishBinding
|
||||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import de.jrpie.android.launcher.setDefaultHomeScreen
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [TutorialFragmentFinish] is a used as a tab in the TutorialActivity.
|
* The [TutorialFragmentFinish] is a used as a tab in the TutorialActivity.
|
||||||
|
@ -35,11 +34,11 @@ class TutorialFragmentFinish : Fragment(), UIObject {
|
||||||
|
|
||||||
override fun setOnClicks() {
|
override fun setOnClicks() {
|
||||||
super.setOnClicks()
|
super.setOnClicks()
|
||||||
binding.tutorialFinishButtonStart.setOnClickListener { finishTutorial() }
|
binding.tutorialFinishButtonStart.setOnClickListener{ finishTutorial() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun finishTutorial() {
|
private fun finishTutorial() {
|
||||||
if (!LauncherPreferences.internal().started()) {
|
if(!LauncherPreferences.internal().started()) {
|
||||||
LauncherPreferences.internal().started(true)
|
LauncherPreferences.internal().started(true)
|
||||||
LauncherPreferences.internal().startedTime(System.currentTimeMillis() / 1000L)
|
LauncherPreferences.internal().startedTime(System.currentTimeMillis() / 1000L)
|
||||||
LauncherPreferences.internal().versionCode(VERSION_CODE)
|
LauncherPreferences.internal().versionCode(VERSION_CODE)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TutorialFragmentSetup : Fragment(), UIObject {
|
||||||
return inflater.inflate(R.layout.tutorial_setup, container, false)
|
return inflater.inflate(R.layout.tutorial_setup, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart(){
|
||||||
super<Fragment>.onStart()
|
super<Fragment>.onStart()
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package de.jrpie.android.launcher.tutorial.tabs
|
package de.jrpie.android.launcher.tutorial.tabs
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.fragment.app.Fragment
|
import de.jrpie.android.launcher.*
|
||||||
import de.jrpie.android.launcher.UIObject
|
|
||||||
import de.jrpie.android.launcher.blink
|
|
||||||
import de.jrpie.android.launcher.databinding.TutorialStartBinding
|
import de.jrpie.android.launcher.databinding.TutorialStartBinding
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +25,7 @@ class TutorialFragmentStart : Fragment(), UIObject {
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart(){
|
||||||
super<Fragment>.onStart()
|
super<Fragment>.onStart()
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TutorialFragmentUsage : Fragment(), UIObject {
|
||||||
return inflater.inflate(R.layout.tutorial_usage, container, false)
|
return inflater.inflate(R.layout.tutorial_usage, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart(){
|
||||||
super<Fragment>.onStart()
|
super<Fragment>.onStart()
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<translate
|
<translate
|
||||||
android:duration="100"
|
|
||||||
android:fromYDelta="75%p"
|
android:fromYDelta="75%p"
|
||||||
|
android:toYDelta="0%p"
|
||||||
android:interpolator="@android:anim/decelerate_interpolator"
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
android:toYDelta="0%p" />
|
android:duration="100"/>
|
||||||
|
|
||||||
</set>
|
</set>
|
|
@ -2,9 +2,9 @@
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<translate
|
<translate
|
||||||
android:duration="100"
|
|
||||||
android:fromXDelta="-75%p"
|
android:fromXDelta="-75%p"
|
||||||
|
android:toXDelta="0%p"
|
||||||
android:interpolator="@android:anim/decelerate_interpolator"
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
android:toXDelta="0%p" />
|
android:duration="100"/>
|
||||||
|
|
||||||
</set>
|
</set>
|
|
@ -2,9 +2,9 @@
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<translate
|
<translate
|
||||||
android:duration="100"
|
|
||||||
android:fromXDelta="75%p"
|
android:fromXDelta="75%p"
|
||||||
|
android:toXDelta="0%p"
|
||||||
android:interpolator="@android:anim/decelerate_interpolator"
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
android:toXDelta="0%p" />
|
android:duration="100"/>
|
||||||
|
|
||||||
</set>
|
</set>
|
|
@ -2,9 +2,9 @@
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<translate
|
<translate
|
||||||
android:duration="100"
|
|
||||||
android:fromYDelta="-75%p"
|
android:fromYDelta="-75%p"
|
||||||
|
android:toYDelta="0%p"
|
||||||
android:interpolator="@android:anim/decelerate_interpolator"
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
android:toYDelta="0%p" />
|
android:duration="100"/>
|
||||||
|
|
||||||
</set>
|
</set>
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<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"/>
|
||||||
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>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8 0,-1.85 0.63,-3.55 1.69,-4.9L16.9,18.31C15.55,19.37 13.85,20 12,20zM18.31,16.9L7.1,5.69C8.45,4.63 10.15,4 12,4c4.42,0 8,3.58 8,8 0,1.85 -0.63,3.55 -1.69,4.9z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8 0,-1.85 0.63,-3.55 1.69,-4.9L16.9,18.31C15.55,19.37 13.85,20 12,20zM18.31,16.9L7.1,5.69C8.45,4.63 10.15,4 12,4c4.42,0 8,3.58 8,8 0,1.85 -0.63,3.55 -1.69,4.9z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2L21,5c0,-1.1 -0.89,-2 -2,-2zM17.25,12c0,0.23 -0.02,0.46 -0.05,0.68l1.48,1.16c0.13,0.11 0.17,0.3 0.08,0.45l-1.4,2.42c-0.09,0.15 -0.27,0.21 -0.43,0.15l-1.74,-0.7c-0.36,0.28 -0.76,0.51 -1.18,0.69l-0.26,1.85c-0.03,0.17 -0.18,0.3 -0.35,0.3h-2.8c-0.17,0 -0.32,-0.13 -0.35,-0.29l-0.26,-1.85c-0.43,-0.18 -0.82,-0.41 -1.18,-0.69l-1.74,0.7c-0.16,0.06 -0.34,0 -0.43,-0.15l-1.4,-2.42c-0.09,-0.15 -0.05,-0.34 0.08,-0.45l1.48,-1.16c-0.03,-0.23 -0.05,-0.46 -0.05,-0.69 0,-0.23 0.02,-0.46 0.05,-0.68l-1.48,-1.16c-0.13,-0.11 -0.17,-0.3 -0.08,-0.45l1.4,-2.42c0.09,-0.15 0.27,-0.21 0.43,-0.15l1.74,0.7c0.36,-0.28 0.76,-0.51 1.18,-0.69l0.26,-1.85c0.03,-0.17 0.18,-0.3 0.35,-0.3h2.8c0.17,0 0.32,0.13 0.35,0.29l0.26,1.85c0.43,0.18 0.82,0.41 1.18,0.69l1.74,-0.7c0.16,-0.06 0.34,0 0.43,0.15l1.4,2.42c0.09,0.15 0.05,0.34 -0.08,0.45l-1.48,1.16c0.03,0.23 0.05,0.46 0.05,0.69z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2L21,5c0,-1.1 -0.89,-2 -2,-2zM17.25,12c0,0.23 -0.02,0.46 -0.05,0.68l1.48,1.16c0.13,0.11 0.17,0.3 0.08,0.45l-1.4,2.42c-0.09,0.15 -0.27,0.21 -0.43,0.15l-1.74,-0.7c-0.36,0.28 -0.76,0.51 -1.18,0.69l-0.26,1.85c-0.03,0.17 -0.18,0.3 -0.35,0.3h-2.8c-0.17,0 -0.32,-0.13 -0.35,-0.29l-0.26,-1.85c-0.43,-0.18 -0.82,-0.41 -1.18,-0.69l-1.74,0.7c-0.16,0.06 -0.34,0 -0.43,-0.15l-1.4,-2.42c-0.09,-0.15 -0.05,-0.34 0.08,-0.45l1.48,-1.16c-0.03,-0.23 -0.05,-0.46 -0.05,-0.69 0,-0.23 0.02,-0.46 0.05,-0.68l-1.48,-1.16c-0.13,-0.11 -0.17,-0.3 -0.08,-0.45l1.4,-2.42c0.09,-0.15 0.27,-0.21 0.43,-0.15l1.74,0.7c0.36,-0.28 0.76,-0.51 1.18,-0.69l0.26,-1.85c0.03,-0.17 0.18,-0.3 0.35,-0.3h2.8c0.17,0 0.32,0.13 0.35,0.29l0.26,1.85c0.43,0.18 0.82,0.41 1.18,0.69l1.74,-0.7c0.16,-0.06 0.34,0 0.43,0.15l1.4,2.42c0.09,0.15 0.05,0.34 -0.08,0.45l-1.48,1.16c0.03,0.23 0.05,0.46 0.05,0.69z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:autoMirrored="true"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M18.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM5,9v6h4l5,5V4L9,9H5z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M18.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM5,9v6h4l5,5V4L9,9H5z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:autoMirrored="true"
|
|
||||||
android:tint="#FFFFFF"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
<path android:fillColor="?android:textColor" android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"/>
|
||||||
android:fillColor="?android:textColor"
|
|
||||||
android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z" />
|
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
android:shape="ring"
|
android:shape="ring"
|
||||||
android:thickness="5dp"
|
android:thickness="5dp"
|
||||||
android:useLevel="false">
|
android:useLevel="false">
|
||||||
<solid android:color="#777" />
|
<solid android:color="#777"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
|
@ -6,7 +6,7 @@
|
||||||
android:shape="ring"
|
android:shape="ring"
|
||||||
android:thickness="5dp"
|
android:thickness="5dp"
|
||||||
android:useLevel="false">
|
android:useLevel="false">
|
||||||
<solid android:color="#ddd" />
|
<solid android:color="#ddd"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
|
@ -1,7 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item android:drawable="@drawable/tutorial_selected_dot" android:state_selected="true" />
|
<item android:drawable="@drawable/tutorial_selected_dot"
|
||||||
|
android:state_selected="true"/>
|
||||||
|
|
||||||
<item android:drawable="@drawable/tutorial_default_dot" />
|
<item android:drawable="@drawable/tutorial_default_dot"/>
|
||||||
</selector>
|
</selector>
|
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/home_container"
|
android:id="@+id/home_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
@ -13,9 +14,9 @@
|
||||||
android:id="@+id/list_appbar"
|
android:id="@+id/list_appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
|
||||||
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
|
||||||
|
android:background="@null"
|
||||||
app:elevation="0dp"
|
app:elevation="0dp"
|
||||||
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/list_apps_container"
|
android:id="@+id/list_apps_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/list_apps_row_container"
|
android:id="@+id/list_apps_row_container"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/list_other_container"
|
android:id="@+id/list_other_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/list_other_row_container"
|
android:id="@+id/list_other_row_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
@ -10,9 +11,9 @@
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/settings_appbar"
|
android:id="@+id/settings_appbar"
|
||||||
|
android:background="@null"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
|
||||||
app:elevation="0dp">
|
app:elevation="0dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
@ -53,7 +54,6 @@
|
||||||
android:id="@+id/settings_system"
|
android:id="@+id/settings_system"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:includeFontPadding="true"
|
android:includeFontPadding="true"
|
||||||
|
@ -63,7 +63,8 @@
|
||||||
custom:layout_constraintBottom_toBottomOf="parent"
|
custom:layout_constraintBottom_toBottomOf="parent"
|
||||||
custom:layout_constraintStart_toStartOf="parent"
|
custom:layout_constraintStart_toStartOf="parent"
|
||||||
custom:layout_constraintTop_toTopOf="parent"
|
custom:layout_constraintTop_toTopOf="parent"
|
||||||
custom:type="solid" />
|
custom:type="solid"
|
||||||
|
android:layout_marginStart="8dp" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
app:layout_constraintBottom_toTopOf="@+id/settings_actions_buttons"
|
app:layout_constraintBottom_toTopOf="@+id/settings_actions_buttons"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/settings_actions_buttons"
|
android:id="@+id/settings_actions_buttons"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/settings_actions_row_container"
|
android:id="@+id/settings_actions_row_container"
|
||||||
|
@ -29,7 +30,8 @@
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/settings_actions_row_icon_img"
|
android:id="@+id/settings_actions_row_icon_img"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/settings_meta_container"
|
android:id="@+id/settings_meta_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/tutorial_container"
|
android:id="@+id/tutorial_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -24,11 +26,11 @@
|
||||||
android:id="@+id/tutorial_tabs"
|
android:id="@+id/tutorial_tabs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:tabBackground="@drawable/tutorial_tab_selector"
|
app:tabBackground="@drawable/tutorial_tab_selector"
|
||||||
app:tabGravity="center"
|
app:tabGravity="center"
|
||||||
app:tabIndicatorHeight="0dp" />
|
app:tabIndicatorHeight="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,12 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/tutorial_concept_container"
|
android:id="@+id/tutorial_concept_container"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:paddingLeft="32sp"
|
android:paddingLeft="32sp"
|
||||||
android:paddingRight="32sp"
|
android:paddingRight="32sp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
tools:context=".tutorial.tabs.TutorialFragmentConcept">
|
tools:context=".tutorial.tabs.TutorialFragmentConcept">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -53,8 +54,8 @@
|
||||||
android:layout_marginLeft="32dp"
|
android:layout_marginLeft="32dp"
|
||||||
android:layout_marginEnd="32dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginRight="32dp"
|
android:layout_marginRight="32dp"
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="32sp"
|
android:textSize="32sp"
|
||||||
|
android:gravity="center"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tutorial_concept_text_2"
|
app:layout_constraintBottom_toTopOf="@+id/tutorial_concept_text_2"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/tutorial_finish_container"
|
android:id="@+id/tutorial_finish_container"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:paddingLeft="32sp"
|
android:paddingLeft="32sp"
|
||||||
android:paddingRight="32sp"
|
android:paddingRight="32sp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
tools:context=".tutorial.tabs.TutorialFragmentFinish">
|
tools:context=".tutorial.tabs.TutorialFragmentFinish">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/tutorial_setup_container"
|
android:id="@+id/tutorial_setup_container"
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/tutorial_start_container"
|
android:id="@+id/tutorial_start_container"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:paddingLeft="32sp"
|
android:paddingLeft="32sp"
|
||||||
android:paddingRight="32sp"
|
android:paddingRight="32sp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
tools:context=".tutorial.tabs.TutorialFragmentStart">
|
tools:context=".tutorial.tabs.TutorialFragmentStart">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item
|
<item android:id="@+id/app_menu_delete"
|
||||||
android:id="@+id/app_menu_delete"
|
|
||||||
android:title="@string/list_app_delete" />
|
android:title="@string/list_app_delete" />
|
||||||
<item
|
<item android:id="@+id/app_menu_info"
|
||||||
android:id="@+id/app_menu_info"
|
|
||||||
android:title="@string/list_app_info" />
|
android:title="@string/list_app_info" />
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
|
@ -80,7 +80,7 @@
|
||||||
<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_launcher_full_screen">Vollbild</string>
|
<string name="settings_display_full_screen">Vollbild</string>
|
||||||
|
|
||||||
<string name="settings_launcher_section_functionality">Funktionen</string>
|
<string name="settings_launcher_section_functionality">Funktionen</string>
|
||||||
|
|
||||||
|
@ -110,7 +110,6 @@
|
||||||
<string name="settings_meta_discord">Unserem Discord beitreten</string>
|
<string name="settings_meta_discord">Unserem Discord beitreten</string>
|
||||||
|
|
||||||
<string name="settings_meta_contact">Entwickler kontaktieren</string>
|
<string name="settings_meta_contact">Entwickler kontaktieren</string>
|
||||||
<string name="settings_meta_contact_url">https://www.finnmglas.com/de/kontakt/</string>
|
|
||||||
<string name="settings_meta_fork_contact">Entwickler des Fork kontaktieren</string>
|
<string name="settings_meta_fork_contact">Entwickler des Fork kontaktieren</string>
|
||||||
|
|
||||||
<string name="settings_meta_privacy">Datenschutzerklärung</string>
|
<string name="settings_meta_privacy">Datenschutzerklärung</string>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- translation: things i'm not sure about:
|
<!-- translation: things i'm not sure about:
|
||||||
- translating the date formats
|
- translating the date formats
|
||||||
- adequate length
|
- adequate length
|
||||||
- Meta?
|
- Meta?
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
<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_launcher_full_screen">Pantalla completa</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>
|
||||||
|
|
||||||
|
@ -103,7 +103,6 @@
|
||||||
<string name="settings_meta_report_bug">Reportar un error</string>
|
<string name="settings_meta_report_bug">Reportar un error</string>
|
||||||
|
|
||||||
<string name="settings_meta_contact">Contactar al desarrollador</string>
|
<string name="settings_meta_contact">Contactar al desarrollador</string>
|
||||||
<string name="settings_meta_contact_url">https://www.finnmglas.com/contact/</string>
|
|
||||||
<string name="settings_meta_fork_contact">Contact the developer of the fork (desgraciadamente no habla español)</string>
|
<string name="settings_meta_fork_contact">Contact the developer of the fork (desgraciadamente no habla español)</string>
|
||||||
|
|
||||||
<string name="settings_meta_privacy">Política de privacidad</string>
|
<string name="settings_meta_privacy">Política de privacidad</string>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<string name="settings_launcher_change_wallpaper">Changer le 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_launcher_full_screen">Utiliser le plein écran</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>
|
||||||
|
@ -76,7 +76,6 @@
|
||||||
<string name="settings_meta_report_bug">Signaler une erreur</string>
|
<string name="settings_meta_report_bug">Signaler une erreur</string>
|
||||||
<string name="settings_meta_discord">Rejoins-nous sur Discord !</string>
|
<string name="settings_meta_discord">Rejoins-nous sur Discord !</string>
|
||||||
<string name="settings_meta_contact">Contacter le développeur</string>
|
<string name="settings_meta_contact">Contacter le développeur</string>
|
||||||
<string name="settings_meta_contact_url">https://www.finnmglas.com/fr/contact/</string>
|
|
||||||
<string name="settings_meta_fork_contact">Contact the developer of the fork (malheureusement, il ne parle pas français)</string>
|
<string name="settings_meta_fork_contact">Contact the developer of the fork (malheureusement, il ne parle pas français)</string>
|
||||||
<string name="settings_meta_privacy">Déclaration de confidentialité</string>
|
<string name="settings_meta_privacy">Déclaration de confidentialité</string>
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<string name="settings_theme_wallpaper">选择一个壁纸</string>
|
<string name="settings_theme_wallpaper">选择一个壁纸</string>
|
||||||
<string name="settings_launcher_change_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_launcher_full_screen">使用全屏</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>
|
||||||
|
@ -59,7 +59,6 @@
|
||||||
<string name="settings_meta_fork_contact">联系该 fork 版本的作者</string>
|
<string name="settings_meta_fork_contact">联系该 fork 版本的作者</string>
|
||||||
<string name="settings_meta_privacy">隐私政策</string>
|
<string name="settings_meta_privacy">隐私政策</string>
|
||||||
<string name="settings_meta_contact">联系原作者</string>
|
<string name="settings_meta_contact">联系原作者</string>
|
||||||
<string name="settings_meta_contact_url">https://www.finnmglas.com/contact/</string>
|
|
||||||
<string name="settings_meta_discord">加入 Discord!</string>
|
<string name="settings_meta_discord">加入 Discord!</string>
|
||||||
<string name="list_title_view">全部应用</string>
|
<string name="list_title_view">全部应用</string>
|
||||||
<string name="list_title_pick">选择应用</string>
|
<string name="list_title_pick">选择应用</string>
|
||||||
|
|
|
@ -1,111 +1,112 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name" translatable="false">μLauncher</string>
|
<string name="app_name" translatable="false">μLauncher</string>
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- Settings
|
- Settings
|
||||||
-
|
-
|
||||||
-->
|
-->
|
||||||
<string name="preference_file_key" translatable="false">V3RYR4ND0MK3YCR4P</string>
|
<string name="settings_internal_started_key" translatable="false">internal.started_before</string>
|
||||||
<string name="settings_internal_started_key" translatable="false">startedBefore</string>
|
<string name="settings_internal_started_time_key" translatable="false">internal.first_startup</string>
|
||||||
<string name="settings_internal_started_time_key" translatable="false">firstStartup</string>
|
<string name="settings_internal_version_code_key" translatable="false">internal.version_code</string>
|
||||||
<string name="settings_internal_version_code_key" translatable="false">version_code</string>
|
<string name="settings_general_choose_home_screen_key">general.select_launcher</string>
|
||||||
<string name="settings_general_choose_home_screen_key">settings.general.select_launcher</string>
|
<!--
|
||||||
<!--
|
-
|
||||||
-
|
- Settings : Gestures
|
||||||
- Settings : Gestures
|
-
|
||||||
-
|
-->
|
||||||
-->
|
<string name="settings_gesture_up_key" translatable="false">Swipe Up</string>
|
||||||
<string name="settings_gesture_up_key" translatable="false">Swipe Up</string>
|
<string name="settings_gesture_double_up_key" translatable="false">Double Up</string>
|
||||||
<string name="settings_gesture_double_up_key" translatable="false">Double Up</string>
|
<string name="settings_gesture_down_key" translatable="false">Swipe Down</string>
|
||||||
<string name="settings_gesture_down_key" translatable="false">Swipe Down</string>
|
<string name="settings_gesture_double_down_key" translatable="false">Double Down</string>
|
||||||
<string name="settings_gesture_double_down_key" translatable="false">Double Down</string>
|
<string name="settings_gesture_left_key" translatable="false">Swipe Left</string>
|
||||||
<string name="settings_gesture_left_key" translatable="false">Swipe Left</string>
|
<string name="settings_gesture_double_left_key" translatable="false">Double Left</string>
|
||||||
<string name="settings_gesture_double_left_key" translatable="false">Double Left</string>
|
<string name="settings_gesture_right_key" translatable="false">Swipe Right</string>
|
||||||
<string name="settings_gesture_right_key" translatable="false">Swipe Right</string>
|
<string name="settings_gesture_double_right_key" translatable="false">Double Right</string>
|
||||||
<string name="settings_gesture_double_right_key" translatable="false">Double Right</string>
|
<string name="settings_gesture_right_top_edge_key" translatable="false">Swipe Right (Top)</string>
|
||||||
<string name="settings_gesture_right_top_edge_key" translatable="false">Swipe Right (Top)</string>
|
<string name="settings_gesture_right_bottom_edge_key" translatable="false">Swipe Right (Bottom)</string>
|
||||||
<string name="settings_gesture_right_bottom_edge_key" translatable="false">Swipe Right (Bottom)</string>
|
<string name="settings_gesture_left_bottom_edge_key" translatable="false">Swipe Left (Bottom)</string>
|
||||||
<string name="settings_gesture_left_bottom_edge_key" translatable="false">Swipe Left (Bottom)</string>
|
<string name="settings_gesture_left_top_edge_key" translatable="false">Swipe Left (Top)</string>
|
||||||
<string name="settings_gesture_left_top_edge_key" translatable="false">Swipe Left (Top)</string>
|
<string name="settings_gesture_up_left_edge_key" translatable="false">Swipe Up (Left Edge)</string>
|
||||||
<string name="settings_gesture_up_left_edge_key" translatable="false">Swipe Up (Left Edge)</string>
|
<string name="settings_gesture_up_right_edge_key" translatable="false">Swipe Up (Right Edge)</string>
|
||||||
<string name="settings_gesture_up_right_edge_key" translatable="false">Swipe Up (Right Edge)</string>
|
<string name="settings_gesture_down_left_edge_key" translatable="false">Swipe Down (Left Edge)</string>
|
||||||
<string name="settings_gesture_down_left_edge_key" translatable="false">Swipe Down (Left Edge)</string>
|
<string name="settings_gesture_down_right_edge_key" translatable="false">Swipe Down (Right Edge)</string>
|
||||||
<string name="settings_gesture_down_right_edge_key" translatable="false">Swipe Down (Right Edge)</string>
|
<string name="settings_gesture_vol_up_key" translatable="false">Volume Up</string>
|
||||||
<string name="settings_gesture_vol_up_key" translatable="false">Volume Up</string>
|
<string name="settings_gesture_vol_down_key" translatable="false">Volume Down</string>
|
||||||
<string name="settings_gesture_vol_down_key" translatable="false">Volume Down</string>
|
<string name="settings_gesture_double_click_key" translatable="false">Double Click</string>
|
||||||
<string name="settings_gesture_double_click_key" translatable="false">Double Click</string>
|
<string name="settings_gesture_long_click_key" translatable="false">Long Click</string>
|
||||||
<string name="settings_gesture_long_click_key" translatable="false">Long Click</string>
|
<string name="settings_gesture_date_key" translatable="false">Click on Date</string>
|
||||||
<string name="settings_gesture_date_key" translatable="false">Click on Date</string>
|
<string name="settings_gesture_time_key" translatable="false">Click on Time</string>
|
||||||
<string name="settings_gesture_time_key" translatable="false">Click on Time</string>
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- Settings : Theme
|
- Settings : Theme
|
||||||
-
|
-
|
||||||
-->
|
-->
|
||||||
<string name="settings_theme_color_theme_key" translatable="false">theme.color_theme</string>
|
<string name="settings_theme_color_theme_key" translatable="false">theme.color_theme</string>
|
||||||
<string-array name="settings_theme_color_theme_values" translatable="false">
|
<string-array name="settings_theme_color_theme_values" translatable="false">
|
||||||
<item>DEFAULT</item>
|
<item>DEFAULT</item>
|
||||||
<item>DARK</item>
|
<item>DARK</item>
|
||||||
<!--<item>light</item>-->
|
<!--<item>light</item>-->
|
||||||
</string-array>
|
</string-array>
|
||||||
<string name="settings_theme_background_key" translatable="false">theme.background</string>
|
<string name="settings_theme_background_key" translatable="false">theme.background</string>
|
||||||
<string-array name="settings_theme_background_values" translatable="false">
|
<string-array name="settings_theme_background_values" translatable="false">
|
||||||
<item>TRANSPARENT</item>
|
<item>TRANSPARENT</item>
|
||||||
<item>DIM</item>
|
<item>DIM</item>
|
||||||
<item>BLUR</item>
|
<item>BLUR</item>
|
||||||
<item>SOLID</item>
|
<item>SOLID</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string name="settings_theme_wallpaper_key" translatable="false">theme.wallpaper</string>
|
<string name="settings_theme_wallpaper_key" translatable="false">theme.wallpaper</string>
|
||||||
<string name="settings_theme_font_key" translatable="false">theme.font</string>
|
<string name="settings_theme_font_key" translatable="false">theme.font</string>
|
||||||
<string-array name="settings_theme_font_values" translatable="false">
|
<string-array name="settings_theme_font_values" translatable="false">
|
||||||
<item>HACK</item>
|
<item>HACK</item>
|
||||||
<item>SYSTEM_DEFAULT</item>
|
<item>SYSTEM_DEFAULT</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string name="settings_theme_monochrome_icons_key" translatable="false">theme.monochrome_icons</string>
|
<string name="settings_theme_monochrome_icons_key" translatable="false">theme.monochrome_icons</string>
|
||||||
<!--
|
|
||||||
-
|
<!--
|
||||||
- Settings : Clock
|
-
|
||||||
-
|
- Settings : Clock
|
||||||
-->
|
-
|
||||||
<string name="settings_clock_time_visible_key" translatable="false">timeVisible</string>
|
-->
|
||||||
<string name="settings_clock_date_visible_key" translatable="false">dateVisible</string>
|
<string name="settings_clock_time_visible_key" translatable="false">clock.time_visible</string>
|
||||||
<string name="settings_clock_localized_key" translatable="false">dateLocalized</string>
|
<string name="settings_clock_date_visible_key" translatable="false">clock.date_visible</string>
|
||||||
<string name="settings_clock_flip_date_time_key" translatable="false">dateTimeFlip</string>
|
<string name="settings_clock_localized_key" translatable="false">clock.date_localized</string>
|
||||||
|
<string name="settings_clock_flip_date_time_key" translatable="false">clock.date_time_flip</string>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- Settings : Functionality
|
- Settings : Functionality
|
||||||
-
|
-
|
||||||
-->
|
-->
|
||||||
<string name="settings_display_screen_timeout_disabled_key" translatable="false">disableTimeout</string>
|
<string name="settings_display_screen_timeout_disabled_key" translatable="false">display.disable_timeout</string>
|
||||||
<string name="settings_display_full_screen_key" translatable="false">useFullScreen</string>
|
<string name="settings_display_full_screen_key" translatable="false">display.use_full_screen</string>
|
||||||
|
|
||||||
<string name="settings_enabled_gestures_double_swipe_key" translatable="false">enableDoubleActions</string>
|
<string name="settings_enabled_gestures_double_swipe_key" translatable="false">enabled_gestures.double_actions</string>
|
||||||
<string name="settings_enabled_gestures_edge_swipe_key" translatable="false">enableEdgeActions</string>
|
<string name="settings_enabled_gestures_edge_swipe_key" translatable="false">enabled_gestures.edge_actions</string>
|
||||||
<string name="settings_functionality_search_auto_launch_key" translatable="false">searchAutoLaunch</string>
|
<string name="settings_functionality_search_auto_launch_key" translatable="false">functionality.search_auto_launch</string>
|
||||||
<string name="settings_functionality_search_auto_open_keyboard_key" translatable="false">searchAutoKeyboard</string>
|
<string name="settings_functionality_search_auto_open_keyboard_key" translatable="false">functionality.search_auto_keyboard</string>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
-
|
<!--
|
||||||
- URLs
|
-
|
||||||
-
|
- URLs
|
||||||
-->
|
-
|
||||||
<string name="settings_meta_link_github" translatable="false">https://github.com/jrpie/Launcher</string>
|
-->
|
||||||
<string name="settings_meta_report_bug_link" translatable="false">https://github.com/jrpie/Launcher/issues/new</string>
|
<string name="settings_meta_link_github" translatable="false">https://github.com/jrpie/Launcher</string>
|
||||||
<string name="settings_meta_fork_contact_url" translatable="false">https://s.jrpie.de/contact</string>
|
<string name="settings_meta_report_bug_link" translatable="false">https://github.com/jrpie/Launcher/issues/new</string>
|
||||||
<string name="settings_meta_privacy_url" translatable="false">https://s.jrpie.de/android-legal</string>
|
<string name="settings_meta_fork_contact_url" translatable="false">https://s.jrpie.de/contact</string>
|
||||||
<string name="settings_meta_contact_url">https://www.finnmglas.com/contact/</string>
|
<string name="settings_meta_privacy_url" translatable="false">https://s.jrpie.de/android-legal</string>
|
||||||
<string name="settings_meta_discord_url" translatable="false">https://discord.com/invite/jV2AhF8</string>
|
<string name="settings_meta_contact_url">https://www.finnmglas.com/contact/</string>
|
||||||
|
<string name="settings_meta_discord_url" translatable="false">https://discord.com/invite/jV2AhF8</string>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- Tutorial
|
- Tutorial
|
||||||
-
|
-
|
||||||
-->
|
-->
|
||||||
<string name="swipe" translatable="false"><![CDATA[>>>>>>]]></string>
|
<string name="swipe" translatable="false"><![CDATA[>>>>>>]]></string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<resources>
|
<resources>
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- Home
|
- Home
|
||||||
-
|
-
|
||||||
-->
|
-->
|
||||||
<string name="alert_cant_open_title">Can\'t open app</string>
|
<string name="alert_cant_open_title">Can\'t open app</string>
|
||||||
<string name="alert_cant_open_message">Want to change its settings?</string>
|
<string name="alert_cant_open_message">Want to change its settings?</string>
|
||||||
|
|
||||||
|
@ -185,6 +185,7 @@
|
||||||
<string name="tutorial_finish_button">Start</string>
|
<string name="tutorial_finish_button">Start</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="settings">Settings</string>
|
<string name="settings">Settings</string>
|
||||||
<string name="ic_menu_alt">More options</string>
|
<string name="ic_menu_alt">More options</string>
|
||||||
<string name="alert_cant_expand_notifications_panel">Error: Can\'t expand status bar.\nThis action is using functionality that is not part of the published Android API. Unfortunately, it does not seem to work on your device.</string>
|
<string name="alert_cant_expand_notifications_panel">Error: Can\'t expand status bar.\nThis action is using functionality that is not part of the published Android API. Unfortunately, it does not seem to work on your device.</string>
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
<item name="android:colorBackground">@color/darkTheme_background_color</item>
|
<item name="android:colorBackground">@color/darkTheme_background_color</item>
|
||||||
<item name="android:textColor">@color/darkTheme_text_color</item>
|
<item name="android:textColor">@color/darkTheme_text_color</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="colorThemeDefault">
|
<style name="colorThemeDefault">
|
||||||
<item name="colorPrimary">@color/finnmglasTheme_background_color</item>
|
<item name="colorPrimary">@color/finnmglasTheme_background_color</item>
|
||||||
<item name="colorPrimaryDark">@color/finnmglasTheme_background_color</item>
|
<item name="colorPrimaryDark">@color/finnmglasTheme_background_color</item>
|
||||||
|
@ -62,13 +61,14 @@
|
||||||
<style name="fontSystemDefault">
|
<style name="fontSystemDefault">
|
||||||
<!--<item name="android:textSize">18sp</item>-->
|
<!--<item name="android:textSize">18sp</item>-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="fontHack">
|
<style name="fontHack">
|
||||||
<item name="android:fontFamily">@font/hack</item>
|
<item name="android:fontFamily">@font/hack</item>
|
||||||
<!--<item name="android:textSize">18sp</item>-->
|
<!--<item name="android:textSize">18sp</item>-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style name="PopupMenuCustom" parent="@android:style/Widget.PopupMenu">
|
<style name="PopupMenuCustom" parent="@android:style/Widget.PopupMenu">
|
||||||
<item name="android:popupBackground">#252827</item>
|
<item name="android:popupBackground">#252827</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,65 +1,66 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<PreferenceCategory app:allowDividerAbove="false"> <!-- general -->
|
<PreferenceCategory
|
||||||
|
app:allowDividerAbove="false" > <!-- general -->
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/settings_general_choose_home_screen_key"
|
android:key="@string/settings_general_choose_home_screen_key"
|
||||||
android:title="@string/settings_general_choose_home_screen" />
|
android:title="@string/settings_general_choose_home_screen"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/settings_launcher_section_appearance"
|
app:allowDividerAbove="false"
|
||||||
app:allowDividerAbove="false">
|
android:title="@string/settings_launcher_section_appearance">
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/settings_theme_wallpaper_key"
|
android:key="@string/settings_theme_wallpaper_key"
|
||||||
android:title="@string/settings_theme_wallpaper" />
|
android:title="@string/settings_theme_wallpaper"/>
|
||||||
<DropDownPreference
|
<DropDownPreference
|
||||||
android:defaultValue="DEFAULT"
|
|
||||||
android:entries="@array/settings_theme_color_theme_items"
|
android:entries="@array/settings_theme_color_theme_items"
|
||||||
android:entryValues="@array/settings_theme_color_theme_values"
|
android:entryValues="@array/settings_theme_color_theme_values"
|
||||||
android:key="@string/settings_theme_color_theme_key"
|
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/settings_theme_color_theme" />
|
android:defaultValue="DEFAULT"
|
||||||
|
android:key="@string/settings_theme_color_theme_key"
|
||||||
|
android:title="@string/settings_theme_color_theme"/>
|
||||||
|
|
||||||
<DropDownPreference
|
<DropDownPreference
|
||||||
android:defaultValue="HACK"
|
|
||||||
android:entries="@array/settings_theme_font_items"
|
|
||||||
android:entryValues="@array/settings_theme_font_values"
|
|
||||||
android:key="@string/settings_theme_font_key"
|
android:key="@string/settings_theme_font_key"
|
||||||
|
android:title="@string/settings_theme_font"
|
||||||
|
android:entryValues="@array/settings_theme_font_values"
|
||||||
|
android:entries="@array/settings_theme_font_items"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/settings_theme_font" />
|
android:defaultValue="HACK"/>
|
||||||
<DropDownPreference
|
<DropDownPreference
|
||||||
android:defaultValue="BLUR"
|
android:key="@string/settings_theme_background_key"
|
||||||
|
android:title="@string/settings_theme_background"
|
||||||
|
android:summary="%s"
|
||||||
android:entries="@array/settings_theme_background_items"
|
android:entries="@array/settings_theme_background_items"
|
||||||
android:entryValues="@array/settings_theme_background_values"
|
android:entryValues="@array/settings_theme_background_values"
|
||||||
android:key="@string/settings_theme_background_key"
|
android:defaultValue="BLUR"/>
|
||||||
android:summary="%s"
|
|
||||||
android:title="@string/settings_theme_background" />
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
|
||||||
android:key="@string/settings_theme_monochrome_icons_key"
|
android:key="@string/settings_theme_monochrome_icons_key"
|
||||||
android:title="@string/settings_theme_monochrome_icons" />
|
android:title="@string/settings_theme_monochrome_icons"
|
||||||
|
android:defaultValue="false" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/settings_launcher_section_date_time"
|
android:title="@string/settings_launcher_section_date_time"
|
||||||
app:allowDividerAbove="false">
|
app:allowDividerAbove="false">
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
|
||||||
android:key="@string/settings_clock_localized_key"
|
android:key="@string/settings_clock_localized_key"
|
||||||
|
android:defaultValue="false"
|
||||||
android:title="@string/settings_clock_localized" />
|
android:title="@string/settings_clock_localized" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
|
||||||
android:key="@string/settings_clock_time_visible_key"
|
android:key="@string/settings_clock_time_visible_key"
|
||||||
|
android:defaultValue="true"
|
||||||
android:title="@string/settings_clock_time_visible" />
|
android:title="@string/settings_clock_time_visible" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
|
||||||
android:key="@string/settings_clock_date_visible_key"
|
android:key="@string/settings_clock_date_visible_key"
|
||||||
|
android:defaultValue="true"
|
||||||
android:title="@string/settings_clock_date_visible" />
|
android:title="@string/settings_clock_date_visible" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
|
||||||
android:key="@string/settings_clock_flip_date_time_key"
|
android:key="@string/settings_clock_flip_date_time_key"
|
||||||
|
android:defaultValue="false"
|
||||||
android:title="@string/settings_clock_flip_date_time" />
|
android:title="@string/settings_clock_flip_date_time" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
@ -68,21 +69,21 @@
|
||||||
app:allowDividerAbove="false">
|
app:allowDividerAbove="false">
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
|
||||||
android:key="@string/settings_functionality_search_auto_launch_key"
|
android:key="@string/settings_functionality_search_auto_launch_key"
|
||||||
|
android:defaultValue="true"
|
||||||
android:title="@string/settings_functionality_auto_launch" />
|
android:title="@string/settings_functionality_auto_launch" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
|
||||||
android:key="@string/settings_functionality_search_auto_open_keyboard_key"
|
android:key="@string/settings_functionality_search_auto_open_keyboard_key"
|
||||||
|
android:defaultValue="true"
|
||||||
android:title="@string/settings_functionality_auto_keyboard" />
|
android:title="@string/settings_functionality_auto_keyboard" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
|
||||||
android:key="@string/settings_enabled_gestures_double_swipe_key"
|
android:key="@string/settings_enabled_gestures_double_swipe_key"
|
||||||
android:title="@string/settings_enabled_gestures_double_swipe" />
|
|
||||||
<SwitchPreference
|
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:title="@string/settings_enabled_gestures_double_swipe"/>
|
||||||
|
<SwitchPreference
|
||||||
android:key="@string/settings_enabled_gestures_edge_swipe_key"
|
android:key="@string/settings_enabled_gestures_edge_swipe_key"
|
||||||
android:title="@string/settings_enabled_gestures_edge_swipe" />
|
android:defaultValue="true"
|
||||||
|
android:title="@string/settings_enabled_gestures_edge_swipe"/>
|
||||||
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
@ -91,10 +92,10 @@
|
||||||
app:allowDividerAbove="false">
|
app:allowDividerAbove="false">
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_display_full_screen_key"
|
android:key="@string/settings_display_full_screen_key"
|
||||||
android:title="@string/settings_display_full_screen" />
|
android:title="@string/settings_display_full_screen"/>
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_display_screen_timeout_disabled_key"
|
android:key="@string/settings_display_screen_timeout_disabled_key"
|
||||||
android:title="@string/settings_display_screen_timeout_disabled" />
|
android:title="@string/settings_display_screen_timeout_disabled"/>
|
||||||
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
Loading…
Add table
Reference in a new issue