Feat: Added the base for the new settings screen (#130)

* Feat: Added the base for the new settings screen

* Fix: Removed junk from Home

* Fix: Cleanup Setting

* Fix: Bit more advanced settings

Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
This commit is contained in:
HᴇCᴏᴅᴇs2ᴍᴜᴄʜ
2024-09-27 20:40:22 +01:00
committed by GitHub
parent 9601afa861
commit 6b72000c60
32 changed files with 2457 additions and 1456 deletions

View File

@@ -78,14 +78,25 @@ android {
manifestPlaceholders["coarseLocationPermission"] =
"android.permission.ACCESS_COARSE_LOCATION"
val weatherFile = project.rootProject.file("weather.properties")
val properties = Properties()
properties.load(weatherFile.inputStream())
val apiKey = properties.getProperty("WEATHER_API_KEY") ?: ""
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"$apiKey\""
)
if (weatherFile.exists()) {
val properties = Properties()
weatherFile.inputStream().use { inputStream ->
properties.load(inputStream)
}
val apiKey = properties.getProperty("WEATHER_API_KEY") ?: ""
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"$apiKey\""
)
} else {
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"REMOVE\""
)
println("weather.properties file not found.")
}
}
create("withoutInternet") {
@@ -105,16 +116,27 @@ android {
applicationIdSuffix = ".nightly"
versionNameSuffix = "-nightly"
manifestPlaceholders["internetPermission"] = "android.permission.INTERNET"
val weatherFile = project.rootProject.file("weather.properties")
val properties = Properties()
properties.load(weatherFile.inputStream())
val apiKey = properties.getProperty("WEATHER_API_KEY") ?: ""
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"$apiKey\""
)
resValue("string", "app_name", "Easy Launcher (Nightly)")
val weatherFile = project.rootProject.file("weather.properties")
if (weatherFile.exists()) {
val properties = Properties()
weatherFile.inputStream().use { inputStream ->
properties.load(inputStream)
}
val apiKey = properties.getProperty("WEATHER_API_KEY") ?: ""
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"$apiKey\""
)
} else {
buildConfigField(
type = "String",
name = "API_KEY",
value = "\"REMOVE\""
)
println("weather.properties file not found.")
}
}
create("withoutInternetNightly") {

View File

@@ -10,6 +10,7 @@ import android.content.res.Configuration
import android.content.res.Resources
import android.net.Uri
import android.os.Build
import android.util.Log
import android.view.Gravity
import android.view.View
import android.view.Window
@@ -19,10 +20,10 @@ import androidx.appcompat.widget.LinearLayoutCompat
import androidx.navigation.NavOptions
import com.github.droidworksstudio.common.showLongToast
import com.github.droidworksstudio.launcher.BuildConfig
import com.github.droidworksstudio.launcher.utils.Constants
import com.github.droidworksstudio.launcher.R
import com.github.droidworksstudio.launcher.accessibility.ActionService
import com.github.droidworksstudio.launcher.helper.weather.WeatherResponse
import com.github.droidworksstudio.launcher.utils.Constants
import com.github.droidworksstudio.launcher.utils.WeatherApiService
import com.google.gson.Gson
import retrofit2.Retrofit
@@ -115,6 +116,7 @@ class AppHelper @Inject constructor() {
// Digital Wellbeing app is not installed or cannot be opened
// Handle this case as needed
context.showLongToast("Digital Wellbeing is not available on this device.")
Log.e("AppHelper", "Digital Wellbeing app not found or cannot be opened.", e)
}
}
@@ -170,27 +172,34 @@ class AppHelper @Inject constructor() {
return dailyWordsArray[wordIndex]
}
fun shareAppButton(context: Context) {
fun shareApplicationButton(context: Context) {
val shareIntent = Intent(Intent.ACTION_SEND)
val description = context.getString(R.string.advanced_settings_share_application_description, context.getString(R.string.app_name))
shareIntent.type = "text/plain"
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Share Application")
shareIntent.putExtra(
Intent.EXTRA_TEXT,
"https://f-droid.org/packages/" + context.packageName
"$description https://f-droid.org/packages/${context.packageName}"
)
context.startActivity(Intent.createChooser(shareIntent, "Share Application"))
}
fun githubButton(context: Context) {
fun helpFeedbackButton(context: Context) {
val uri = Uri.parse("https://github.com/DroidWorksStudio/EasyLauncher")
val intent = Intent(Intent.ACTION_VIEW, uri)
context.startActivity(intent)
}
fun feedbackButton(context: Context) {
fun communitySupportButton(context: Context) {
val uri = Uri.parse("https://t.me/DroidWorksStudio/")
val intent = Intent(Intent.ACTION_VIEW, uri)
context.startActivity(intent)
}
fun emailButton(context: Context) {
val emailIntent = Intent(Intent.ACTION_SENDTO)
emailIntent.data = Uri.parse("mailto:droidworksstuido@063240.xyz")
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Easy Launcher")
emailIntent.putExtra(Intent.EXTRA_SUBJECT, R.string.app_name)
context.startActivity(Intent.createChooser(emailIntent, "Choose Mail Application"))
}
@@ -307,6 +316,7 @@ class AppHelper @Inject constructor() {
return WeatherResult.Failure("Failed to fetch weather data: ${response.errorBody()}")
}
} catch (e: UnknownHostException) {
Log.e("AppHelper", "Unknown Host.", e)
return WeatherResult.Failure("Unknown Host : $baseURL")
} catch (e: Exception) {
return WeatherResult.Failure("${e.message}")

View File

@@ -2,8 +2,6 @@ package com.github.droidworksstudio.launcher.ui.activities
import android.Manifest
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.content.pm.ActivityInfo
@@ -24,6 +22,7 @@ import androidx.annotation.RequiresApi
import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavController
import androidx.navigation.findNavController
@@ -33,6 +32,7 @@ import androidx.navigation.ui.navigateUp
import com.github.droidworksstudio.common.hasInternetPermission
import com.github.droidworksstudio.common.isTablet
import com.github.droidworksstudio.common.showLongToast
import com.github.droidworksstudio.common.showShortToast
import com.github.droidworksstudio.launcher.R
import com.github.droidworksstudio.launcher.databinding.ActivityMainBinding
import com.github.droidworksstudio.launcher.helper.AppHelper
@@ -89,7 +89,7 @@ class MainActivity : AppCompatActivity() {
setContentView(binding.root)
locationManager = getSystemService(LOCATION_SERVICE) as LocationManager
sharedPreferences = getSharedPreferences(Constants.WEATHER_PREFS, Context.MODE_PRIVATE)
sharedPreferences = getSharedPreferences(Constants.WEATHER_PREFS, MODE_PRIVATE)
handler = Handler(Looper.getMainLooper())
initializeDependencies()
@@ -218,7 +218,7 @@ class MainActivity : AppCompatActivity() {
onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
backToHomeScreen()
goBackToSettings()
}
})
}
@@ -268,8 +268,29 @@ class MainActivity : AppCompatActivity() {
private fun backToHomeScreen() {
navController = findNavController(R.id.nav_host_fragment_content_main)
if (navController.currentDestination?.id != R.id.HomeFragment)
navController.navigate(R.id.HomeFragment)
when (navController.currentDestination?.id) {
R.id.HomeFragment -> return
else -> navController.navigate(R.id.HomeFragment)
}
}
private fun goBackToSettings() {
navController = findNavController(R.id.nav_host_fragment_content_main)
val fragmentManager: FragmentManager = supportFragmentManager
when (navController.currentDestination?.id) {
R.id.SettingsFragment,
R.id.SettingsFeaturesFragment,
R.id.SettingsLookFeelFragment,
R.id.FavoriteFragment,
R.id.HiddenFragment,
R.id.SettingsAdvancedFragment -> {
fragmentManager.popBackStack()
}
else -> {
navController.navigate(R.id.HomeFragment)
}
}
}
@@ -296,7 +317,7 @@ class MainActivity : AppCompatActivity() {
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (resultCode != Activity.RESULT_OK) {
if (resultCode != RESULT_OK) {
applicationContext.showLongToast("Intent Error")
return
}
@@ -320,6 +341,7 @@ class MainActivity : AppCompatActivity() {
prefs.loadFromString(string)
}
}
applicationContext.showShortToast(getString(R.string.settings_reload_app_restore))
Handler(Looper.getMainLooper()).postDelayed({
AppReloader.restartApp(applicationContext)
}, 500)
@@ -335,6 +357,7 @@ class MainActivity : AppCompatActivity() {
}
}
}
applicationContext.showShortToast(getString(R.string.settings_reload_app_backup))
}
}
}

View File

@@ -0,0 +1,173 @@
package com.github.droidworksstudio.launcher.ui.settings
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.provider.Settings
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import androidx.navigation.fragment.findNavController
import com.github.droidworksstudio.common.resetDefaultLauncher
import com.github.droidworksstudio.launcher.R
import com.github.droidworksstudio.launcher.databinding.FragmentSettingsAdvancedBinding
import com.github.droidworksstudio.launcher.helper.AppHelper
import com.github.droidworksstudio.launcher.helper.AppReloader
import com.github.droidworksstudio.launcher.helper.PreferenceHelper
import com.github.droidworksstudio.launcher.listener.ScrollEventListener
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
@AndroidEntryPoint
class SettingsAdvancedFragment : Fragment(),
ScrollEventListener {
private var _binding: FragmentSettingsAdvancedBinding? = null
private val binding get() = _binding!!
@Inject
lateinit var preferenceHelper: PreferenceHelper
@Inject
lateinit var appHelper: AppHelper
private lateinit var navController: NavController
private lateinit var context: Context
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View {
// Inflate the layout for this fragment
_binding = FragmentSettingsAdvancedBinding.inflate(inflater, container, false)
_binding = binding
return binding.root
}
// Called after the fragment view is created
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
navController = findNavController()
// Set according to the system theme mode
appHelper.dayNightMod(requireContext(), binding.nestScrollView)
super.onViewCreated(view, savedInstanceState)
context = requireContext()
initializeInjectedDependencies()
observeClickListener()
}
override fun onStop() {
super.onStop()
dismissDialogs()
}
private fun initializeInjectedDependencies() {
binding.nestScrollView.scrollEventListener = this
val packageInfo =
requireContext().packageManager.getPackageInfo(requireContext().packageName, 0)
binding.apply {
appInfoDescription.text = getString(R.string.advanced_settings_app_info_description).format(packageInfo.versionName)
}
}
private fun observeClickListener() {
binding.apply {
appInfo.setOnClickListener {
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
data = Uri.parse("package:${context.packageName}")
}
context.startActivity(intent)
}
setDefaultLauncher.setOnClickListener {
requireContext().resetDefaultLauncher()
}
restartLauncher.setOnClickListener {
Handler(Looper.getMainLooper()).postDelayed({
AppReloader.restartApp(context)
}, 500)
}
backupRestore.setOnClickListener {
showBackupRestoreDialog()
}
helpFeedback.setOnClickListener {
appHelper.helpFeedbackButton(requireContext())
}
communitySupport.setOnClickListener {
appHelper.communitySupportButton(requireContext())
}
shareApplication.setOnClickListener {
appHelper.shareApplicationButton(requireContext())
}
}
}
private var backupRestoreDialog: AlertDialog? = null
private fun showBackupRestoreDialog() {
// Dismiss any existing dialog to prevent multiple dialogs open simultaneously
backupRestoreDialog?.dismiss()
// Define the items for the dialog (Backup, Restore, Clear Data)
val items = arrayOf(
getString(R.string.advanced_settings_backup_restore_backup),
getString(R.string.advanced_settings_backup_restore_restore),
getString(R.string.advanced_settings_backup_restore_clear)
)
val dialogBuilder = MaterialAlertDialogBuilder(context)
dialogBuilder.setTitle(getString(R.string.advanced_settings_backup_restore_title))
dialogBuilder.setItems(items) { _, which ->
when (which) {
0 -> appHelper.storeFile(requireActivity())
1 -> appHelper.loadFile(requireActivity())
else -> confirmClearData()
}
}
// Assign the created dialog to backupRestoreDialog
backupRestoreDialog = dialogBuilder.create()
backupRestoreDialog?.show()
}
// Function to handle the Clear Data action, with a confirmation dialog
private fun confirmClearData() {
MaterialAlertDialogBuilder(context)
.setTitle(getString(R.string.advanced_settings_backup_restore_clear_title))
.setMessage(getString(R.string.advanced_settings_backup_restore_clear_description))
.setPositiveButton(getString(R.string.advanced_settings_backup_restore_clear_yes)) { _, _ ->
clearData()
}
.setNegativeButton(getString(R.string.advanced_settings_backup_restore_clear_no), null)
.show()
}
private fun clearData() {
preferenceHelper.clearAll(context)
Handler(Looper.getMainLooper()).postDelayed({
AppReloader.restartApp(context)
}, 500)
}
private fun dismissDialogs() {
backupRestoreDialog?.dismiss()
}
}

View File

@@ -0,0 +1,340 @@
package com.github.droidworksstudio.launcher.ui.settings
import android.content.Context
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavController
import androidx.navigation.fragment.findNavController
import com.github.droidworksstudio.common.getAppNameFromPackageName
import com.github.droidworksstudio.launcher.R
import com.github.droidworksstudio.launcher.databinding.FragmentSettingsFeaturesBinding
import com.github.droidworksstudio.launcher.helper.AppHelper
import com.github.droidworksstudio.launcher.helper.PreferenceHelper
import com.github.droidworksstudio.launcher.listener.ScrollEventListener
import com.github.droidworksstudio.launcher.repository.AppInfoRepository
import com.github.droidworksstudio.launcher.utils.Constants
import com.github.droidworksstudio.launcher.viewmodel.PreferenceViewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import javax.inject.Inject
@AndroidEntryPoint
class SettingsFeaturesFragment : Fragment(),
ScrollEventListener {
private var _binding: FragmentSettingsFeaturesBinding? = null
private val binding get() = _binding!!
private val preferenceViewModel: PreferenceViewModel by viewModels()
@Inject
lateinit var preferenceHelper: PreferenceHelper
@Inject
lateinit var appInfoRepository: AppInfoRepository
@Inject
lateinit var appHelper: AppHelper
private lateinit var navController: NavController
private lateinit var context: Context
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View {
// Inflate the layout for this fragment
_binding = FragmentSettingsFeaturesBinding.inflate(inflater, container, false)
_binding = binding
return binding.root
}
// Called after the fragment view is created
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
navController = findNavController()
// Set according to the system theme mode
appHelper.dayNightMod(requireContext(), binding.nestScrollView)
super.onViewCreated(view, savedInstanceState)
context = requireContext()
initializeInjectedDependencies()
observeClickListener()
binding.apply {
miscellaneousSearchEngineControl.text = preferenceHelper.searchEngines.getString(context)
}
val actions = listOf(
Triple(preferenceHelper.doubleTapAction, preferenceHelper.doubleTapApp, binding.gesturesDoubleTapControl),
Triple(preferenceHelper.swipeUpAction, preferenceHelper.swipeUpApp, binding.gesturesSwipeUpControl),
Triple(preferenceHelper.swipeDownAction, preferenceHelper.swipeDownApp, binding.gesturesSwipeDownControl),
Triple(preferenceHelper.swipeLeftAction, preferenceHelper.swipeLeftApp, binding.gesturesSwipeLeftControl),
Triple(preferenceHelper.swipeRightAction, preferenceHelper.swipeRightApp, binding.gesturesSwipeRightControl)
)
actions.forEach { (action, app, control) ->
updateGestureControlText(context, action, app, control)
}
}
// Function to update UI text based on action and app name
private fun updateGestureControlText(
context: Context,
action: Constants.Action,
appPackageName: String?,
textView: TextView
) {
val actionText = if (action == Constants.Action.OpenApp) {
val appName = appPackageName?.let { context.getAppNameFromPackageName(it) }
context.getString(R.string.settings_actions_open_app_run, appName)
} else {
action.getString(context)
}
textView.text = actionText
}
override fun onStop() {
super.onStop()
dismissDialogs()
}
private fun initializeInjectedDependencies() {
binding.nestScrollView.scrollEventListener = this
// Set initial values and listeners for switches
binding.apply {
automaticKeyboardSwitchCompat.isChecked = preferenceHelper.automaticKeyboard
automaticOpenAppSwitchCompat.isChecked = preferenceHelper.automaticOpenApp
lockSettingsSwitchCompat.isChecked = preferenceHelper.settingsLock
}
}
private fun observeClickListener() {
setupSwitchListeners()
binding.apply {
gesturesDoubleTapControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.DoubleTap)
}
gesturesSwipeUpControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.Up)
}
gesturesSwipeDownControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.Down)
}
gesturesSwipeLeftControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.Left)
}
gesturesSwipeRightControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.Right)
}
miscellaneousSearchEngineControl.setOnClickListener {
showSearchEngineDialog()
}
}
}
private var searchEngineDialog: AlertDialog? = null
private fun showSearchEngineDialog() {
// Dismiss any existing dialog to prevent multiple dialogs open simultaneously
searchEngineDialog?.dismiss()
// Get the array of SearchEngines enum values
val items = Constants.SearchEngines.entries.toTypedArray()
// Map the enum values to their string representations
val itemStrings = items.map { it.getString(context) }.toTypedArray()
val dialogBuilder = MaterialAlertDialogBuilder(context)
dialogBuilder.setTitle(getString(R.string.settings_select_search_engine))
dialogBuilder.setItems(itemStrings) { _, which ->
val selectedItem = items[which]
preferenceViewModel.setSearchEngine(selectedItem)
binding.miscellaneousSearchEngineControl.text = preferenceHelper.searchEngines.name
}
// Assign the created dialog to launcherFontDialog
searchEngineDialog = dialogBuilder.create()
searchEngineDialog?.show()
}
private var appSelectionDialog: AlertDialog? = null
private fun showAppSelectionDialog(swipeType: Constants.Swipe) {
// Make sure this method is called within a lifecycle owner scope
lifecycleScope.launch(Dispatchers.Main) {
// Dismiss any existing dialog to prevent multiple dialogs open simultaneously
appSelectionDialog?.dismiss()
// Collect the flow of installed apps
appInfoRepository.getDrawApps().collect { installedApps ->
// Extract app names and package names
val appNames = installedApps.map { it.appName }.toTypedArray()
val packageNames = installedApps.map { it.packageName }
// Build and display the dialog
val dialogBuilder = MaterialAlertDialogBuilder(context)
dialogBuilder.setTitle("Select an App")
dialogBuilder.setItems(appNames) { _, which ->
val selectedPackageName = packageNames[which]
when (swipeType) {
Constants.Swipe.DoubleTap,
Constants.Swipe.Up,
Constants.Swipe.Down,
Constants.Swipe.Left,
Constants.Swipe.Right -> handleSwipeAction(swipeType, selectedPackageName)
}
}
// Assign the created dialog to launcherFontDialog
appSelectionDialog = dialogBuilder.create()
appSelectionDialog?.show()
}
}
}
private fun setupSwitchListeners() {
binding.apply {
automaticKeyboardSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setAutoKeyboard(isChecked)
}
automaticOpenAppSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setAutoOpenApp(isChecked)
}
lockSettingsSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setLockSettings(isChecked)
}
}
}
private fun swipeActionClickEvent(swipe: Constants.Swipe) {
// Get the array of Action enum values
val actions = Constants.Action.entries.toTypedArray()
// Map the enum values to their string representations
val actionStrings = actions.map { it.getString(context) }.toTypedArray()
val dialog = MaterialAlertDialogBuilder(context)
dialog.setTitle("Select a Action")
dialog.setItems(actionStrings) { _, which ->
val selectedAction = actions[which]
when (swipe) {
Constants.Swipe.DoubleTap -> handleSwipeAction(context, Constants.Swipe.DoubleTap, selectedAction, binding)
Constants.Swipe.Up -> handleSwipeAction(context, Constants.Swipe.Up, selectedAction, binding)
Constants.Swipe.Down -> handleSwipeAction(context, Constants.Swipe.Down, selectedAction, binding)
Constants.Swipe.Left -> handleSwipeAction(context, Constants.Swipe.Left, selectedAction, binding)
Constants.Swipe.Right -> handleSwipeAction(context, Constants.Swipe.Right, selectedAction, binding)
}
}
dialog.show()
}
private fun handleSwipeAction(swipeType: Constants.Swipe, selectedPackageName: String) {
val selectedApp = context.getAppNameFromPackageName(selectedPackageName)
when (swipeType) {
Constants.Swipe.DoubleTap -> {
binding.gesturesDoubleTapControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
preferenceHelper.doubleTapApp = selectedPackageName
}
Constants.Swipe.Up -> {
binding.gesturesSwipeUpControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
preferenceHelper.swipeUpApp = selectedPackageName
}
Constants.Swipe.Down -> {
binding.gesturesSwipeDownControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
preferenceHelper.swipeDownApp = selectedPackageName
}
Constants.Swipe.Left -> {
binding.gesturesSwipeLeftControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
preferenceHelper.swipeLeftApp = selectedPackageName
}
Constants.Swipe.Right -> {
binding.gesturesSwipeRightControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
preferenceHelper.swipeRightApp = selectedPackageName
}
}
}
// Function to handle setting action and updating UI
private fun handleSwipeAction(context: Context, swipe: Constants.Swipe, action: Constants.Action, binding: FragmentSettingsFeaturesBinding) {
preferenceViewModel.setSwipeAction(swipe, action)
when (action) {
Constants.Action.OpenApp -> {
val selectedApp = when (swipe) {
Constants.Swipe.DoubleTap -> context.getAppNameFromPackageName(preferenceHelper.doubleTapApp)
Constants.Swipe.Up -> context.getAppNameFromPackageName(preferenceHelper.swipeUpApp)
Constants.Swipe.Down -> context.getAppNameFromPackageName(preferenceHelper.swipeDownApp)
Constants.Swipe.Left -> context.getAppNameFromPackageName(preferenceHelper.swipeLeftApp)
Constants.Swipe.Right -> context.getAppNameFromPackageName(preferenceHelper.swipeRightApp)
}
binding.apply {
when (swipe) {
Constants.Swipe.DoubleTap -> gesturesDoubleTapControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
Constants.Swipe.Up -> gesturesSwipeUpControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
Constants.Swipe.Down -> gesturesSwipeDownControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
Constants.Swipe.Left -> gesturesSwipeLeftControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
Constants.Swipe.Right -> gesturesSwipeRightControl.text = getString(R.string.settings_actions_open_app_run, selectedApp)
}
}
showAppSelectionDialog(swipe)
}
else -> {
Log.d("doubleTapAction", preferenceHelper.doubleTapAction.getString(context))
binding.apply {
when (swipe) {
Constants.Swipe.DoubleTap -> gesturesDoubleTapControl.text = preferenceHelper.doubleTapAction.getString(context)
Constants.Swipe.Up -> gesturesSwipeUpControl.text = preferenceHelper.swipeUpAction.getString(context)
Constants.Swipe.Down -> gesturesSwipeDownControl.text = preferenceHelper.swipeDownAction.getString(context)
Constants.Swipe.Left -> gesturesSwipeLeftControl.text = preferenceHelper.swipeLeftAction.getString(context)
Constants.Swipe.Right -> gesturesSwipeRightControl.text = preferenceHelper.swipeRightAction.getString(context)
}
}
}
}
}
// Extension function to set swipe action in ViewModel
private fun PreferenceViewModel.setSwipeAction(swipe: Constants.Swipe, action: Constants.Action) {
when (swipe) {
Constants.Swipe.DoubleTap -> setDoubleTap(action)
Constants.Swipe.Up -> setSwipeUp(action)
Constants.Swipe.Down -> setSwipeDown(action)
Constants.Swipe.Left -> setSwipeLeft(action)
Constants.Swipe.Right -> setSwipeRight(action)
}
}
private fun dismissDialogs() {
searchEngineDialog?.dismiss()
appSelectionDialog?.dismiss()
}
}

View File

@@ -2,42 +2,20 @@ package com.github.droidworksstudio.launcher.ui.settings
import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavController
import androidx.navigation.fragment.findNavController
import com.github.droidworksstudio.common.getAppNameFromPackageName
import com.github.droidworksstudio.common.resetDefaultLauncher
import com.github.droidworksstudio.launcher.R
import com.github.droidworksstudio.launcher.adapter.font.FontAdapter
import com.github.droidworksstudio.launcher.databinding.FragmentSettingsBinding
import com.github.droidworksstudio.launcher.helper.AppHelper
import com.github.droidworksstudio.launcher.helper.AppReloader
import com.github.droidworksstudio.launcher.helper.PreferenceHelper
import com.github.droidworksstudio.launcher.listener.OnSwipeTouchListener
import com.github.droidworksstudio.launcher.listener.ScrollEventListener
import com.github.droidworksstudio.launcher.repository.AppInfoRepository
import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.AlignmentBottomSheetDialogFragment
import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.ColorBottomSheetDialogFragment
import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.PaddingBottomSheetDialogFragment
import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.TextBottomSheetDialogFragment
import com.github.droidworksstudio.launcher.utils.Constants
import com.github.droidworksstudio.launcher.viewmodel.PreferenceViewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import javax.inject.Inject
@AndroidEntryPoint
@@ -47,8 +25,6 @@ class SettingsFragment : Fragment(),
private var _binding: FragmentSettingsBinding? = null
private val binding get() = _binding!!
private val preferenceViewModel: PreferenceViewModel by viewModels()
@Inject
lateinit var preferenceHelper: PreferenceHelper
@@ -84,442 +60,35 @@ class SettingsFragment : Fragment(),
initializeInjectedDependencies()
observeClickListener()
observeSwipeTouchListener()
val packageInfo =
requireContext().packageManager.getPackageInfo(requireContext().packageName, 0)
binding.versionInfo.text = getString(R.string.settings_version).format(
getString(R.string.app_name),
packageInfo.versionName
)
binding.miscellaneousSearchEngineControl.text = preferenceHelper.searchEngines.getString(context)
binding.miscellaneousLauncherFontsControl.text = preferenceHelper.launcherFont.getString(context)
val actions = listOf(
Triple(preferenceHelper.doubleTapAction, preferenceHelper.doubleTapApp, binding.gesturesDoubleTapControl),
Triple(preferenceHelper.swipeUpAction, preferenceHelper.swipeUpApp, binding.gesturesSwipeUpControl),
Triple(preferenceHelper.swipeDownAction, preferenceHelper.swipeDownApp, binding.gesturesSwipeDownControl),
Triple(preferenceHelper.swipeLeftAction, preferenceHelper.swipeLeftApp, binding.gesturesSwipeLeftControl),
Triple(preferenceHelper.swipeRightAction, preferenceHelper.swipeRightApp, binding.gesturesSwipeRightControl)
)
actions.forEach { (action, app, control) ->
updateGestureControlText(context, action, app, control)
}
}
// Function to update UI text based on action and app name
private fun updateGestureControlText(
context: Context,
action: Constants.Action,
appPackageName: String?,
textView: TextView
) {
val actionText = if (action == Constants.Action.OpenApp) {
val appName = appPackageName?.let { context.getAppNameFromPackageName(it) }
context.getString(R.string.settings_actions_open_app_run, appName)
} else {
action.getString(context)
}
textView.text = actionText
}
@SuppressLint("SetTextI18n")
private fun initializeInjectedDependencies() {
binding.nestScrollView.scrollEventListener = this
// Set initial values and listeners for switches
binding.statueBarSwitchCompat.isChecked = preferenceHelper.showStatusBar
binding.timeSwitchCompat.isChecked = preferenceHelper.showTime
binding.dateSwitchCompat.isChecked = preferenceHelper.showDate
binding.batterySwitchCompat.isChecked = preferenceHelper.showBattery
binding.dailyWordSwitchCompat.isChecked = preferenceHelper.showDailyWord
binding.appIconsSwitchCompat.isChecked = preferenceHelper.showAppIcon
binding.appIconDotsSwitchCompat.isChecked = preferenceHelper.showAppIconAsDots
binding.automaticKeyboardSwitchCompat.isChecked = preferenceHelper.automaticKeyboard
binding.automaticOpenAppSwitchCompat.isChecked = preferenceHelper.automaticOpenApp
binding.lockSettingsSwitchCompat.isChecked = preferenceHelper.settingsLock
if (!binding.appIconsSwitchCompat.isChecked) {
// Disable and gray out the other setting if appIconsSwitchCompat is checked
binding.appIconDotsSwitchCompat.isEnabled = binding.appIconsSwitchCompat.isChecked
binding.appIconDotsSwitchCompat.isChecked = false
}
}
private fun observeClickListener() {
setupSwitchListeners()
// Click listener for reset default launcher
binding.setLauncherSelector.setOnClickListener {
requireContext().resetDefaultLauncher()
}
binding.favoriteText.setOnClickListener {
findNavController().navigate(R.id.action_SettingsFragment_to_FavoriteFragment)
}
binding.hiddenText.setOnClickListener {
findNavController().navigate(R.id.action_SettingsFragment_to_HiddenFragment)
}
binding.setAppWallpaper.setOnClickListener {
val intent = Intent(Intent.ACTION_SET_WALLPAPER)
startActivity(Intent.createChooser(intent, "Select Wallpaper"))
}
binding.selectAppearanceTextSize.setOnClickListener {
val bottomSheetFragment = TextBottomSheetDialogFragment()
bottomSheetFragment.show(parentFragmentManager, "BottomSheetDialog")
}
binding.selectAppearanceAlignment.setOnClickListener {
val bottomSheetFragment = AlignmentBottomSheetDialogFragment()
bottomSheetFragment.show(parentFragmentManager, "BottomSheetDialog")
}
binding.selectAppearancePadding.setOnClickListener {
val bottomSheetFragment = PaddingBottomSheetDialogFragment()
bottomSheetFragment.show(parentFragmentManager, "BottomSheetDialog")
}
binding.selectAppearanceColor.setOnClickListener {
val bottomSheetFragment = ColorBottomSheetDialogFragment()
bottomSheetFragment.show(parentFragmentManager, "BottomSheetDialog")
}
binding.shareView.setOnClickListener {
appHelper.shareAppButton(requireContext())
}
binding.githubView.setOnClickListener {
appHelper.githubButton(requireContext())
}
binding.feedbackView.setOnClickListener {
appHelper.feedbackButton(requireContext())
}
binding.backupView.setOnClickListener {
appHelper.storeFile(requireActivity())
}
binding.clearView.setOnClickListener {
preferenceHelper.clearAll(context)
Handler(Looper.getMainLooper()).postDelayed({
AppReloader.restartApp(context)
}, 500)
}
binding.restoreView.setOnClickListener {
appHelper.loadFile(requireActivity())
}
}
private fun setupSwitchListeners() {
binding.statueBarSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowStatusBar(isChecked)
}
binding.timeSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowTime(isChecked)
}
binding.dateSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowDate(isChecked)
}
binding.batterySwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowBattery(isChecked)
}
binding.dailyWordSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowDailyWord(isChecked)
}
binding.appIconsSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowAppIcons(isChecked)
// Disable and gray out the other setting if appIconsSwitchCompat is checked
binding.appIconDotsSwitchCompat.isEnabled = isChecked
binding.appIconDotsSwitchCompat.isChecked = false
}
binding.appIconDotsSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowAppIconDots(isChecked)
}
binding.automaticKeyboardSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setAutoKeyboard(isChecked)
}
binding.automaticOpenAppSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setAutoOpenApp(isChecked)
}
binding.lockSettingsSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setLockSettings(isChecked)
}
}
@SuppressLint("ClickableViewAccessibility")
private fun observeSwipeTouchListener() {
binding.apply {
touchArea.setOnTouchListener(getSwipeGestureListener(context))
miscellaneousSearchEngineControl.setOnClickListener {
showSearchEngineDialog()
featuresSettings.setOnClickListener {
navController.navigate(R.id.action_SettingsFragment_to_SettingsFeaturesFragment)
}
miscellaneousLauncherFontsControl.setOnClickListener {
showLauncherFontDialog()
lookFeelSettings.setOnClickListener {
navController.navigate(R.id.action_SettingsFragment_to_SettingsLookFeelFragment)
}
gesturesDoubleTapControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.DoubleTap)
favoriteApps.setOnClickListener {
navController.navigate(R.id.action_SettingsFragment_to_FavoriteFragment)
}
gesturesSwipeUpControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.Up)
hiddenApps.setOnClickListener {
navController.navigate(R.id.action_SettingsFragment_to_HiddenFragment)
}
gesturesSwipeDownControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.Down)
}
gesturesSwipeLeftControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.Left)
}
gesturesSwipeRightControl.setOnClickListener {
swipeActionClickEvent(Constants.Swipe.Right)
advancedSettings.setOnClickListener {
navController.navigate(R.id.action_SettingsFragment_to_SettingsAdvancedFragment)
}
}
}
private fun getSwipeGestureListener(context: Context): View.OnTouchListener {
return object : OnSwipeTouchListener(context) {
override fun onSwipeLeft() {
super.onSwipeLeft()
findNavController().navigateUp()
}
override fun onSwipeRight() {
super.onSwipeRight()
findNavController().navigateUp()
}
}
}
private var searchEngineDialog: AlertDialog? = null
private fun showSearchEngineDialog() {
// Dismiss any existing dialog to prevent multiple dialogs open simultaneously
searchEngineDialog?.dismiss()
// Get the array of SearchEngines enum values
val items = Constants.SearchEngines.entries.toTypedArray()
// Map the enum values to their string representations
val itemStrings = items.map { it.getString(context) }.toTypedArray()
val dialogBuilder = MaterialAlertDialogBuilder(context)
dialogBuilder.setTitle(getString(R.string.settings_select_search_engine))
dialogBuilder.setItems(itemStrings) { _, which ->
val selectedItem = items[which]
preferenceViewModel.setSearchEngine(selectedItem)
binding.miscellaneousSearchEngineControl.text = preferenceHelper.searchEngines.name
}
// Assign the created dialog to launcherFontDialog
searchEngineDialog = dialogBuilder.create()
searchEngineDialog?.show()
}
private var launcherFontDialog: AlertDialog? = null
private fun showLauncherFontDialog() {
// Dismiss any existing dialog to prevent multiple dialogs open simultaneously
launcherFontDialog?.dismiss()
// Get the array of SearchEngines enum values
val items = Constants.Fonts.entries.toTypedArray()
// Map the enum values to their string representations
val itemStrings = items.map { it.getString(context) }.toTypedArray()
val dialogBuilder = MaterialAlertDialogBuilder(context)
dialogBuilder.setTitle(getString(R.string.settings_select_launcher_font))
dialogBuilder.setAdapter(FontAdapter(context, items, itemStrings)) { _, which ->
val selectedItem = items[which]
preferenceViewModel.setLauncherFont(selectedItem)
binding.miscellaneousLauncherFontsControl.text = preferenceHelper.launcherFont.name
// Delay the restart slightly to ensure preferences are saved
Handler(Looper.getMainLooper()).postDelayed({
AppReloader.restartApp(context)
}, 500) // Delay in milliseconds (e.g., 500ms)
}
// Assign the created dialog to launcherFontDialog
launcherFontDialog = dialogBuilder.create()
launcherFontDialog?.show()
}
private var appSelectionDialog: AlertDialog? = null
private fun showAppSelectionDialog(swipeType: Constants.Swipe) {
// Make sure this method is called within a lifecycle owner scope
lifecycleScope.launch(Dispatchers.Main) {
// Dismiss any existing dialog to prevent multiple dialogs open simultaneously
appSelectionDialog?.dismiss()
// Collect the flow of installed apps
appInfoRepository.getDrawApps().collect { installedApps ->
// Extract app names and package names
val appNames = installedApps.map { it.appName }.toTypedArray()
val packageNames = installedApps.map { it.packageName }
// Build and display the dialog
val dialogBuilder = MaterialAlertDialogBuilder(context)
dialogBuilder.setTitle("Select an App")
dialogBuilder.setItems(appNames) { _, which ->
val selectedPackageName = packageNames[which]
when (swipeType) {
Constants.Swipe.DoubleTap,
Constants.Swipe.Up,
Constants.Swipe.Down,
Constants.Swipe.Left,
Constants.Swipe.Right -> handleSwipeAction(swipeType, selectedPackageName)
}
}
// Assign the created dialog to launcherFontDialog
appSelectionDialog = dialogBuilder.create()
appSelectionDialog?.show()
}
}
}
// Add this function to dismiss the dialog if it's showing
private fun dismissDialogs() {
launcherFontDialog?.dismiss()
searchEngineDialog?.dismiss()
appSelectionDialog?.dismiss()
}
private fun swipeActionClickEvent(swipe: Constants.Swipe) {
// Get the array of Action enum values
val actions = Constants.Action.entries.toTypedArray()
// Map the enum values to their string representations
val actionStrings = actions.map { it.getString(context) }.toTypedArray()
val dialog = MaterialAlertDialogBuilder(context)
dialog.setTitle("Select a Action")
dialog.setItems(actionStrings) { _, which ->
val selectedAction = actions[which]
when (swipe) {
Constants.Swipe.DoubleTap -> handleSwipeAction(context, Constants.Swipe.DoubleTap, selectedAction, binding)
Constants.Swipe.Up -> handleSwipeAction(context, Constants.Swipe.Up, selectedAction, binding)
Constants.Swipe.Down -> handleSwipeAction(context, Constants.Swipe.Down, selectedAction, binding)
Constants.Swipe.Left -> handleSwipeAction(context, Constants.Swipe.Left, selectedAction, binding)
Constants.Swipe.Right -> handleSwipeAction(context, Constants.Swipe.Right, selectedAction, binding)
}
}
dialog.show()
}
private fun handleSwipeAction(swipeType: Constants.Swipe, selectedPackageName: String) {
val selectedApp = context.getAppNameFromPackageName(selectedPackageName)
when (swipeType) {
Constants.Swipe.DoubleTap -> {
binding.gesturesDoubleTapControl.text = "Open $selectedApp"
preferenceHelper.doubleTapApp = selectedPackageName
}
Constants.Swipe.Up -> {
binding.gesturesSwipeUpControl.text = "Open $selectedApp"
preferenceHelper.swipeUpApp = selectedPackageName
}
Constants.Swipe.Down -> {
binding.gesturesSwipeDownControl.text = "Open $selectedApp"
preferenceHelper.swipeDownApp = selectedPackageName
}
Constants.Swipe.Left -> {
binding.gesturesSwipeLeftControl.text = "Open $selectedApp"
preferenceHelper.swipeLeftApp = selectedPackageName
}
Constants.Swipe.Right -> {
binding.gesturesSwipeRightControl.text = "Open $selectedApp"
preferenceHelper.swipeRightApp = selectedPackageName
}
}
}
// Function to handle setting action and updating UI
private fun handleSwipeAction(context: Context, swipe: Constants.Swipe, action: Constants.Action, binding: FragmentSettingsBinding) {
preferenceViewModel.setSwipeAction(swipe, action)
when (action) {
Constants.Action.OpenApp -> {
val selectedApp = when (swipe) {
Constants.Swipe.DoubleTap -> context.getAppNameFromPackageName(preferenceHelper.doubleTapApp)
Constants.Swipe.Up -> context.getAppNameFromPackageName(preferenceHelper.swipeUpApp)
Constants.Swipe.Down -> context.getAppNameFromPackageName(preferenceHelper.swipeDownApp)
Constants.Swipe.Left -> context.getAppNameFromPackageName(preferenceHelper.swipeLeftApp)
Constants.Swipe.Right -> context.getAppNameFromPackageName(preferenceHelper.swipeRightApp)
}
binding.apply {
when (swipe) {
Constants.Swipe.DoubleTap -> gesturesDoubleTapControl.text = "Open $selectedApp"
Constants.Swipe.Up -> gesturesSwipeUpControl.text = "Open $selectedApp"
Constants.Swipe.Down -> gesturesSwipeDownControl.text = "Open $selectedApp"
Constants.Swipe.Left -> gesturesSwipeLeftControl.text = "Open $selectedApp"
Constants.Swipe.Right -> gesturesSwipeRightControl.text = "Open $selectedApp"
}
}
showAppSelectionDialog(swipe)
}
else -> {
Log.d("doubleTapAction", preferenceHelper.doubleTapAction.getString(context))
binding.apply {
when (swipe) {
Constants.Swipe.DoubleTap -> gesturesDoubleTapControl.text = preferenceHelper.doubleTapAction.getString(context)
Constants.Swipe.Up -> gesturesSwipeUpControl.text = preferenceHelper.swipeUpAction.getString(context)
Constants.Swipe.Down -> gesturesSwipeDownControl.text = preferenceHelper.swipeDownAction.getString(context)
Constants.Swipe.Left -> gesturesSwipeLeftControl.text = preferenceHelper.swipeLeftAction.getString(context)
Constants.Swipe.Right -> gesturesSwipeRightControl.text = preferenceHelper.swipeRightAction.getString(context)
}
}
}
}
}
// Extension function to set swipe action in ViewModel
private fun PreferenceViewModel.setSwipeAction(swipe: Constants.Swipe, action: Constants.Action) {
when (swipe) {
Constants.Swipe.DoubleTap -> setDoubleTap(action)
Constants.Swipe.Up -> setSwipeUp(action)
Constants.Swipe.Down -> setSwipeDown(action)
Constants.Swipe.Left -> setSwipeLeft(action)
Constants.Swipe.Right -> setSwipeRight(action)
}
}
override fun onStop() {
super.onStop()
dismissDialogs()
}
}

View File

@@ -0,0 +1,213 @@
package com.github.droidworksstudio.launcher.ui.settings
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.navigation.NavController
import androidx.navigation.fragment.findNavController
import com.github.droidworksstudio.launcher.R
import com.github.droidworksstudio.launcher.adapter.font.FontAdapter
import com.github.droidworksstudio.launcher.databinding.FragmentSettingsLookFeelBinding
import com.github.droidworksstudio.launcher.helper.AppHelper
import com.github.droidworksstudio.launcher.helper.AppReloader
import com.github.droidworksstudio.launcher.helper.PreferenceHelper
import com.github.droidworksstudio.launcher.listener.ScrollEventListener
import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.AlignmentBottomSheetDialogFragment
import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.ColorBottomSheetDialogFragment
import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.PaddingBottomSheetDialogFragment
import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.TextBottomSheetDialogFragment
import com.github.droidworksstudio.launcher.utils.Constants
import com.github.droidworksstudio.launcher.viewmodel.PreferenceViewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
@AndroidEntryPoint
class SettingsLookFeelFragment : Fragment(),
ScrollEventListener {
private var _binding: FragmentSettingsLookFeelBinding? = null
private val binding get() = _binding!!
private val preferenceViewModel: PreferenceViewModel by viewModels()
@Inject
lateinit var preferenceHelper: PreferenceHelper
@Inject
lateinit var appHelper: AppHelper
private lateinit var navController: NavController
private lateinit var context: Context
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View {
// Inflate the layout for this fragment
_binding = FragmentSettingsLookFeelBinding.inflate(inflater, container, false)
_binding = binding
return binding.root
}
// Called after the fragment view is created
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
navController = findNavController()
// Set according to the system theme mode
appHelper.dayNightMod(requireContext(), binding.nestScrollView)
super.onViewCreated(view, savedInstanceState)
context = requireContext()
initializeInjectedDependencies()
observeClickListener()
binding.apply {
miscellaneousLauncherFontsControl.text = preferenceHelper.launcherFont.getString(context)
}
}
override fun onStop() {
super.onStop()
dismissDialogs()
}
private fun initializeInjectedDependencies() {
binding.nestScrollView.scrollEventListener = this
// Set initial values and listeners for switches
binding.apply {
statueBarSwitchCompat.isChecked = preferenceHelper.showStatusBar
timeSwitchCompat.isChecked = preferenceHelper.showTime
dateSwitchCompat.isChecked = preferenceHelper.showDate
batterySwitchCompat.isChecked = preferenceHelper.showBattery
dailyWordSwitchCompat.isChecked = preferenceHelper.showDailyWord
appIconsSwitchCompat.isChecked = preferenceHelper.showAppIcon
appIconDotsSwitchCompat.isChecked = preferenceHelper.showAppIconAsDots
}
if (!binding.appIconsSwitchCompat.isChecked) {
// Disable and gray out the other setting if appIconsSwitchCompat is checked
binding.appIconDotsSwitchCompat.apply {
isEnabled = binding.appIconsSwitchCompat.isChecked
isChecked = false
}
}
}
private fun observeClickListener() {
setupSwitchListeners()
binding.apply {
selectAppearanceTextSize.setOnClickListener {
val bottomSheetFragment = TextBottomSheetDialogFragment()
bottomSheetFragment.show(parentFragmentManager, "BottomSheetDialog")
}
selectAppearanceColor.setOnClickListener {
val bottomSheetFragment = ColorBottomSheetDialogFragment()
bottomSheetFragment.show(parentFragmentManager, "BottomSheetDialog")
}
selectAppearanceAlignment.setOnClickListener {
val bottomSheetFragment = AlignmentBottomSheetDialogFragment()
bottomSheetFragment.show(parentFragmentManager, "BottomSheetDialog")
}
selectAppearancePadding.setOnClickListener {
val bottomSheetFragment = PaddingBottomSheetDialogFragment()
bottomSheetFragment.show(parentFragmentManager, "BottomSheetDialog")
}
setAppWallpaper.setOnClickListener {
val intent = Intent(Intent.ACTION_SET_WALLPAPER)
startActivity(Intent.createChooser(intent, "Select Wallpaper"))
}
miscellaneousLauncherFontsControl.setOnClickListener {
showLauncherFontDialog()
}
}
}
private fun setupSwitchListeners() {
binding.apply {
statueBarSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowStatusBar(isChecked)
}
dateSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowDate(isChecked)
}
timeSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowTime(isChecked)
}
batterySwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowBattery(isChecked)
}
dailyWordSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowDailyWord(isChecked)
}
appIconsSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowAppIcons(isChecked)
// Disable and gray out the other setting if appIconsSwitchCompat is checked
binding.appIconDotsSwitchCompat.isEnabled = isChecked
binding.appIconDotsSwitchCompat.isChecked = false
}
appIconDotsSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setShowAppIconDots(isChecked)
}
}
}
private var launcherFontDialog: AlertDialog? = null
private fun showLauncherFontDialog() {
// Dismiss any existing dialog to prevent multiple dialogs open simultaneously
launcherFontDialog?.dismiss()
// Get the array of SearchEngines enum values
val items = Constants.Fonts.entries.toTypedArray()
// Map the enum values to their string representations
val itemStrings = items.map { it.getString(context) }.toTypedArray()
val dialogBuilder = MaterialAlertDialogBuilder(context)
dialogBuilder.setTitle(getString(R.string.settings_select_launcher_font))
dialogBuilder.setAdapter(FontAdapter(context, items, itemStrings)) { _, which ->
val selectedItem = items[which]
preferenceViewModel.setLauncherFont(selectedItem)
binding.miscellaneousLauncherFontsControl.text = preferenceHelper.launcherFont.name
// Delay the restart slightly to ensure preferences are saved
Handler(Looper.getMainLooper()).postDelayed({
AppReloader.restartApp(context)
}, 500) // Delay in milliseconds (e.g., 500ms)
}
// Assign the created dialog to launcherFontDialog
launcherFontDialog = dialogBuilder.create()
launcherFontDialog?.show()
}
private fun dismissDialogs() {
launcherFontDialog?.dismiss()
}
}

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="m5.9,10q-0.9,0 -1.5,0.6 -0.6,0.6 -0.6,1.4 0,0.8 0.6,1.4 0.6,0.6 1.5,0.6 0.8,0 1.4,-0.6 0.6,-0.6 0.6,-1.4 0,-0.8 -0.6,-1.4 -0.6,-0.6 -1.4,-0.6zM12,10q-0.8,0 -1.4,0.6 -0.6,0.6 -0.6,1.4 0,0.8 0.6,1.4 0.6,0.6 1.4,0.6 0.8,0 1.4,-0.6 0.6,-0.6 0.6,-1.4 0,-0.8 -0.6,-1.4 -0.6,-0.6 -1.4,-0.6zM18.1,10q-0.8,0 -1.4,0.6 -0.6,0.6 -0.6,1.4 0,0.8 0.6,1.4 0.6,0.6 1.4,0.6 0.9,0 1.4,-0.6 0.6,-0.6 0.6,-1.4 0,-0.8 -0.6,-1.4 -0.5,-0.6 -1.4,-0.6z" />
</vector>

View File

@@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:pathData="M12,12m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M12,17V11"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,8m-1,-0a1,1 0,1 0,2 -0a1,1 0,1 0,-2 -0" />
</vector>

View File

@@ -0,0 +1,63 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:pathData="M4,6V12C4,12 4,15 11,15C11.592,15 12.135,14.979 12.631,14.939"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M18,6V12"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M11,3C18,3 18,6 18,6C18,6 18,9 11,9C4,9 4,6 4,6C4,6 4,3 11,3Z"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M11,21C4,21 4,18 4,18V12"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M22.666,17.667C22.048,16.097 20.635,15 18.99,15C17.232,15 15.738,16.254 15.197,18"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M20.995,17.667H22.666V17.667C22.851,17.667 23,17.517 23,17.333V15.444"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M15.334,20.333C15.952,21.903 17.365,23 19.01,23C20.768,23 22.262,21.746 22.803,20"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M17.005,20.333H15.334V20.333C15.149,20.333 15,20.483 15,20.667V22.556"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>

View File

@@ -0,0 +1,49 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:pathData="M22,22L2,22"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M2,11L6.063,7.75M22,11L13.874,4.499C12.778,3.623 11.222,3.623 10.126,4.499L9.344,5.125"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M15.5,5.5V3.5C15.5,3.224 15.724,3 16,3H18.5C18.776,3 19,3.224 19,3.5V8.5"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M4,22V9.5"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M20,9.5V13.5M20,22V17.5"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M15,22V17C15,15.586 15,14.879 14.561,14.439C14.121,14 13.414,14 12,14C10.586,14 9.879,14 9.439,14.439M9,22V17"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M14,9.5C14,10.605 13.105,11.5 12,11.5C10.895,11.5 10,10.605 10,9.5C10,8.395 10.895,7.5 12,7.5C13.105,7.5 14,8.395 14,9.5Z"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF" />
</vector>

View File

@@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:fillType="evenOdd"
android:pathData="m12,16.9c-2.5,0 -4.5,-2 -4.5,-4.5 0,-2.5 2,-4.5 4.5,-4.5 2.5,0 4.5,2 4.5,4.5 0,2.5 -2,4.5 -4.5,4.5zM15,12.4c0,-1.7 -1.3,-3 -3,-3 -1.7,0 -3,1.3 -3,3 0,1.6 1.3,3 3,3 1.7,0 3,-1.4 3,-3z" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="m12,18.9c-2.8,0 -5.5,1.2 -7.4,3.2l-0.5,0.6 1.1,1 0.5,-0.6c1.7,-1.7 3.9,-2.7 6.3,-2.7 2.4,0 4.6,1 6.3,2.7l0.5,0.6 1.1,-1 -0.5,-0.6c-1.9,-2 -4.6,-3.2 -7.4,-3.2z" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="m18.2,9v1.5c1.8,0 3.4,0.7 4.6,2l1.1,-1c-1.5,-1.6 -3.6,-2.5 -5.7,-2.5z" />
<path
android:fillColor="#FFFFFFFF"
android:fillType="evenOdd"
android:pathData="m18.2,7.3c-2,0 -3.6,-1.6 -3.6,-3.5 0,-2 1.6,-3.6 3.6,-3.6 2,0 3.6,1.6 3.6,3.6 0,1.9 -1.6,3.5 -3.6,3.5zM20.3,3.8c0,-1.2 -1,-2.1 -2.1,-2.1 -1.2,0 -2.1,0.9 -2.1,2.1 0,1.1 0.9,2 2.1,2 1.1,0 2.1,-0.9 2.1,-2z" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="m5.8,9c-2.1,0 -4.2,0.9 -5.7,2.5l1.1,1c1.2,-1.3 2.9,-2 4.6,-2z" />
<path
android:fillColor="#FFFFFFFF"
android:fillType="evenOdd"
android:pathData="m5.8,7.3c-2,0 -3.6,-1.6 -3.6,-3.5 0,-2 1.6,-3.6 3.6,-3.6 2,0 3.6,1.6 3.6,3.6 0,1.9 -1.6,3.5 -3.6,3.5zM7.9,3.8c0,-1.2 -0.9,-2.1 -2.1,-2.1 -1.1,0 -2.1,0.9 -2.1,2.1 0,1.1 1,2 2.1,2 1.2,0 2.1,-0.9 2.1,-2z" />
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="19"
android:viewportHeight="19">
<path
android:fillColor="#FFFFFFFF"
android:pathData="m13.673,10.779 l0.798,4.02c0.221,1.11 -0.407,1.566 -1.395,1.013L9.5,13.81l-3.576,2.002c-0.988,0.553 -1.616,0.097 -1.395,-1.013l0.397,-2.001 0.401,-2.02 -1.51,-1.397 -1.498,-1.385c-0.832,-0.769 -0.592,-1.507 0.532,-1.64l2.026,-0.24 2.044,-0.242 1.717,-3.722c0.474,-1.028 1.25,-1.028 1.724,0l1.717,3.722 2.044,0.242 2.026,0.24c1.124,0.133 1.364,0.871 0.533,1.64L15.184,9.38z" />
</vector>

View File

@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:pathData="M12.714,3.441L15.03,8.097C15.144,8.331 15.367,8.494 15.627,8.534L20.813,9.283C21.023,9.312 21.213,9.422 21.341,9.589C21.468,9.757 21.522,9.968 21.491,10.175C21.465,10.345 21.383,10.502 21.256,10.621L17.501,14.259C17.311,14.439 17.226,14.7 17.274,14.955L18.179,20.083C18.245,20.505 17.955,20.902 17.528,20.975C17.352,21.002 17.171,20.974 17.012,20.894L12.388,18.478C12.157,18.352 11.877,18.352 11.646,18.478L6.994,20.912C6.604,21.11 6.125,20.963 5.917,20.582C5.836,20.429 5.808,20.254 5.836,20.083L6.741,14.955C6.785,14.701 6.7,14.441 6.515,14.259L2.732,10.621C2.423,10.312 2.423,9.815 2.732,9.506C2.858,9.391 3.015,9.313 3.184,9.283L8.37,8.534C8.629,8.491 8.851,8.329 8.967,8.097L11.284,3.441C11.375,3.253 11.54,3.108 11.741,3.041C11.942,2.974 12.162,2.99 12.352,3.085C12.508,3.163 12.634,3.288 12.714,3.441Z"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>

View File

@@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:pathData="M9,10C9,9.407 9.176,8.827 9.506,8.333C9.835,7.84 10.304,7.455 10.852,7.228C11.4,7.001 12.003,6.942 12.585,7.058C13.167,7.173 13.702,7.459 14.121,7.879C14.541,8.298 14.827,8.833 14.942,9.415C15.058,9.997 14.999,10.6 14.772,11.148C14.545,11.696 14.16,12.165 13.667,12.494C13.173,12.824 12.593,13 12,13V14M21,12C21,16.971 16.971,21 12,21C7.029,21 3,16.971 3,12C3,7.029 7.029,3 12,3C16.971,3 21,7.029 21,12Z"
android:strokeWidth="2"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,17m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0" />
</vector>

View File

@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:pathData="M4,4L9.879,9.879M20,20L14.121,14.121M9.879,9.879C9.336,10.422 9,11.172 9,12C9,13.657 10.343,15 12,15C12.828,15 13.578,14.664 14.121,14.121M9.879,9.879L14.121,14.121M6.768,6.768C4.728,8.099 2.964,10.026 2,12C3.746,15.576 8.122,19 12,19C13.738,19 15.575,18.312 17.232,17.232M9.761,5.347C10.511,5.123 11.265,5 12,5C15.878,5 20.253,8.424 22,12C21.448,13.13 20.634,14.245 19.655,15.241"
android:strokeWidth="2"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>

View File

@@ -0,0 +1,23 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="m7.4,14.9c-1.9,-0.1 -3.5,1.6 -3.5,3.6v0.7c0,1.2 -0.7,2.2 -1.7,2.5h1.7,3.3c2,0 3.6,-1.5 3.6,-3.5 -0.1,-1.8 -1.5,-3.3 -3.4,-3.3z"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="m8.4,15l11.3,-10.1c0.5,-0.5 1.3,-0.5 1.8,0 0.4,0.4 0.4,1.2 0,1.6l-10.7,11.4"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>

View File

@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M7.378,11.63H6.628H7.378ZM7.378,12.556L6.816,13.053C6.951,13.206 7.143,13.297 7.347,13.305C7.551,13.313 7.749,13.238 7.897,13.097L7.378,12.556ZM9.519,11.541C9.818,11.255 9.828,10.78 9.541,10.481C9.255,10.182 8.78,10.172 8.481,10.459L9.519,11.541ZM6.561,10.503C6.287,10.193 5.813,10.164 5.503,10.439C5.193,10.713 5.164,11.187 5.439,11.497L6.561,10.503ZM14.932,9.009C15.213,9.313 15.688,9.332 15.991,9.051C16.296,8.769 16.314,8.295 16.033,7.991L14.932,9.009ZM12.044,6.25C9.058,6.25 6.628,8.653 6.628,11.63H8.128C8.128,9.493 9.875,7.75 12.044,7.75V6.25ZM6.628,11.63L6.628,12.556H8.128L8.128,11.63H6.628ZM7.897,13.097L9.519,11.541L8.481,10.459L6.859,12.014L7.897,13.097ZM7.939,12.058L6.561,10.503L5.439,11.497L6.816,13.053L7.939,12.058ZM16.033,7.991C15.043,6.921 13.621,6.25 12.044,6.25V7.75C13.188,7.75 14.215,8.235 14.932,9.009L16.033,7.991Z" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="M16.619,11.444L17.18,10.946C17.044,10.794 16.852,10.703 16.649,10.695C16.445,10.687 16.246,10.762 16.099,10.903L16.619,11.444ZM14.481,12.458C14.182,12.745 14.172,13.22 14.459,13.519C14.746,13.817 15.221,13.827 15.519,13.54L14.481,12.458ZM17.439,13.497C17.714,13.807 18.188,13.835 18.498,13.56C18.808,13.285 18.836,12.811 18.561,12.501L17.439,13.497ZM9.047,15.005C8.763,14.703 8.289,14.688 7.987,14.971C7.685,15.255 7.67,15.729 7.953,16.031L9.047,15.005ZM11.935,17.75C14.928,17.75 17.369,15.35 17.369,12.37H15.869C15.869,14.505 14.116,16.25 11.935,16.25V17.75ZM17.369,12.37V11.444H15.869V12.37H17.369ZM16.099,10.903L14.481,12.458L15.519,13.54L17.138,11.985L16.099,10.903ZM16.058,11.943L17.439,13.497L18.561,12.501L17.18,10.946L16.058,11.943ZM7.953,16.031C8.945,17.088 10.363,17.75 11.935,17.75V16.25C10.792,16.25 9.765,15.77 9.047,15.005L7.953,16.031Z" />
<path
android:fillColor="#00000000"
android:pathData="M7,3.338C8.471,2.487 10.179,2 12,2C17.523,2 22,6.477 22,12C22,17.523 17.523,22 12,22C6.477,22 2,17.523 2,12C2,10.179 2.487,8.471 3.338,7"
android:strokeWidth="1.5"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round" />
</vector>

View File

@@ -0,0 +1,27 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:fillType="evenOdd"
android:pathData="M15.75,6C15.75,3.929 14.071,2.25 12,2.25C9.929,2.25 8.25,3.929 8.25,6C8.25,8.071 9.929,9.75 12,9.75C14.071,9.75 15.75,8.071 15.75,6ZM12,3.75C13.243,3.75 14.25,4.757 14.25,6C14.25,7.243 13.243,8.25 12,8.25C10.757,8.25 9.75,7.243 9.75,6C9.75,4.757 10.757,3.75 12,3.75Z" />
<path
android:fillColor="#FFFFFFFF"
android:fillType="evenOdd"
android:pathData="M9.25,18C9.25,15.929 7.571,14.25 5.5,14.25C3.429,14.25 1.75,15.929 1.75,18C1.75,20.071 3.429,21.75 5.5,21.75C7.571,21.75 9.25,20.071 9.25,18ZM5.5,15.75C6.743,15.75 7.75,16.757 7.75,18C7.75,19.243 6.743,20.25 5.5,20.25C4.257,20.25 3.25,19.243 3.25,18C3.25,16.757 4.257,15.75 5.5,15.75Z" />
<path
android:fillColor="#FFFFFFFF"
android:fillType="evenOdd"
android:pathData="M18.5,14.25C20.571,14.25 22.25,15.929 22.25,18C22.25,20.071 20.571,21.75 18.5,21.75C16.429,21.75 14.75,20.071 14.75,18C14.75,15.929 16.429,14.25 18.5,14.25ZM20.75,18C20.75,16.757 19.743,15.75 18.5,15.75C17.257,15.75 16.25,16.757 16.25,18C16.25,19.243 17.257,20.25 18.5,20.25C19.743,20.25 20.75,19.243 20.75,18Z" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="M7.205,7.562C7.515,7.288 7.545,6.814 7.271,6.504C6.997,6.193 6.523,6.164 6.212,6.438C4.397,8.04 3.25,10.387 3.25,13C3.25,13.414 3.586,13.75 4,13.75C4.414,13.75 4.75,13.414 4.75,13C4.75,10.835 5.698,8.892 7.205,7.562Z" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="M17.788,6.438C17.477,6.164 17.003,6.193 16.729,6.504C16.455,6.814 16.485,7.288 16.795,7.562C18.302,8.892 19.25,10.835 19.25,13C19.25,13.414 19.586,13.75 20,13.75C20.414,13.75 20.75,13.414 20.75,13C20.75,10.387 19.603,8.04 17.788,6.438Z" />
<path
android:fillColor="#FFFFFFFF"
android:pathData="M10.187,20.022C9.786,19.918 9.377,20.16 9.274,20.561C9.17,20.962 9.412,21.371 9.813,21.474C10.513,21.654 11.246,21.75 12,21.75C12.754,21.75 13.487,21.654 14.187,21.474C14.588,21.371 14.83,20.962 14.726,20.561C14.623,20.16 14.214,19.918 13.813,20.022C13.234,20.171 12.627,20.25 12,20.25C11.373,20.25 10.766,20.171 10.187,20.022Z" />
</vector>

View File

@@ -5,6 +5,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:fillColor="#FFFFFFFF"
android:pathData="M17.65,6.35c-1.63,-1.63 -3.94,-2.57 -6.48,-2.31c-3.67,0.37 -6.69,3.35 -7.1,7.02C3.52,15.91 7.27,20 12,20c3.19,0 5.93,-1.87 7.21,-4.57c0.31,-0.66 -0.16,-1.43 -0.89,-1.43h-0.01c-0.37,0 -0.72,0.2 -0.88,0.53c-1.13,2.43 -3.84,3.97 -6.81,3.32c-2.22,-0.49 -4.01,-2.3 -4.49,-4.52C5.31,9.44 8.26,6 12,6c1.66,0 3.14,0.69 4.22,1.78l-2.37,2.37C13.54,10.46 13.76,11 14.21,11H19c0.55,0 1,-0.45 1,-1V5.21c0,-0.45 -0.54,-0.67 -0.85,-0.35L17.65,6.35z" />
</vector>

View File

@@ -28,7 +28,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="12dp"
android:text="@string/bottom_alignment_star"
android:text="@string/bottom_alignment_start"
android:textSize="@dimen/text_large">
</androidx.appcompat.widget.AppCompatTextView>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,273 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.settings.SettingsFragment">
<com.github.droidworksstudio.launcher.view.GestureNestedScrollView
android:id="@+id/nestScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false"
android:fadingEdgeLength="48dp"
android:fillViewport="true"
android:overScrollMode="never"
android:requiresFadingEdge="vertical"
android:scrollbars="none"
tools:ignore="TooManyViews">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="142dp"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="24dp">
<TextView
android:id="@+id/headerTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="24dp"
android:text="@string/advanced_settings_title"
android:textColor="@android:color/white"
android:textSize="24sp"
android:textStyle="bold" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/appInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/advanced_settings_app_info"
android:src="@drawable/ic_app_info" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/appInfoTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_app_info"
android:textColor="@android:color/white"
android:textSize="18sp" />
<TextView
android:id="@+id/appInfoDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_app_info_description"
android:textColor="@android:color/darker_gray"
android:textSize="14sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/setDefaultLauncher"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/advanced_settings_default"
android:src="@drawable/ic_change_default_launcher" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_default"
android:textColor="@android:color/white"
android:textSize="18sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/restartLauncher"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/advanced_settings_restart_title"
android:src="@drawable/ic_restart" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_restart_title"
android:textColor="@android:color/white"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_restart_description"
android:textColor="@android:color/darker_gray"
android:textSize="14sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/backupRestore"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/advanced_settings_backup_restore_title"
android:src="@drawable/ic_backup_restore" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_backup_restore_title"
android:textColor="@android:color/white"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_backup_restore_description"
android:textColor="@android:color/darker_gray"
android:textSize="14sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/helpFeedback"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/advanced_settings_help_feedback_title"
android:src="@drawable/ic_help_feedback" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_help_feedback_title"
android:textColor="@android:color/white"
android:textSize="18sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/communitySupport"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/advanced_settings_community_support_title"
android:src="@drawable/ic_community" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_community_support_title"
android:textColor="@android:color/white"
android:textSize="18sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/shareApplication"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/advanced_settings_share_application_title"
android:src="@drawable/ic_share_app" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/advanced_settings_share_application_title"
android:textColor="@android:color/white"
android:textSize="18sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
</com.github.droidworksstudio.launcher.view.GestureNestedScrollView>
</FrameLayout>

View File

@@ -0,0 +1,385 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.settings.SettingsFeaturesFragment">
<com.github.droidworksstudio.launcher.view.GestureNestedScrollView
android:id="@+id/nestScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false"
android:fadingEdgeLength="48dp"
android:fillViewport="true"
android:overScrollMode="never"
android:requiresFadingEdge="vertical"
android:scrollbars="none"
tools:ignore="TooManyViews">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="42dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/headerIcon"
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:contentDescription="@string/features_settings_title"
android:src="@drawable/ic_feature" />
<TextView
android:id="@+id/headerTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="24dp"
android:text="@string/features_settings_title"
android:textSize="24sp"
android:textStyle="bold" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_title_home_behavior_preferences"
android:textColor="@color/icon_200"
android:textSize="@dimen/text_large" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/automaticKeyboard_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_automatic_keyboard"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/automaticKeyboard_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck,DuplicateSpeakableTextCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/automaticOpenApp_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_auto_open_apps"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/automaticOpenApp_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/lockSettings_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_lock_settings"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/lockSettings_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_title_gestures"
android:textColor="@color/icon_200"
android:textSize="@dimen/text_large" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_double_tap_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_double_tap"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_double_tap_control"
style="@style/TextDefaultStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center"
android:text="@string/settings_double_tap"
android:textSize="@dimen/text_large"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_swipe_up_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_swipe_up"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_swipe_up_control"
style="@style/TextDefaultStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center"
android:text="@string/settings_swipe_up"
android:textSize="@dimen/text_large"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_swipe_down_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_swipe_down"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_swipe_down_control"
style="@style/TextDefaultStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center"
android:text="@string/settings_swipe_down"
android:textSize="@dimen/text_large"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_swipe_left_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_swipe_left"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_swipe_left_control"
style="@style/TextDefaultStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center"
android:text="@string/settings_swipe_left"
android:textSize="@dimen/text_large"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_swipe_right_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_swipe_right"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gestures_swipe_right_control"
style="@style/TextDefaultStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center"
android:text="@string/settings_swipe_right"
android:textSize="@dimen/text_large"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_title_miscellaneous"
android:textColor="@color/icon_200"
android:textSize="@dimen/text_large" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/miscellaneous_searchEngine_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_search_engine"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/miscellaneous_searchEngine_control"
style="@style/TextDefaultStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center"
android:text="@string/search"
android:textSize="@dimen/text_large"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</com.github.droidworksstudio.launcher.view.GestureNestedScrollView>
</FrameLayout>

View File

@@ -0,0 +1,436 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.settings.SettingsLookFeelFragment">
<com.github.droidworksstudio.launcher.view.GestureNestedScrollView
android:id="@+id/nestScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false"
android:fadingEdgeLength="48dp"
android:fillViewport="true"
android:overScrollMode="never"
android:requiresFadingEdge="vertical"
android:scrollbars="none"
tools:ignore="TooManyViews">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="42dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/headerIcon"
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:contentDescription="@string/look_feel_settings_title"
android:src="@drawable/ic_look_feel" />
<TextView
android:id="@+id/headerTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="24dp"
android:text="@string/look_feel_settings_title"
android:textSize="24sp"
android:textStyle="bold" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_title_home_display_preferences"
android:textColor="@color/icon_200"
android:textSize="@dimen/text_large" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/statue_bar_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_status_bar"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/statue_bar_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="DuplicateSpeakableTextCheck,TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/date_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_date"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/date_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/time_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_time"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/time_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/battery_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_battery"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/battery_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/dailyWord_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_daily_word"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/dailyWord_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/appIcons_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_app_icons"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/appIcons_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/appIconDots_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_display_app_icon_dots"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/appIconDots_switchCompat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="0.7"
android:scaleY="0.8"
android:thumb="@drawable/shape_switch_thumb"
app:track="@drawable/selector_switch"
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_title_home_appearance_preferences"
android:textColor="@color/icon_200"
android:textSize="@dimen/text_large" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/select_appearance_text_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_appearance_text_size_title"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/select_appearance_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_appearance_color_title"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/select_appearance_alignment"
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_marginVertical="10dp"
tools:ignore="MissingConstraints,TextSizeCheck">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_appearance_alignment_title"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/select_appearance_padding"
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_marginVertical="10dp"
tools:ignore="MissingConstraints,TextSizeCheck">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_appearance_padding_title"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/set_app_wallpaper"
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_marginVertical="10dp"
tools:ignore="MissingConstraints,TextSizeCheck">
<androidx.appcompat.widget.AppCompatTextView
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_appearance_wallpaper"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/miscellaneous_launcherFonts_text"
style="@style/TextDefaultStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_launcher_font"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/miscellaneous_launcherFonts_control"
style="@style/TextDefaultStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center"
android:text="@string/settings_font_system"
android:textSize="@dimen/text_large"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</com.github.droidworksstudio.launcher.view.GestureNestedScrollView>
</FrameLayout>

View File

@@ -30,7 +30,7 @@
<fragment
android:id="@+id/SettingsFragment"
android:name="com.github.droidworksstudio.launcher.ui.settings.SettingsFragment"
android:label="@string/home_fragment_label"
android:label="@string/settings_fragment_label"
tools:layout="@layout/fragment_settings">
<action
android:id="@+id/action_SettingsFragment_to_FavoriteFragment"
@@ -38,6 +38,18 @@
<action
android:id="@+id/action_SettingsFragment_to_HiddenFragment"
app:destination="@id/HiddenFragment" />
<action
android:id="@+id/action_SettingsFragment_to_SettingsAdvancedFragment"
app:destination="@id/SettingsAdvancedFragment" />
<action
android:id="@+id/action_SettingsFragment_to_SettingsFeaturesFragment"
app:destination="@id/SettingsFeaturesFragment" />
<action
android:id="@+id/action_SettingsFragment_to_SettingsLookFeelFragment"
app:destination="@id/SettingsLookFeelFragment" />
<action
android:id="@+id/action_SettingsFragment_to_WidgetsFragment"
app:destination="@id/WidgetsFragment" />
<action
android:id="@+id/action_SettingsFragment_to_WidgetsSettingsFragment"
app:destination="@id/WidgetsSettingsFragment" />
@@ -55,10 +67,16 @@
</fragment>
<fragment
android:id="@+id/WidgetsSettingsFragment"
android:name="com.github.droidworksstudio.launcher.ui.widgets.settings.SettingsFragment"
android:label="@string/widgets_fragment_label"
tools:layout="@layout/fragment_settings_widgets" />
android:id="@+id/SettingsFeaturesFragment"
android:name="com.github.droidworksstudio.launcher.ui.settings.SettingsFeaturesFragment"
android:label="@string/settings_fragment_label"
tools:layout="@layout/fragment_settings_features" />
<fragment
android:id="@+id/SettingsLookFeelFragment"
android:name="com.github.droidworksstudio.launcher.ui.settings.SettingsLookFeelFragment"
android:label="@string/settings_fragment_label"
tools:layout="@layout/fragment_settings_look_feel" />
<fragment
android:id="@+id/DrawFragment"
@@ -72,10 +90,22 @@
android:label="@string/favorite_fragment_label"
tools:layout="@layout/fragment_favorite" />
<fragment
android:id="@+id/SettingsAdvancedFragment"
android:name="com.github.droidworksstudio.launcher.ui.settings.SettingsAdvancedFragment"
android:label="@string/settings_fragment_label"
tools:layout="@layout/fragment_settings_advanced" />
<fragment
android:id="@+id/HiddenFragment"
android:name="com.github.droidworksstudio.launcher.ui.hidden.HiddenFragment"
android:label="@string/hidden_fragment_label"
tools:layout="@layout/fragment_hidden" />
<fragment
android:id="@+id/WidgetsSettingsFragment"
android:name="com.github.droidworksstudio.launcher.ui.widgets.settings.SettingsFragment"
android:label="@string/widgets_fragment_label"
tools:layout="@layout/fragment_settings_widgets" />
</navigation>

View File

@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="search_view_hint">#FFFFFFFF</color>
<color name="search_button_background">#56A1E6</color>
@@ -27,4 +24,7 @@
<color name="green">#4CAF50</color>
<color name="orange">#AF684C</color>
<color name="red">#AF4C4C</color>
<color name="icon_200">#33FFFFFF</color>
<color name="icon_700">#B3FFFFFF</color>
</resources>

View File

@@ -7,12 +7,12 @@
<item name="android:windowDisablePreview">true</item>
<!-- Primary brand color. -->
<item name="colorPrimary">@color/teal_700</item>
<item name="colorPrimaryVariant">@color/teal_200</item>
<item name="colorPrimary">@color/icon_700</item>
<item name="colorPrimaryVariant">@color/icon_200</item>
<item name="colorOnPrimary">?attr/color</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorSecondary">@color/icon_200</item>
<item name="colorSecondaryVariant">@color/icon_700</item>
<item name="colorOnSecondary">@color/white</item>
<item name="colorSurface">@color/black</item>
<item name="primaryTextShadowColor">@color/whiteTrans50</item>

View File

@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="search_view_hint">#FFFFFFFF</color>
<color name="search_button_background">#56A1E6</color>
@@ -27,4 +24,7 @@
<color name="green">#4CAF50</color>
<color name="orange">#AF684C</color>
<color name="red">#AF4C4C</color>
<color name="icon_200">#33000000</color>
<color name="icon_700">#B3000000</color>
</resources>

View File

@@ -1,7 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Strings used for basic parts of the launcher -->
<string name="favorite_apps">Favorite Apps</string>
<string name="hidden_apps">Hidden Apps</string>
<!-- Strings used for actions within the app -->
<string name="action_settings">Settings</string>
<string name="action_settings_default">Set as default launcher</string>
<!-- Strings used for settings menus -->
<string name="settings_name">Launcher Settings</string>
<string name="settings_features_title">Features</string>
<string name="settings_features_description">Improve your productivity.</string>
<string name="settings_look_feel_title">Look and Feel</string>
<string name="settings_look_feel_description">Give your home screen a personal touch.</string>
<string name="settings_advanced_title">Advanced</string>
<!-- Strings used for look And feel settings -->
<string name="look_feel_settings_title">Look And Feel</string>
<!-- Strings used for features settings -->
<string name="features_settings_title">Features</string>
<!-- Strings used for advanced settings -->
<string name="advanced_settings_title">Advanced Settings</string>
<string name="advanced_settings_app_info">App Info</string>
<string name="advanced_settings_app_info_description">%1$s</string>
<string name="advanced_settings_default">Change Default Launcher</string>
<string name="advanced_settings_restart_title">Restart Launcher</string>
<string name="advanced_settings_restart_description">Have you tried turning it on and off?</string>
<string name="advanced_settings_backup_restore_title">Backup/Restore</string>
<string name="advanced_settings_backup_restore_description">Please be careful what you wish for?</string>
<string name="advanced_settings_backup_restore_backup">Backup Preferences</string>
<string name="advanced_settings_backup_restore_restore">Restore Preferences</string>
<string name="advanced_settings_backup_restore_clear">Clear Preferences</string>
<string name="advanced_settings_backup_restore_clear_title">Clear Preferences</string>
<string name="advanced_settings_backup_restore_clear_description">Are you sure you want to do this?</string>
<string name="advanced_settings_backup_restore_clear_yes">Yes</string>
<string name="advanced_settings_backup_restore_clear_no">No</string>
<string name="advanced_settings_help_feedback_title">Help and Feedback</string>
<string name="advanced_settings_community_support_title">Community Support</string>
<string name="advanced_settings_share_application_title">Share Application</string>
<string name="advanced_settings_share_application_description">Elevate your experience with %1$s! Get it now on fDroid and see what everyone is talking about!\n</string>
<!-- Strings used for fragments for navigation -->
<string name="home_fragment_label">Home Fragment</string>
<string name="draw_fragment_label">Draw Fragment</string>
@@ -30,19 +82,13 @@
<string name="bottom_dialog_app_info">App Info</string>
<string name="bottom_dialog_app_uninstall">Uninstall App</string>
<string name="settings_name">Launcher Settings</string>
<string name="settings_version">%1$s Version: %2$s</string>
<string name="settings_widgets_name">Widgets Settings</string>
<string name="settings_title_home_display_preferences">Display</string>
<string name="settings_title_home_behavior_preferences">Behavior</string>
<string name="settings_title_home_appearance_preferences">Appearance</string>
<string name="settings_title_date_style">Date Style</string>
<string name="settings_title_time_style">Time Style</string>
<string name="settings_title_app_manager">App Manage</string>
<string name="settings_title_gestures">Gestures</string>
<string name="settings_title_miscellaneous">Miscellaneous</string>
<string name="settings_title_backups">Backups</string>
<string name="settings_title_others">Others</string>
<string name="settings_display_status_bar">Show Status Bar</string>
@@ -62,14 +108,9 @@
<string name="settings_appearance_padding_title">Padding</string>
<string name="settings_appearance_wallpaper">Custom Wallpaper</string>
<string name="settings_appearance_home_date_alignment">Date Alignment</string>
<string name="settings_appearance_home_time_alignment">Time Alignment</string>
<string name="settings_appearance_home_app_alignment">Home App Alignment</string>
<string name="appearance_bottom_dialog_text_size_title">Size</string>
<string name="appearance_bottom_dialog_text_color_title">Color</string>
<string name="appearance_bottom_dialog_alignment_title">Alignment</string>
<string name="appearance_bottom_dialog_padding_title">Padding</string>
<string name="appearance_bottom_dialog_desc_date">Date\u0020:\u0020</string>
<string name="appearance_bottom_dialog_desc_time">Time\u0020:\u0020 </string>
<string name="appearance_bottom_dialog_desc_app">App\u0020:\u0020</string>
@@ -79,10 +120,6 @@
<string name="appearance_bottom_dialog_desc_widget_background">Widget Background\u0020:\u0020</string>
<string name="appearance_bottom_dialog_desc_widget_text">Widget Text\u0020:\u0020</string>
<string name="settings_manager_favorite">Favorite Apps</string>
<string name="settings_manager_hidden">Hidden Apps</string>
<string name="settings_select_wallpaper">Select Wallpaper</string>
<string name="settings_double_tap">Double Tap</string>
<string name="settings_swipe_up">Swipe Up</string>
<string name="settings_swipe_down">Swipe Down</string>
@@ -95,14 +132,6 @@
<string name="settings_select_launcher_font">Select a Font Family</string>
<string name="settings_launcher_font">Font Family</string>
<string name="settings_others_share">Share</string>
<string name="settings_others_feedback">Feedback</string>
<string name="settings_others_github">Github</string>
<string name="settings_backups_backup">Backup Preferences</string>
<string name="settings_backups_clear">Clear Preferences</string>
<string name="settings_backups_restore">Restore Preferences</string>
<string name="settings_reload_app_backup">Preferences backed up.</string>
<string name="settings_reload_app_restore">Preferences restored. Restarting.</string>
@@ -132,7 +161,7 @@
<string name="authentication_failed">Authentication Failed</string>
<string name="authentication_error">Authentication Error: %1$s(code %2$d)</string>
<string name="bottom_alignment_star">Star</string>
<string name="bottom_alignment_start">Star</string>
<string name="bottom_alignment_center">Center</string>
<string name="bottom_alignment_end">End</string>
@@ -141,10 +170,9 @@
<string name="accessibility_settings_disable">Disable</string>
<string name="accessibility_service_name">Easy Launcher Actions Service</string>
<string name="accessibility_service_desc">Please turn on accessibility service to use double tap to lock feature in Easy Launcher.\n\nThis permission is used only to turn off your screen.Our accessibility service does not collect or share any data.</string>
<string name="admin_permission_message">Easy launcher promises to use lock screen permission responsibly. Easy launcher does not collect or share any data.</string>
<string name="accessibility_service_desc">Please turn on accessibility service to use double tap to lock feature in Easy Launcher.\n\nThis permission is used only to turn off your screen. Our
accessibility service does not collect or share any data.</string>
<string name="search_engine">Search Engine</string>
<string name="search_default">Default</string>
<string name="search_google">Google</string>
<string name="search_yahoo">Yahoo</string>

View File

@@ -7,12 +7,12 @@
<item name="android:windowDisablePreview">true</item>
<!-- Primary brand color. -->
<item name="colorPrimary">@color/teal_700</item>
<item name="colorPrimaryVariant">@color/teal_200</item>
<item name="colorPrimary">@color/icon_700</item>
<item name="colorPrimaryVariant">@color/icon_200</item>
<item name="colorOnPrimary">?attr/color</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorSecondary">@color/icon_200</item>
<item name="colorSecondaryVariant">@color/icon_700</item>
<item name="colorOnSecondary">@color/black</item>
<item name="colorSurface">@color/white</item>
<item name="primaryTextShadowColor">@color/whiteTrans50</item>

View File

@@ -1,6 +1,6 @@
#Mon Mar 20 20:10:24 CST 2023
#Sat Sep 07 12:40:08 BST 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists