Updated the version, fixed shortcut text from reset and optimizations.

This commit is contained in:
ottoptj 2024-09-03 03:28:42 +03:00
commit 77fc95b2f4
9 changed files with 22 additions and 17 deletions

View file

@ -11,8 +11,8 @@ android {
applicationId = "eu.ottop.yamlauncher"
minSdk = 31
targetSdk = 34
versionCode = 6
versionName = "1.2"
versionCode = 7
versionName = "1.3"
}
dependenciesInfo {

View file

@ -261,6 +261,7 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
}
private fun unsetShortcutSetup(textView: TextView) {
textView.text = getText(R.string.shortcut_default)
unsetShortcutListeners(textView)
}
@ -548,6 +549,7 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
handler.postDelayed({
try {
searchView.setText(R.string.empty)
appMenuLinearLayoutManager.setScrollEnabled(true)
}
catch (_: UninitializedPropertyAccessException) {

View file

@ -2,12 +2,8 @@ package eu.ottop.yamlauncher.settings
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.provider.Settings
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import eu.ottop.yamlauncher.R

View file

@ -228,7 +228,7 @@ class SharedPreferenceManager (private val context: Context) {
fun resetAllPreferences(activity: FragmentActivity) {
AlertDialog.Builder(context).apply {
setTitle("Confirmation")
setMessage("You will lose ALL changes that you have made to the launcher settings. Are you sure?")
setMessage("You will lose ALL changes that you have made to the launcher settings, shortcuts, hidden apps, etc.\n\nAre you sure?")
setPositiveButton("Yes") { _, _ ->
performReset(activity)
}
@ -242,6 +242,7 @@ class SharedPreferenceManager (private val context: Context) {
val editor = preferences.edit()
editor.clear()
editor.apply()
activity.supportFragmentManager
.beginTransaction()
.replace(R.id.settingsLayout, UISettingsFragment())

View file

@ -1,7 +1,6 @@
package eu.ottop.yamlauncher.settings
import android.content.Context
import android.content.res.TypedArray
import android.os.Handler
import android.os.Looper
import android.util.AttributeSet

View file

@ -4,8 +4,6 @@ import android.content.Context
import android.graphics.BlendMode
import android.graphics.BlendModeColorFilter
import android.graphics.Color
import android.os.Handler
import android.os.Looper
import android.util.TypedValue
import android.view.Gravity
import android.view.View
@ -25,7 +23,6 @@ import androidx.fragment.app.FragmentActivity
import com.google.android.material.textfield.TextInputEditText
import eu.ottop.yamlauncher.R
import eu.ottop.yamlauncher.settings.SharedPreferenceManager
import eu.ottop.yamlauncher.settings.UISettingsFragment
class UIUtils(private val context: Context) {

View file

@ -66,6 +66,7 @@
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
android:textColorHighlight="#5F33B5E5"
android:textSize="25sp" />
<Space

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:id="@+id/aboutLayout"
android:layout_width="match_parent"
@ -61,8 +60,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:layout_marginTop="10dp"
android:layout_weight="1.1"
android:orientation="horizontal">
<TextView
@ -96,7 +95,7 @@
android:id="@+id/donationTitle"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="40dp"
android:layout_marginTop="20dp"
android:layout_weight="1.3"
android:autoSizeMinTextSize="5sp"
android:autoSizeTextType="uniform"
@ -114,7 +113,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="20dp"
android:layout_marginTop="10dp"
android:layout_weight="2"
android:orientation="horizontal">
@ -147,7 +146,7 @@
android:id="@+id/weatherLink"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="150dp"
android:layout_marginTop="100dp"
android:layout_marginBottom="20dp"
android:layout_weight="1.5"
android:autoSizeMinTextSize="5sp"