Refactor: Refactor settings menu for cleaner look.

This commit is contained in:
HeCodes2Much
2024-05-19 20:20:56 +01:00
parent 18f2547978
commit 9cddace27a
10 changed files with 353 additions and 142 deletions

View File

@@ -50,5 +50,7 @@ object Constants {
const val QUICKSETTINGS_MANAGER = "android.app.StatusBarManager"
const val QUICKSETTINGS_METHOD = "expandSettingsPanel"
const val TOGGLE_SETTING_LOCK = "TOGGLE_SETTING_LOCK"
const val REQUEST_CODE_ENABLE_ADMIN = 123
}

View File

@@ -1,5 +1,6 @@
package com.github.droidworksstudio.launcher.helper
import android.content.Intent
import androidx.biometric.BiometricManager
import androidx.biometric.BiometricPrompt
import androidx.core.content.ContextCompat
@@ -12,6 +13,9 @@ class FingerprintHelper @Inject constructor(private val fragment: Fragment) {
private lateinit var callback: Callback
@Inject
lateinit var appHelper: AppHelper
interface Callback {
fun onAuthenticationSucceeded(appInfo: AppInfo)
fun onAuthenticationFailed()
@@ -40,6 +44,8 @@ class FingerprintHelper @Inject constructor(private val fragment: Fragment) {
val promptInfo = BiometricPrompt.PromptInfo.Builder()
.setTitle(fragment.getString(R.string.authentication_title))
.setSubtitle(fragment.getString(R.string.authentication_subtitle))
.setAllowedAuthenticators(BiometricManager.Authenticators.BIOMETRIC_WEAK or BiometricManager.Authenticators.DEVICE_CREDENTIAL)
.setNegativeButtonText(fragment.getString(R.string.authentication_cancel))
.build()
@@ -49,4 +55,57 @@ class FingerprintHelper @Inject constructor(private val fragment: Fragment) {
biometricPrompt.authenticate(promptInfo)
}
}
fun startFingerprintSettingsAuth(targetClass: Class<*>) {
val executor = ContextCompat.getMainExecutor(fragment.requireContext())
val biometricPrompt = BiometricPrompt(fragment, executor, object : BiometricPrompt.AuthenticationCallback() {
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
sendToTargetActivity(targetClass)
}
override fun onAuthenticationFailed() {
appHelper.showToast(fragment.requireContext(), fragment.getString(R.string.authentication_failed))
}
override fun onAuthenticationError(errorCode: Int, errorMessage: CharSequence) {
when (errorCode) {
BiometricPrompt.ERROR_USER_CANCELED -> appHelper.showToast(fragment.requireContext(), fragment.getString(R.string.authentication_cancel))
else -> appHelper.showToast(fragment.requireContext(), fragment.getString(R.string.authentication_error).format(errorMessage, errorCode))
}
}
})
val promptInfoBuilder = BiometricPrompt.PromptInfo.Builder()
.setTitle(fragment.getString(R.string.authentication_title))
.setSubtitle(fragment.getString(R.string.authentication_subtitle))
val authenticators = BiometricManager.Authenticators.BIOMETRIC_WEAK or BiometricManager.Authenticators.DEVICE_CREDENTIAL
val canAuthenticate = BiometricManager.from(fragment.requireContext()).canAuthenticate(authenticators)
if (canAuthenticate == BiometricManager.BIOMETRIC_SUCCESS) {
promptInfoBuilder.setAllowedAuthenticators(authenticators)
} else {
promptInfoBuilder.setNegativeButtonText(fragment.getString(R.string.authentication_cancel))
}
val promptInfo = promptInfoBuilder.build()
when (canAuthenticate) {
BiometricManager.BIOMETRIC_SUCCESS -> biometricPrompt.authenticate(promptInfo)
BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE,
BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE,
BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED -> sendToTargetActivity(targetClass)
else -> appHelper.showToast(fragment.requireContext(), fragment.getString(R.string.authentication_failed))
}
}
fun sendToTargetActivity(targetClass: Class<*>) {
try {
val intent = Intent(fragment.requireActivity(), targetClass)
fragment.requireActivity().startActivity(intent)
} catch (e: Exception) {
appHelper.showToast(fragment.requireContext(), fragment.getString(R.string.authentication_failed))
}
}
}

View File

@@ -110,6 +110,10 @@ class PreferenceHelper @Inject constructor(@ApplicationContext context: Context)
get() = prefs.getBoolean(Constants.DOUBLE_TAP_LOCK, false)
set(value) = prefs.edit().putBoolean(Constants.DOUBLE_TAP_LOCK, value).apply()
var settingsLock: Boolean
get() = prefs.getBoolean(Constants.TOGGLE_SETTING_LOCK, false)
set(value) = prefs.edit().putBoolean(Constants.TOGGLE_SETTING_LOCK, value).apply()
var swipeNotification: Boolean
get() = prefs.getBoolean(Constants.SWIPE_NOTIFICATION, true)
set(value) = prefs.edit().putBoolean(Constants.SWIPE_NOTIFICATION, value).apply()

View File

@@ -12,10 +12,11 @@ import android.text.format.DateFormat
import android.util.Log
import android.view.*
import androidx.annotation.RequiresApi
import androidx.biometric.BiometricPrompt
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.lifecycle.lifecycleScope
import androidx.navigation.findNavController
import androidx.recyclerview.widget.StaggeredGridLayoutManager
import com.github.droidworksstudio.launcher.R
import com.github.droidworksstudio.launcher.accessibility.MyAccessibilityService
@@ -34,6 +35,7 @@ import com.github.droidworksstudio.launcher.viewmodel.PreferenceViewModel
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.launch
import java.util.Locale
import javax.inject.Inject
@@ -67,6 +69,7 @@ class HomeFragment : Fragment(), OnItemClickedListener.OnAppsClickedListener,
private val homeAdapter: HomeAdapter by lazy { HomeAdapter(this, this, preferenceHelper) }
private lateinit var batteryReceiver: BroadcastReceiver
private lateinit var biometricPrompt: BiometricPrompt
private lateinit var context: Context
@@ -228,8 +231,7 @@ class HomeFragment : Fragment(), OnItemClickedListener.OnAppsClickedListener,
return object : OnSwipeTouchListener(context) {
override fun onLongClick() {
super.onLongClick()
val intent = Intent(requireActivity(), SettingsActivity::class.java)
requireActivity().startActivity(intent)
trySettings()
return
}
@@ -246,6 +248,51 @@ class HomeFragment : Fragment(), OnItemClickedListener.OnAppsClickedListener,
}
}
private fun trySettings() {
lifecycleScope.launch(Dispatchers.Main) {
biometricPrompt = BiometricPrompt(this@HomeFragment,
ContextCompat.getMainExecutor(requireContext()),
object : BiometricPrompt.AuthenticationCallback() {
override fun onAuthenticationError(
errorCode: Int,
errString: CharSequence
) {
when (errorCode) {
BiometricPrompt.ERROR_USER_CANCELED -> appHelper.showToast(
requireContext(),
getString(R.string.authentication_cancel)
)
else -> appHelper.showToast(
requireContext(),
getString(R.string.authentication_error).format(
errString,
errorCode
)
)
}
}
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
fingerHelper.sendToTargetActivity(SettingsActivity::class.java)
}
override fun onAuthenticationFailed() {
appHelper.showToast(
requireContext(),
getString(R.string.authentication_failed)
)
}
})
if (preferenceHelper.settingsLock) {
fingerHelper.startFingerprintSettingsAuth(SettingsActivity::class.java)
} else {
fingerHelper.sendToTargetActivity(SettingsActivity::class.java)
}
}
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
@@ -291,7 +338,10 @@ class HomeFragment : Fragment(), OnItemClickedListener.OnAppsClickedListener,
}
override fun onAuthenticationError(errorCode: Int, errorMessage: CharSequence?) {
appHelper.showToast(context, getString(R.string.authentication_error))
when (errorCode) {
BiometricPrompt.ERROR_USER_CANCELED -> appHelper.showToast(requireContext(), getString(R.string.authentication_cancel))
else -> appHelper.showToast(requireContext(), getString(R.string.authentication_error).format(errorMessage, errorCode))
}
}
override fun onTopReached() {

View File

@@ -82,6 +82,7 @@ class SettingsFragment : Fragment(), ScrollEventListener {
binding.gesturesLockSwitchCompat.isChecked = preferenceHelper.tapLockScreen
binding.gesturesNotificationSwitchCompat.isChecked = preferenceHelper.swipeNotification
binding.gesturesSearchSwitchCompat.isChecked = preferenceHelper.swipeSearch
binding.lockSettingsSwitchCompat.isChecked = preferenceHelper.settingsLock
}
private fun observeClickListener() {
@@ -184,7 +185,9 @@ class SettingsFragment : Fragment(), ScrollEventListener {
preferenceViewModel.setAutoOpenApp(isChecked)
}
binding.lockSettingsSwitchCompat.setOnCheckedChangeListener { _, isChecked ->
preferenceViewModel.setLockSettings(isChecked)
}
}
override fun onTopReached() {

View File

@@ -36,6 +36,7 @@ class PreferenceViewModel @Inject constructor(
val swipeSearchLiveData: MutableLiveData<Boolean> = MutableLiveData()
val autoOpenAppsLiveData: MutableLiveData<Boolean> = MutableLiveData()
val autoKeyboardLiveData: MutableLiveData<Boolean> = MutableLiveData()
val lockSettingsLiveData: MutableLiveData<Boolean> = MutableLiveData()
val appPaddingSizeLiveData: MutableLiveData<Float> = MutableLiveData()
fun setFirstLaunch(firstLaunch: Boolean) {
@@ -167,4 +168,9 @@ class PreferenceViewModel @Inject constructor(
preferenceHelper.automaticOpenApp = autoOpenApp
autoOpenAppsLiveData.postValue((preferenceHelper.automaticOpenApp))
}
fun setLockSettings(lockSettings: Boolean){
preferenceHelper.settingsLock = lockSettings
lockSettingsLiveData.postValue((preferenceHelper.settingsLock))
}
}

View File

@@ -4,22 +4,41 @@
android:width="1024sp"
android:viewportHeight="1024"
android:viewportWidth="1024">
<path android:fillAlpha="0.098039"
android:fillColor="#FF000000"
android:pathData="m969.7,351.3q-8.6,-20.9 -19.4,-40.8c-4.1,-7.6 -8.4,-15.1 -12.9,-22.4 -19.5,-31.7 -43.4,-61.7 -71.6,-89.8 -92.2,-92.2 -203.4,-138.3 -333.8,-138.3s-241.6,46.1 -333.8,138.3 -138.3,203.4 -138.3,333.8 46.1,241.6 138.3,333.8 203.4,138.2 333.8,138.2 241.6,-46 333.8,-138.2c50.8,-50.8 87.6,-107.4 110.3,-169.8 18.5,-50.8 27.9,-105.5 27.9,-164.1 0,-44.9 -5.4,-87.6 -16.4,-127.9 -1.3,-4.6 -2.5,-9.1 -3.9,-13.6 -4.1,-13.3 -8.8,-26.4 -14.1,-39.2z"/>
<path android:fillColor="#e85479"
android:pathData="m982.1,517q0,-2.5 0,-4.9c0,-130.4 -46,-241.6 -138.2,-333.8 -91.9,-91.8 -202.9,-137.9 -332.8,-138.2v475h2v2z"/>
<path android:fillColor="#00c0e6"
android:pathData="m511.1,40.1c-0.3,0 -0.6,0 -1,0 -130.4,0 -241.6,46 -333.8,138.2s-138.2,203.4 -138.2,333.8v3h473z"/>
<path android:fillColor="#ebc240"
android:pathData="m513.1,517v-2h-2,-473c0.7,129.1 46.8,239.4 138.2,330.8 92.2,92.2 203.4,138.2 333.8,138.2h1,2z"/>
<path android:fillColor="#55da97"
android:pathData="m513.1,517v467c129.1,-0.8 239.4,-46.8 330.8,-138.2 90.9,-91 137.1,-200.6 138.2,-328.9z"/>
<path android:fillColor="#fff"
android:pathData="m862.5,528.8q0.3,-8.3 0.3,-16.8c0,-96.8 -34.3,-179.6 -102.7,-248 -68.5,-68.4 -151.2,-102.7 -248.1,-102.7s-179.6,34.3 -248,102.7 -102.7,151.1 -102.7,248 34.3,179.6 102.7,248.1c68.4,68.4 151.1,102.7 248,102.7 31.4,0 61.3,-3.6 89.8,-10.8 59.2,-15 112,-45.7 158.3,-91.9 64.4,-64.4 98.6,-141.4 102.3,-231.3z"/>
<path android:fillAlpha="0.098039"
android:fillColor="#FF000000"
android:pathData="m760.1,760.1q94.7,-94.8 102.1,-225.7l-177.1,-177.1 -56,34.5 -163.9,-4.6 -72.1,11.1v202.7l-44.5,68 192.7,192.7 0,0c21,-1.6 41.2,-4.8 60.5,-9.8 59.2,-15 112,-45.7 158.3,-91.9z"/>
<path android:fillColor="#96a6a6"
android:pathData="m692.5,387c0,-33.1 -26.8,-60 -60,-60 -33.1,0 -60,26.9 -60,60 0,29.2 20.9,53.5 48.2,59 -28.4,4.8 -50,29.4 -50,59.2 0,33.2 26.8,60 60,60 33.1,0 60,-26.8 60,-60 0,-29 -20.7,-53.3 -48.2,-58.8 28.4,-4.8 50,-29.5 50,-59.3zM629.5,685c33.2,0 60,-26.8 60,-60 0,-33.1 -26.8,-60 -60,-60 -33.1,0 -60,26.9 -60,60 0,33.2 26.9,60 60,60zM392.7,327.3c-33.1,0 -60,26.9 -60,60 0,16.6 5.9,30.7 17.6,42.4 11.5,11.5 25.4,17.4 41.6,17.5 -16.3,0.2 -30.1,6.1 -41.6,17.5 -11.7,11.7 -17.6,25.9 -17.6,42.4 0,33.2 26.9,60 60,60 29.3,0 53.7,-21 59,-48.9 5.4,28 29.8,48.9 59,48.9q24.9,0 42.4,-17.6 17.6,-17.5 17.6,-42.4c0,-29 -20.7,-53.3 -48.3,-58.9 28.5,-4.8 50.1,-29.4 50.1,-59.2 0,-33.1 -26.8,-60 -60,-60 -33.1,0 -60,26.9 -60,60 0,29.2 20.9,53.5 48.2,59 -24.9,4.2 -44.5,23.6 -49.1,48.2 -2.1,-11.9 -7.6,-22.4 -16.6,-31.4 -11.4,-11.5 -25.4,-17.4 -41.7,-17.5 16.3,-0.2 30.2,-6.1 41.7,-17.5 11.7,-11.7 17.5,-25.8 17.5,-42.4 0,-33.1 -26.8,-60 -60,-60zM569.5,627.2c0,-33.1 -26.9,-60 -60,-60 -29.3,0 -53.8,21.1 -59,48.8 -5.3,-27.8 -29.7,-48.8 -59,-48.8 -33.1,0 -60,26.9 -60,60 0,33.2 26.9,60 60,60 29.3,0 53.6,-20.9 59,-48.8 5.5,28 29.9,48.8 59,48.8 33.2,0 60,-26.8 60,-60z"/>
<path
android:pathData="m958,513 l-193.5,-153.9 0.3,92.7L482.6,451.7q1.4,7.3 2.4,14.7 1,7.4 1.7,15 0.7,7.4 1,14.9 0.3,7.5 0.5,15 0,7.5 -0.3,15.1 -0.5,7.4 -1.1,15 -0.7,7.4 -1.7,14.9 -1,7.5 -2.4,14.9l282.7,0l0.2,92.7z"
android:fillColor="#55da97"/>
<path
android:pathData="m66,510.9 l193.5,153.9 -0.3,-92.7l282.3,0q-1.4,-7.3 -2.4,-14.7 -1,-7.4 -1.7,-14.9 -0.7,-7.5 -1,-15 -0.3,-7.4 -0.3,-15 0,-7.5 0.3,-15 0.3,-7.5 1,-15.1 0.7,-7.4 1.7,-14.9 1,-7.4 2.4,-14.9l-282.6,0L258.5,360.2Z"
android:fillColor="#00c0e6"/>
<path
android:pathData="m510.1,959.7 l153.9,-193.5 -92.7,0.3L571.4,484.2q-7.3,1.4 -14.7,2.4 -7.4,1 -15,1.7 -7.4,0.7 -14.9,1 -7.5,0.3 -15,0.5 -7.5,0 -15.1,-0.3 -7.4,-0.5 -15,-1.1 -7.4,-0.7 -14.9,-1.7 -7.5,-1 -14.9,-2.4l0,282.7l-92.7,0.2z"
android:fillColor="#e85479"/>
<path
android:pathData="m513.3,64.3 l-153.9,193.5 92.7,-0.3l0,282.3q7.3,-1.4 14.7,-2.4 7.4,-1 14.9,-1.7 7.5,-0.7 15,-1 7.4,-0.3 15,-0.3 7.5,0 15,0.3 7.5,0.3 15.1,1 7.4,0.7 14.9,1.7 7.4,1 14.9,2.4l0,-282.6l92.7,-0.3z"
android:fillColor="#ebc240"/>
<path
android:pathData="m595.7,465.1c21.6,0 44.4,2.7 68.4,7.9L791.4,606.3 708.5,722 562.5,805.1 393.9,630.5C432.7,515.4 502.2,465.1 595.7,465.1Z"
android:fillColor="#96a6a6"/>
<path
android:pathData="M513.9,786C362.5,786 240,663.6 240,512.2 240,360.8 362.5,238.3 513.9,238.3 665.3,238.3 787.7,360.8 787.7,512.2 787.7,663.6 665.3,786 513.9,786Z"
android:fillColor="#ffffff"/>
<path
android:pathData="m595.7,465.1c-93.4,-0 -162.9,50.3 -201.8,165.4l168.6,174.6 146,-83.1 82.9,-115.7 -127.3,-133.3c-24,-5.2 -46.8,-7.9 -68.4,-7.9z"
android:strokeWidth="0.9"
android:fillColor="#e6e6e6"/>
<path
android:pathData="M513.3,382.3 L359.4,473.5 452,473.3l0,133q7.3,-0.6 14.7,-1.1 7.4,-0.5 14.9,-0.8 7.5,-0.3 15,-0.5 7.4,-0.2 15,-0.2 7.5,0 15,0.2 7.5,0.2 15.1,0.5 7.4,0.3 14.9,0.8 7.4,0.5 14.9,1.1L571.4,473.2l92.7,-0.2z"
android:strokeWidth="0.8"
android:fillColor="#96a6a6"/>
<path
android:pathData="M393.9,470l235.7,0l0,160.6l-235.7,0z"
android:strokeWidth="0.9"
android:fillColor="#96a6a6"/>
<path
android:pathData="M393.9,630.5 L541.4,786"
android:strokeWidth="0.9"
android:fillColor="#96a6a6"/>
<path
android:pathData="M513.9,214C474.8,214 435.9,221.8 399.8,236.8 363.7,251.7 330.8,273.7 303.1,301.4 275.4,329.1 253.4,362 238.5,398.1 223.5,434.3 215.7,473.1 215.7,512.2c0,39.2 7.8,77.9 22.7,114.2 15,36.1 36.9,69 64.6,96.7 27.7,27.7 60.6,49.7 96.7,64.6 36.1,15 75,22.7 114.1,22.7 39.2,0 77.9,-7.8 114.2,-22.7 36.1,-15 69,-36.9 96.7,-64.6 27.7,-27.7 49.7,-60.6 64.6,-96.7 15,-36.3 22.7,-75 22.7,-114.2C812.1,473.1 804.3,434.3 789.4,398.1 774.4,362 752.4,329.1 724.7,301.4 697,273.7 664.2,251.7 628,236.8 591.8,221.8 553,214 513.9,214ZM513.9,238.3C665.3,238.3 787.7,360.8 787.7,512.2 787.7,663.6 665.3,786 513.9,786 362.5,786 240,663.6 240,512.2c0,-151.3 122.5,-273.8 273.8,-273.8z"
android:fillColor="#96a6a6"/>
</vector>

View File

@@ -54,6 +54,176 @@
android:textSize="@dimen/text_large"
style="@style/TextDefaultStyle"/>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="@string/settings_title_app_manager"
android:textSize="@dimen/text_super_large"
style="@style/TextDefaultStyle"/>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/favorite_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_manager_favorite"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded"
style="@style/TextDefaultStyle"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_marginHorizontal="20dp"
android:layout_marginVertical="20dp"
tools:ignore="MissingConstraints,TextSizeCheck">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/hidden_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_manager_hidden"
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>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="@string/settings_title_home_behavior_preferences"
android:textSize="@dimen/text_super_large"
style="@style/TextDefaultStyle"/>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/automaticKeyboard_text"
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"
style="@style/TextDefaultStyle"/>
<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:layout_marginHorizontal="20dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/automaticOpenApp_text"
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"
style="@style/TextDefaultStyle"/>
<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:layout_marginHorizontal="20dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/lockSettings_text"
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"
style="@style/TextDefaultStyle"/>
<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"
@@ -259,70 +429,6 @@
tools:ignore="TouchTargetSizeCheck" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/automaticKeyboard_text"
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"
style="@style/TextDefaultStyle"/>
<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" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/automaticOpenApp_text"
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"
style="@style/TextDefaultStyle"/>
<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>
<androidx.appcompat.widget.LinearLayoutCompat
@@ -458,58 +564,6 @@
android:orientation="vertical"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="@string/settings_title_app_manager"
android:textSize="@dimen/text_super_large"
style="@style/TextDefaultStyle"/>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:orientation="horizontal"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/favorite_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_manager_favorite"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded"
style="@style/TextDefaultStyle"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_marginHorizontal="20dp"
android:layout_marginVertical="20dp"
tools:ignore="MissingConstraints">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/hidden_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left|center"
android:text="@string/settings_manager_hidden"
android:textSize="@dimen/text_large"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded"
style="@style/TextDefaultStyle"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -25,6 +25,7 @@
<string name="settings_home">Home</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>
@@ -40,6 +41,7 @@
<string name="settings_display_app_icons">Show App Icons</string>
<string name="settings_display_automatic_keyboard">Auto Show Keyboard</string>
<string name="settings_display_auto_open_apps">Auto Open Last App</string>
<string name="settings_display_lock_settings">Lock Settings</string>
<string name="settings_appearance_text_size_title">Size</string>
<string name="settings_appearance_color_title">Color</string>
@@ -74,11 +76,11 @@
<string name="settings_others_github">Github</string>
<string name="authentication_title">Authentication</string>
<string name="authentication_subtitle">Please login to get access</string>
<string name="authentication_subtitle">Log in using your biometric credentials.</string>
<string name="authentication_cancel">Authentication Cancel</string>
<string name="authentication_succeeded">Authentication Succeeded</string>
<string name="authentication_failed">Authentication Failed</string>
<string name="authentication_error">Authentication Error</string>
<string name="authentication_error">Authentication Error: %1$s(code %2$d)</string>
<string name="bottom_alignment_star">Star</string>
<string name="bottom_alignment_center">Center</string>

View File

@@ -1 +1,13 @@
Coming Soon.
EasyLauncher - Minimal and Clutter Free Android launcher
<b> Features: </b>
- You can rename apps in the app-drawer. (Sync with home screen)
- No use of INTERNET permissions.
- Lock settings behind biometrics (toggle).
<b>Possible actions now include:</b>
- Clicking on the Battery Level
- Clicking on the Clock
- Clicking on the Date