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" applicationId = "eu.ottop.yamlauncher"
minSdk = 31 minSdk = 31
targetSdk = 34 targetSdk = 34
versionCode = 6 versionCode = 7
versionName = "1.2" versionName = "1.3"
} }
dependenciesInfo { dependenciesInfo {

View file

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

View file

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

View file

@ -228,7 +228,7 @@ class SharedPreferenceManager (private val context: Context) {
fun resetAllPreferences(activity: FragmentActivity) { fun resetAllPreferences(activity: FragmentActivity) {
AlertDialog.Builder(context).apply { AlertDialog.Builder(context).apply {
setTitle("Confirmation") 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") { _, _ -> setPositiveButton("Yes") { _, _ ->
performReset(activity) performReset(activity)
} }
@ -242,6 +242,7 @@ class SharedPreferenceManager (private val context: Context) {
val editor = preferences.edit() val editor = preferences.edit()
editor.clear() editor.clear()
editor.apply() editor.apply()
activity.supportFragmentManager activity.supportFragmentManager
.beginTransaction() .beginTransaction()
.replace(R.id.settingsLayout, UISettingsFragment()) .replace(R.id.settingsLayout, UISettingsFragment())

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,10 @@
Bug fix and feature release.
- Fixed a bug where showing the status bar wouldn't persist.
- Fixed a bug where some items in the context menu of an application were bigger than others.
- Fixed scaling of the About page in the preferences.
- Created a custom preference for selecting launcher setting values as ListPreference detects touches weirdly with many items.
- Set specific colors for editing text (cursor, highlight, text color) in the search and renaming fields so that there is always enough contrast.
- Added the ability to choose any application for the clock and date shortcuts.
- Added an option to reset all launcher settings.
- Moved general UI options into a separate fragment.