mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 14:31:30 +01:00
reformat code
This commit is contained in:
parent
99acdba262
commit
5dc2ee3901
68 changed files with 842 additions and 543 deletions
|
@ -23,8 +23,8 @@ android {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 35
|
targetSdkVersion 35
|
||||||
compileSdk 35
|
compileSdk 35
|
||||||
versionCode 22
|
versionCode 23
|
||||||
versionName "j-0.0.9"
|
versionName "j-0.0.10-beta1"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,6 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
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 android:name="android.permission.QUERY_ALL_PACKAGES"
|
<uses-permission
|
||||||
|
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" />
|
||||||
|
@ -20,14 +21,15 @@
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".HomeActivity"
|
android:name=".HomeActivity"
|
||||||
android:exported="true"
|
|
||||||
android:excludeFromRecents="true"
|
|
||||||
android:clearTaskOnLaunch="true"
|
android:clearTaskOnLaunch="true"
|
||||||
|
android:excludeFromRecents="true"
|
||||||
|
android:exported="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" />
|
||||||
|
@ -36,14 +38,12 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".tutorial.TutorialActivity"
|
android:name=".tutorial.TutorialActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
tools:ignore="LockedOrientationActivity">
|
tools:ignore="LockedOrientationActivity"></activity>
|
||||||
</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">
|
tools:ignore="LockedOrientationActivity"></activity>
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".settings.SettingsActivity"
|
android:name=".settings.SettingsActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|
|
@ -10,12 +10,8 @@ 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
|
||||||
|
@ -30,16 +26,11 @@ 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
|
||||||
|
@ -87,10 +78,14 @@ 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(roleManager.createRequestRoleIntent(RoleManager.ROLE_HOME), REQUEST_SET_DEFAULT_HOME)
|
context.startActivityForResult(
|
||||||
|
roleManager.createRequestRoleIntent(RoleManager.ROLE_HOME),
|
||||||
|
REQUEST_SET_DEFAULT_HOME
|
||||||
|
)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -116,7 +111,8 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,8 +130,7 @@ 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)
|
||||||
}
|
}
|
||||||
|
@ -148,7 +143,8 @@ fun audioNextTrack(activity: Activity) {
|
||||||
|
|
||||||
val eventTime: Long = SystemClock.uptimeMillis()
|
val eventTime: Long = SystemClock.uptimeMillis()
|
||||||
|
|
||||||
val downEvent = KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_NEXT, 0)
|
val downEvent =
|
||||||
|
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)
|
||||||
|
@ -164,7 +160,8 @@ 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 = KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0)
|
val upEvent =
|
||||||
|
KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PREVIOUS, 0)
|
||||||
mAudioManager.dispatchMediaKeyEvent(upEvent)
|
mAudioManager.dispatchMediaKeyEvent(upEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +196,11 @@ 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(context, context.getString(R.string.alert_cant_expand_notifications_panel), Toast.LENGTH_LONG).show()
|
Toast.makeText(
|
||||||
|
context,
|
||||||
|
context.getString(R.string.alert_cant_expand_notifications_panel),
|
||||||
|
Toast.LENGTH_LONG
|
||||||
|
).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,22 +210,29 @@ 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 {
|
return getUserFromId(user, context)?.let { userHandle ->
|
||||||
userHandle -> launcherApps.getActivityList(packageName, userHandle).firstOrNull()
|
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 {
|
getUserFromId(user, activity)?.let { user ->
|
||||||
user -> intent.putExtra(Intent.EXTRA_USER, user)
|
intent.putExtra(Intent.EXTRA_USER, user)
|
||||||
}
|
}
|
||||||
|
|
||||||
intent.putExtra(Intent.EXTRA_RETURN_RESULT, true)
|
intent.putExtra(Intent.EXTRA_RETURN_RESULT, true)
|
||||||
activity.startActivityForResult(intent,
|
activity.startActivityForResult(
|
||||||
|
intent,
|
||||||
REQUEST_UNINSTALL
|
REQUEST_UNINSTALL
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -233,8 +241,8 @@ fun launchApp(packageName: String, user: Int?, context: Context, rect: Rect? = n
|
||||||
Log.i("Launcher", "Starting: " + packageName + " (user " + user.toString() + ")")
|
Log.i("Launcher", "Starting: " + packageName + " (user " + user.toString() + ")")
|
||||||
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
|
||||||
getLauncherActivityInfo(packageName,user,context)?.let {
|
getLauncherActivityInfo(packageName, user, context)?.let { app ->
|
||||||
app -> launcherApps.startMainActivity(app.componentName, app.user, rect, null)
|
launcherApps.startMainActivity(app.componentName, app.user, rect, null)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -252,7 +260,8 @@ 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(android.R.string.ok
|
.setPositiveButton(
|
||||||
|
android.R.string.ok
|
||||||
) { _, _ ->
|
) { _, _ ->
|
||||||
openAppSettings(
|
openAppSettings(
|
||||||
packageName,
|
packageName,
|
||||||
|
@ -283,10 +292,16 @@ fun openNewTabWindow(urls: String, context: Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun openAppSettings(packageName: String, user: Int?, context: Context, sourceBounds: Rect? = null, opts: Bundle? = null) {
|
fun openAppSettings(
|
||||||
|
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 {
|
getLauncherActivityInfo(packageName, user, context)?.let { app ->
|
||||||
app -> launcherApps.startAppDetailsActivity(app.componentName, app.user, sourceBounds, opts)
|
launcherApps.startAppDetailsActivity(app.componentName, app.user, sourceBounds, opts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,9 +322,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 {
|
getUserFromId(user, context)?.let { userHandle ->
|
||||||
userHandle -> launcherApps.getActivityList(packageName, userHandle).firstOrNull()?.let {
|
launcherApps.getActivityList(packageName, userHandle).firstOrNull()?.let { app ->
|
||||||
app -> return app.getBadgedIcon(0)
|
return app.getBadgedIcon(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -335,7 +350,8 @@ fun loadApps(packageManager: PackageManager, context: Context) {
|
||||||
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 = activityInfo.applicationInfo.flags.and(ApplicationInfo.FLAG_SYSTEM) != 0
|
app.isSystemApp =
|
||||||
|
activityInfo.applicationInfo.flags.and(ApplicationInfo.FLAG_SYSTEM) != 0
|
||||||
loadList.add(app)
|
loadList.add(app)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,32 +11,133 @@ 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 (val id: String, private val labelResource: Int,
|
enum class Gesture(
|
||||||
|
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_volumeUpApp", R.string.settings_gesture_vol_up, R.array.default_volume_up, 0,0),
|
) {
|
||||||
VOLUME_DOWN("action_volumeDownApp", R.string.settings_gesture_vol_down, R.array.default_volume_down,0,0),
|
VOLUME_UP(
|
||||||
|
"action_volumeUpApp",
|
||||||
|
R.string.settings_gesture_vol_up,
|
||||||
|
R.array.default_volume_up,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
),
|
||||||
|
VOLUME_DOWN(
|
||||||
|
"action_volumeDownApp",
|
||||||
|
R.string.settings_gesture_vol_down,
|
||||||
|
R.array.default_volume_down,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
),
|
||||||
TIME("action_timeApp", R.string.settings_gesture_time, R.array.default_time),
|
TIME("action_timeApp", R.string.settings_gesture_time, R.array.default_time),
|
||||||
DATE("action_dateApp", R.string.settings_gesture_date, R.array.default_date),
|
DATE("action_dateApp", R.string.settings_gesture_date, R.array.default_date),
|
||||||
LONG_CLICK("action_longClickApp", R.string.settings_gesture_long_click, R.array.default_long_click, 0,0),
|
LONG_CLICK(
|
||||||
DOUBLE_CLICK("action_doubleClickApp", R.string.settings_gesture_double_click, R.array.default_double_click,0,0),
|
"action_longClickApp",
|
||||||
|
R.string.settings_gesture_long_click,
|
||||||
|
R.array.default_long_click,
|
||||||
|
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("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_LEFT_EDGE(
|
||||||
SWIPE_UP_RIGHT_EDGE("action_up_rightApp", R.string.settings_gesture_up_right_edge, R.array.default_up_right, R.anim.bottom_up),
|
"action_up_leftApp",
|
||||||
SWIPE_UP_DOUBLE( "action_doubleUpApp", R.string.settings_gesture_double_up, R.array.default_double_up, R.anim.bottom_up),
|
R.string.settings_gesture_up_left_edge,
|
||||||
SWIPE_DOWN("action_downApp", R.string.settings_gesture_down, R.array.default_down, R.anim.top_down),
|
R.array.default_up_left,
|
||||||
SWIPE_DOWN_LEFT_EDGE("action_down_leftApp", R.string.settings_gesture_down_left_edge, R.array.default_down_left, R.anim.top_down),
|
R.anim.bottom_up
|
||||||
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_UP_RIGHT_EDGE(
|
||||||
SWIPE_LEFT("action_leftApp", R.string.settings_gesture_left, R.array.default_left, R.anim.right_left),
|
"action_up_rightApp",
|
||||||
SWIPE_LEFT_TOP_EDGE("action_left_topApp", R.string.settings_gesture_left_top_edge, R.array.default_left_top, R.anim.right_left),
|
R.string.settings_gesture_up_right_edge,
|
||||||
SWIPE_LEFT_BOTTOM_EDGE("action_left_bottomApp", R.string.settings_gesture_left_bottom_edge, R.array.default_left_bottom, R.anim.right_left),
|
R.array.default_up_right,
|
||||||
SWIPE_LEFT_DOUBLE("action_doubleLeftApp", R.string.settings_gesture_double_left, R.array.default_double_left, R.anim.right_left),
|
R.anim.bottom_up
|
||||||
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_UP_DOUBLE(
|
||||||
SWIPE_RIGHT_BOTTOM_EDGE("action_right_bottomApp", R.string.settings_gesture_right_bottom_edge, R.array.default_right_bottom, R.anim.left_right),
|
"action_doubleUpApp",
|
||||||
SWIPE_RIGHT_DOUBLE("action_doubleRightApp", R.string.settings_gesture_double_right, R.array.default_double_right, R.anim.left_right);
|
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
|
||||||
|
@ -96,18 +197,21 @@ enum class Gesture (val id: String, private val labelResource: Int,
|
||||||
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
|
||||||
|
@ -123,6 +227,7 @@ enum class Gesture (val id: String, private val labelResource: Int,
|
||||||
SWIPE_DOWN_DOUBLE,
|
SWIPE_DOWN_DOUBLE,
|
||||||
SWIPE_LEFT_DOUBLE,
|
SWIPE_LEFT_DOUBLE,
|
||||||
SWIPE_RIGHT_DOUBLE -> true
|
SWIPE_RIGHT_DOUBLE -> true
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,6 +242,7 @@ enum class Gesture (val id: String, private val labelResource: Int,
|
||||||
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,11 @@ class HomeActivity: UIObject, AppCompatActivity(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (mDetector.onTouchEvent(event)) { false } else { super.onTouchEvent(event) }
|
return if (mDetector.onTouchEvent(event)) {
|
||||||
|
false
|
||||||
|
} else {
|
||||||
|
super.onTouchEvent(event)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setOnClicks() {
|
override fun setOnClicks() {
|
||||||
|
@ -248,11 +252,22 @@ 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 { return false }
|
override fun onDoubleTapEvent(event: MotionEvent): Boolean {
|
||||||
override fun onDown(event: MotionEvent): Boolean { return false }
|
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 { return false }
|
override fun onSingleTapUp(event: MotionEvent): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
override fun isHomeScreen(): Boolean {
|
override fun isHomeScreen(): Boolean {
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -2,7 +2,6 @@ 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
|
||||||
|
@ -43,6 +42,7 @@ 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)
|
||||||
|
|
|
@ -44,6 +44,7 @@ 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)
|
||||||
|
|
||||||
|
@ -66,7 +67,8 @@ 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)
|
||||||
}
|
}
|
||||||
|
@ -146,8 +148,8 @@ 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) {
|
||||||
|
|
|
@ -34,10 +34,12 @@ 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(val activity: Activity,
|
class AppsRecyclerAdapter(
|
||||||
|
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>
|
||||||
|
@ -53,7 +55,9 @@ class AppsRecyclerAdapter(val activity: Activity,
|
||||||
selectItem(adapterPosition, rect)
|
selectItem(adapterPosition, rect)
|
||||||
}
|
}
|
||||||
|
|
||||||
init { itemView.setOnClickListener(this) }
|
init {
|
||||||
|
itemView.setOnClickListener(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
||||||
|
@ -72,8 +76,22 @@ class AppsRecyclerAdapter(val activity: Activity,
|
||||||
|
|
||||||
// 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{ showOptionsPopup(viewHolder, appPackageName, appUser, isSystemApp) }
|
viewHolder.textView.setOnLongClickListener {
|
||||||
viewHolder.img.setOnLongClickListener{ showOptionsPopup(viewHolder, appPackageName, appUser, isSystemApp) }
|
showOptionsPopup(
|
||||||
|
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) }
|
||||||
|
@ -81,7 +99,12 @@ class AppsRecyclerAdapter(val activity: Activity,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("SameReturnValue")
|
@Suppress("SameReturnValue")
|
||||||
private fun showOptionsPopup(viewHolder: ViewHolder, appPackageName: String, user: Int?, isSystemApp: Boolean): Boolean {
|
private fun showOptionsPopup(
|
||||||
|
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)
|
||||||
|
@ -97,10 +120,12 @@ class AppsRecyclerAdapter(val activity: Activity,
|
||||||
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,7 +134,9 @@ class AppsRecyclerAdapter(val activity: Activity,
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int { return appsListDisplayed.size }
|
override fun getItemCount(): Int {
|
||||||
|
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)
|
||||||
|
@ -140,6 +167,7 @@ class AppsRecyclerAdapter(val activity: Activity,
|
||||||
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)
|
||||||
|
@ -187,11 +215,13 @@ class AppsRecyclerAdapter(val activity: Activity,
|
||||||
}
|
}
|
||||||
|
|
||||||
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 = activity.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
val inputMethodManager =
|
||||||
|
activity.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
inputMethodManager.hideSoftInputFromWindow(View(activity).windowToken, 0)
|
inputMethodManager.hideSoftInputFromWindow(View(activity).windowToken, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,8 @@ 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,25 +10,50 @@ 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(val id: String, val label: Int, val icon: Int, val launch: (Activity) -> Unit) {
|
enum class LauncherAction(
|
||||||
SETTINGS("launcher:settings", R.string.list_other_settings, R.drawable.baseline_settings_24, ::openSettings),
|
val id: String,
|
||||||
CHOOSE("launcher:choose", R.string.list_other_list, R.drawable.baseline_menu_24, ::openAppsList),
|
val label: Int,
|
||||||
VOLUME_UP("launcher:volumeUp",
|
val icon: Int,
|
||||||
|
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,7 +6,6 @@ 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
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,7 +38,9 @@ class OtherRecyclerAdapter(val activity: Activity):
|
||||||
forGesture?.let { returnChoiceIntent(it, content.id) }
|
forGesture?.let { returnChoiceIntent(it, content.id) }
|
||||||
}
|
}
|
||||||
|
|
||||||
init { itemView.setOnClickListener(this) }
|
init {
|
||||||
|
itemView.setOnClickListener(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
||||||
|
@ -49,7 +51,9 @@ class OtherRecyclerAdapter(val activity: Activity):
|
||||||
viewHolder.iconView.setImageResource(icon)
|
viewHolder.iconView.setImageResource(icon)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int { return othersList.size }
|
override fun getItemCount(): Int {
|
||||||
|
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,10 +13,14 @@ fun migrateToNewVersion(activity: Activity) {
|
||||||
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
|
||||||
|
|
||||||
VERSION_CODE -> { /* the version installed and used previously are the same */ }
|
VERSION_CODE -> { /* the version installed and used previously are the same */
|
||||||
|
}
|
||||||
|
|
||||||
21, 22, 23 -> {
|
21, 22, 23 -> {
|
||||||
// TODO
|
// TODO
|
||||||
} else -> { /* The version used before was pre- v1.3.0,
|
}
|
||||||
|
|
||||||
|
else -> { /* The version used before was pre- v1.3.0,
|
||||||
as version tracking started then */
|
as version tracking started then */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -7,14 +7,17 @@ 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
|
||||||
|
@ -56,11 +59,13 @@ class SettingsActivity: AppCompatActivity(), UIObject {
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
super<AppCompatActivity>.onStart()
|
super<AppCompatActivity>.onStart()
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
LauncherPreferences.getSharedPreferences().registerOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
LauncherPreferences.getSharedPreferences()
|
||||||
|
.registerOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
LauncherPreferences.getSharedPreferences().unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
LauncherPreferences.getSharedPreferences()
|
||||||
|
.unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,8 +96,8 @@ 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) {
|
||||||
|
@ -107,5 +112,7 @@ 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 { return 3 }
|
override fun getCount(): Int {
|
||||||
|
return 3
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,11 @@ SettingsFragmentActions : Fragment(), UIObject {
|
||||||
intent.addCategory(Intent.CATEGORY_APP_MARKET)
|
intent.addCategory(Intent.CATEGORY_APP_MARKET)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} catch (e: ActivityNotFoundException) {
|
} catch (e: ActivityNotFoundException) {
|
||||||
Toast.makeText(context, getString(R.string.settings_apps_toast_store_not_found), Toast.LENGTH_SHORT).show()
|
Toast.makeText(
|
||||||
|
context,
|
||||||
|
getString(R.string.settings_apps_toast_store_not_found),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,28 @@
|
||||||
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.list.other.LauncherAction
|
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.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.preferences.LauncherPreferences
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import java.lang.Exception
|
import de.jrpie.android.launcher.transformGrayscale
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [SettingsFragmentActionsRecycler] is a fragment containing the [ActionsRecyclerAdapter],
|
* The [SettingsFragmentActionsRecycler] is a fragment containing the [ActionsRecyclerAdapter],
|
||||||
|
@ -57,13 +60,15 @@ class SettingsFragmentActionsRecycler : Fragment(), UIObject {
|
||||||
layoutManager = actionViewManager
|
layoutManager = actionViewManager
|
||||||
adapter = actionViewAdapter
|
adapter = actionViewAdapter
|
||||||
}
|
}
|
||||||
LauncherPreferences.getSharedPreferences().registerOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
LauncherPreferences.getSharedPreferences()
|
||||||
|
.registerOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
||||||
|
|
||||||
super<UIObject>.onStart()
|
super<UIObject>.onStart()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
LauncherPreferences.getSharedPreferences().unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
LauncherPreferences.getSharedPreferences()
|
||||||
|
.unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener)
|
||||||
|
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
@ -83,7 +88,9 @@ class ActionsRecyclerAdapter(val activity: Activity):
|
||||||
|
|
||||||
override fun onClick(v: View) {}
|
override fun onClick(v: View) {}
|
||||||
|
|
||||||
init { itemView.setOnClickListener(this) }
|
init {
|
||||||
|
itemView.setOnClickListener(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateViewHolder(gesture: Gesture, viewHolder: ViewHolder) {
|
private fun updateViewHolder(gesture: Gesture, viewHolder: ViewHolder) {
|
||||||
|
@ -96,8 +103,7 @@ class ActionsRecyclerAdapter(val activity: Activity):
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
@ -126,7 +132,9 @@ class ActionsRecyclerAdapter(val activity: Activity):
|
||||||
viewHolder.removeAction.setOnClickListener { gesture.removeApp(activity) }
|
viewHolder.removeAction.setOnClickListener { gesture.removeApp(activity) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int { return gesturesList.size }
|
override fun getItemCount(): Int {
|
||||||
|
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)
|
||||||
|
@ -139,7 +147,8 @@ 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())} as ArrayList<Gesture>
|
&& (edgeActions || !it.isEdgeVariant())
|
||||||
|
} as ArrayList<Gesture>
|
||||||
}
|
}
|
||||||
|
|
||||||
fun updateActions() {
|
fun updateActions() {
|
||||||
|
@ -148,7 +157,8 @@ 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()
|
||||||
}
|
}
|
||||||
|
@ -158,7 +168,8 @@ 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(intent,
|
activity.startActivityForResult(
|
||||||
|
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.preferences.LauncherPreferences
|
|
||||||
import de.jrpie.android.launcher.R
|
import de.jrpie.android.launcher.R
|
||||||
|
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||||
import de.jrpie.android.launcher.setDefaultHomeScreen
|
import de.jrpie.android.launcher.setDefaultHomeScreen
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,9 @@ class SettingsFragmentLauncher : PreferenceFragmentCompat() {
|
||||||
preferenceManager.sharedPreferencesMode = Context.MODE_PRIVATE
|
preferenceManager.sharedPreferencesMode = Context.MODE_PRIVATE
|
||||||
setPreferencesFromResource(R.xml.preferences, rootKey)
|
setPreferencesFromResource(R.xml.preferences, rootKey)
|
||||||
|
|
||||||
val selectWallpaper = findPreference<androidx.preference.Preference>(LauncherPreferences.theme().keys().wallpaper())
|
val selectWallpaper = findPreference<androidx.preference.Preference>(
|
||||||
|
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)
|
||||||
|
@ -30,7 +32,9 @@ class SettingsFragmentLauncher : PreferenceFragmentCompat() {
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
val chooseHomeScreen = findPreference<androidx.preference.Preference>(LauncherPreferences.general().keys().chooseHomeScreen())
|
val chooseHomeScreen = findPreference<androidx.preference.Preference>(
|
||||||
|
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.preferences.resetSettings
|
||||||
import de.jrpie.android.launcher.tutorial.TutorialActivity
|
import de.jrpie.android.launcher.tutorial.TutorialActivity
|
||||||
import de.jrpie.android.launcher.databinding.SettingsMetaBinding
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [SettingsFragmentMeta] is a used as a tab in the SettingsActivity.
|
* The [SettingsFragmentMeta] is a used as a tab in the SettingsActivity.
|
||||||
|
@ -65,7 +65,8 @@ 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(android.R.string.ok
|
.setPositiveButton(
|
||||||
|
android.R.string.ok
|
||||||
) { _, _ ->
|
) { _, _ ->
|
||||||
resetSettings(this.requireContext())
|
resetSettings(this.requireContext())
|
||||||
requireActivity().finish()
|
requireActivity().finish()
|
||||||
|
@ -85,7 +86,6 @@ class SettingsFragmentMeta : Fragment(), UIObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// contact developer
|
// contact developer
|
||||||
binding.settingsMetaButtonContact.setOnClickListener {
|
binding.settingsMetaButtonContact.setOnClickListener {
|
||||||
openNewTabWindow(
|
openNewTabWindow(
|
||||||
|
|
|
@ -8,10 +8,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.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
|
||||||
|
@ -73,8 +73,8 @@ 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) {
|
||||||
|
@ -88,6 +88,11 @@ 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 { return "" }
|
override fun getPageTitle(position: Int): CharSequence {
|
||||||
override fun getCount(): Int { return 5 }
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getCount(): Int {
|
||||||
|
return 5
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ 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.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
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 de.jrpie.android.launcher.*
|
import androidx.fragment.app.Fragment
|
||||||
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.
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
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 de.jrpie.android.launcher.*
|
import androidx.fragment.app.Fragment
|
||||||
|
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
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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:duration="100"/>
|
android:toYDelta="0%p" />
|
||||||
|
|
||||||
</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:duration="100"/>
|
android:toXDelta="0%p" />
|
||||||
|
|
||||||
</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:duration="100"/>
|
android:toXDelta="0%p" />
|
||||||
|
|
||||||
</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:duration="100"/>
|
android:toYDelta="0%p" />
|
||||||
|
|
||||||
</set>
|
</set>
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<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" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<path android:fillColor="?android:textColor" android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
|
<path
|
||||||
|
android:fillColor="?android:textColor"
|
||||||
|
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<path
|
||||||
|
android:fillColor="?android:textColor"
|
||||||
|
android:pathData="M6,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<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" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<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" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<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" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<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" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<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" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<path android:fillColor="?android:textColor" android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/>
|
<path
|
||||||
|
android:fillColor="?android:textColor"
|
||||||
|
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<path android:fillColor="?android:textColor" android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"/>
|
<path
|
||||||
|
android:fillColor="?android:textColor"
|
||||||
|
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:autoMirrored="true"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<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" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
<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">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:autoMirrored="true"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
<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"/>
|
<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" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<?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"
|
<item android:drawable="@drawable/tutorial_selected_dot" android:state_selected="true" />
|
||||||
android:state_selected="true"/>
|
|
||||||
|
|
||||||
<item android:drawable="@drawable/tutorial_default_dot" />
|
<item android:drawable="@drawable/tutorial_default_dot" />
|
||||||
</selector>
|
</selector>
|
|
@ -1,8 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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"
|
||||||
|
@ -14,9 +13,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:gravity="center"
|
|
||||||
|
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
|
|
||||||
|
android:gravity="center"
|
||||||
app:elevation="0dp"
|
app:elevation="0dp"
|
||||||
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?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,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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"
|
||||||
|
@ -11,9 +10,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
|
||||||
|
@ -54,6 +53,7 @@
|
||||||
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,8 +63,7 @@
|
||||||
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
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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"
|
||||||
|
@ -30,8 +29,7 @@
|
||||||
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,7 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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,8 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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"
|
||||||
|
@ -26,11 +24,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:tabBackground="@drawable/tutorial_tab_selector"
|
|
||||||
app:tabGravity="center"
|
|
||||||
app:tabIndicatorHeight="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:tabBackground="@drawable/tutorial_tab_selector"
|
||||||
|
app:tabGravity="center"
|
||||||
|
app:tabIndicatorHeight="0dp" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,13 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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:paddingLeft="32sp"
|
|
||||||
android:paddingRight="32sp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:paddingLeft="32sp"
|
||||||
|
android:paddingRight="32sp"
|
||||||
tools:context=".tutorial.tabs.TutorialFragmentConcept">
|
tools:context=".tutorial.tabs.TutorialFragmentConcept">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -54,8 +53,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:textSize="32sp"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:textSize="32sp"
|
||||||
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,14 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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:paddingLeft="32sp"
|
|
||||||
android:paddingRight="32sp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:paddingLeft="32sp"
|
||||||
|
android:paddingRight="32sp"
|
||||||
tools:context=".tutorial.tabs.TutorialFragmentFinish">
|
tools:context=".tutorial.tabs.TutorialFragmentFinish">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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,13 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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:paddingLeft="32sp"
|
|
||||||
android:paddingRight="32sp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:paddingLeft="32sp"
|
||||||
|
android:paddingRight="32sp"
|
||||||
tools:context=".tutorial.tabs.TutorialFragmentStart">
|
tools:context=".tutorial.tabs.TutorialFragmentStart">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?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 android:id="@+id/app_menu_delete"
|
<item
|
||||||
|
android:id="@+id/app_menu_delete"
|
||||||
android:title="@string/list_app_delete" />
|
android:title="@string/list_app_delete" />
|
||||||
<item android:id="@+id/app_menu_info"
|
<item
|
||||||
|
android:id="@+id/app_menu_info"
|
||||||
android:title="@string/list_app_info" />
|
android:title="@string/list_app_info" />
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -89,7 +89,6 @@
|
||||||
<string name="settings_functionality_search_auto_open_keyboard_key" translatable="false">searchAutoKeyboard</string>
|
<string name="settings_functionality_search_auto_open_keyboard_key" translatable="false">searchAutoKeyboard</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
-
|
-
|
||||||
- URLs
|
- URLs
|
||||||
|
|
|
@ -185,7 +185,6 @@
|
||||||
<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,6 +28,7 @@
|
||||||
<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>
|
||||||
|
@ -61,14 +62,13 @@
|
||||||
<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,45 +1,44 @@
|
||||||
<?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
|
<PreferenceCategory app:allowDividerAbove="false"> <!-- general -->
|
||||||
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
|
||||||
app:allowDividerAbove="false"
|
android:title="@string/settings_launcher_section_appearance"
|
||||||
android:title="@string/settings_launcher_section_appearance">
|
app:allowDividerAbove="false">
|
||||||
<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:summary="%s"
|
|
||||||
android:defaultValue="DEFAULT"
|
|
||||||
android:key="@string/settings_theme_color_theme_key"
|
android:key="@string/settings_theme_color_theme_key"
|
||||||
|
android:summary="%s"
|
||||||
android:title="@string/settings_theme_color_theme" />
|
android:title="@string/settings_theme_color_theme" />
|
||||||
|
|
||||||
<DropDownPreference
|
<DropDownPreference
|
||||||
android:key="@string/settings_theme_font_key"
|
android:defaultValue="HACK"
|
||||||
android:title="@string/settings_theme_font"
|
|
||||||
android:entryValues="@array/settings_theme_font_values"
|
|
||||||
android:entries="@array/settings_theme_font_items"
|
android:entries="@array/settings_theme_font_items"
|
||||||
|
android:entryValues="@array/settings_theme_font_values"
|
||||||
|
android:key="@string/settings_theme_font_key"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:defaultValue="HACK"/>
|
android:title="@string/settings_theme_font" />
|
||||||
<DropDownPreference
|
<DropDownPreference
|
||||||
android:key="@string/settings_theme_background_key"
|
android:defaultValue="BLUR"
|
||||||
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:defaultValue="BLUR"/>
|
android:key="@string/settings_theme_background_key"
|
||||||
|
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>
|
||||||
|
|
||||||
|
@ -47,20 +46,20 @@
|
||||||
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:key="@string/settings_clock_localized_key"
|
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
|
android:key="@string/settings_clock_localized_key"
|
||||||
android:title="@string/settings_clock_localized" />
|
android:title="@string/settings_clock_localized" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_clock_time_visible_key"
|
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:key="@string/settings_clock_time_visible_key"
|
||||||
android:title="@string/settings_clock_time_visible" />
|
android:title="@string/settings_clock_time_visible" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_clock_date_visible_key"
|
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:key="@string/settings_clock_date_visible_key"
|
||||||
android:title="@string/settings_clock_date_visible" />
|
android:title="@string/settings_clock_date_visible" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_clock_flip_date_time_key"
|
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
|
android:key="@string/settings_clock_flip_date_time_key"
|
||||||
android:title="@string/settings_clock_flip_date_time" />
|
android:title="@string/settings_clock_flip_date_time" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
@ -69,20 +68,20 @@
|
||||||
app:allowDividerAbove="false">
|
app:allowDividerAbove="false">
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_functionality_search_auto_launch_key"
|
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:key="@string/settings_functionality_search_auto_launch_key"
|
||||||
android:title="@string/settings_functionality_auto_launch" />
|
android:title="@string/settings_functionality_auto_launch" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_functionality_search_auto_open_keyboard_key"
|
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:key="@string/settings_functionality_search_auto_open_keyboard_key"
|
||||||
android:title="@string/settings_functionality_auto_keyboard" />
|
android:title="@string/settings_functionality_auto_keyboard" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_enabled_gestures_double_swipe_key"
|
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:key="@string/settings_enabled_gestures_double_swipe_key"
|
||||||
android:title="@string/settings_enabled_gestures_double_swipe" />
|
android:title="@string/settings_enabled_gestures_double_swipe" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="@string/settings_enabled_gestures_edge_swipe_key"
|
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
android:key="@string/settings_enabled_gestures_edge_swipe_key"
|
||||||
android:title="@string/settings_enabled_gestures_edge_swipe" />
|
android:title="@string/settings_enabled_gestures_edge_swipe" />
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue