From 554c7c2732493b520f1fc1dbc0d146a2c970c7cd Mon Sep 17 00:00:00 2001 From: queuejw Date: Fri, 28 Jun 2024 22:36:08 +0400 Subject: [PATCH] nothing --- SpannedGridLayoutManager/build.gradle | 8 ++--- app/build.gradle | 14 ++++---- .../java/ru/dimon6018/metrolauncher/Main.kt | 11 +++--- .../metrolauncher/content/NewAllApps.kt | 36 +++++++++++-------- .../metrolauncher/content/NewStart.kt | 2 +- .../metrolauncher/content/data/Prefs.kt | 6 +++- .../content/oobe/WelcomeActivity.kt | 6 ++-- .../oobe/fragments/AlmostDoneFragment.kt | 31 +++++----------- .../content/settings/SettingsActivity.kt | 2 ++ .../activities/AnimationSettingsActivity.kt | 1 + .../settings/activities/UpdateActivity.kt | 18 +++++----- app/src/main/res/layout/oobe.xml | 2 +- .../res/layout/oobe_fragment_almostdone.xml | 3 +- app/src/main/res/values-ru/strings.xml | 3 +- app/src/main/res/values/strings.xml | 3 +- build.gradle | 4 +-- liboverscroll/build.gradle | 6 ++-- 17 files changed, 78 insertions(+), 78 deletions(-) diff --git a/SpannedGridLayoutManager/build.gradle b/SpannedGridLayoutManager/build.gradle index 88f2801..6e965c3 100644 --- a/SpannedGridLayoutManager/build.gradle +++ b/SpannedGridLayoutManager/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'org.jetbrains.kotlin.android' android { namespace 'com.arasthel.spannedgridlayoutmanager' - compileSdk 34 - + compileSdk 35 + setBuildToolsVersion('35.0.0') defaultConfig { - minSdkVersion 23 - targetSdkVersion 34 + minSdk 23 + targetSdk 35 } buildTypes { release { diff --git a/app/build.gradle b/app/build.gradle index 7773b16..8444757 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,19 +4,20 @@ plugins { id 'com.google.devtools.ksp' } + android { namespace 'ru.dimon6018.metrolauncher' - compileSdk 34 - + compileSdk 35 buildFeatures { buildConfig = true } + setBuildToolsVersion('35.0.0') defaultConfig { applicationId "ru.dimon6018.metrolauncher" minSdk 23 - targetSdk 34 - versionCode 44 - versionName "1.0 Pre-Alpha 5.0.1" + targetSdk 35 + versionCode 45 + versionName "1.0 Pre-Alpha 5.0.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled false @@ -39,7 +40,6 @@ android { sourceCompatibility JavaVersion.VERSION_21 targetCompatibility JavaVersion.VERSION_21 } - setBuildToolsVersion('35.0.0-rc04') } dependencies { @@ -50,7 +50,7 @@ dependencies { implementation 'com.google.android.material:material:1.13.0-alpha03' implementation 'androidx.recyclerview:recyclerview:1.4.0-alpha01' implementation 'androidx.core:core-ktx:1.13.1' - implementation 'androidx.fragment:fragment-ktx:1.8.0' + implementation 'androidx.fragment:fragment-ktx:1.8.1' implementation "androidx.dynamicanimation:dynamicanimation:1.1.0-alpha03" implementation "androidx.room:room-runtime:2.6.1" implementation "androidx.room:room-ktx:2.6.1" diff --git a/app/src/main/java/ru/dimon6018/metrolauncher/Main.kt b/app/src/main/java/ru/dimon6018/metrolauncher/Main.kt index 1e75f8a..5526bb4 100644 --- a/app/src/main/java/ru/dimon6018/metrolauncher/Main.kt +++ b/app/src/main/java/ru/dimon6018/metrolauncher/Main.kt @@ -316,8 +316,11 @@ class Main : AppCompatActivity() { }) text?.setOnEditorActionListener(OnEditorActionListener { _, actionId, _ -> if (actionId == EditorInfo.IME_ACTION_GO) { - if(filteredList != null) { - runApp( filteredList!![0].appPackage!!) + if(filteredList != null && filteredList!!.isNotEmpty()) { + filteredList!!.forEach { + Log.d("list", it.appPackage!!) + } + runApp(filteredList!!.first().appPackage!!) hideSearchResults() } return@OnEditorActionListener true @@ -383,9 +386,7 @@ class Main : AppCompatActivity() { filteredList!!.add(item) } } - if (filteredList!!.isNotEmpty()) { - searchAdapter?.setData(filteredList!!) - } + searchAdapter?.setData(filteredList!!) } private fun setAppTheme() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { diff --git a/app/src/main/java/ru/dimon6018/metrolauncher/content/NewAllApps.kt b/app/src/main/java/ru/dimon6018/metrolauncher/content/NewAllApps.kt index cb8b6f8..6c53929 100644 --- a/app/src/main/java/ru/dimon6018/metrolauncher/content/NewAllApps.kt +++ b/app/src/main/java/ru/dimon6018/metrolauncher/content/NewAllApps.kt @@ -410,6 +410,16 @@ class NewAllApps: Fragment() { } registerBroadcast() super.onResume() + if(recyclerView?.alpha != 1f) { + recyclerView?.apply { + val anim = ObjectAnimator.ofFloat(this, "alpha", 0f, 1f) + anim.duration = 100 + anim.start() + anim.doOnEnd { + recyclerView?.alpha = 1f + } + } + } } private fun disableSearch() { if(!isListLoaded) { @@ -672,7 +682,7 @@ class NewAllApps: Fragment() { ObjectAnimator.ofFloat(itemView, "rotationY", 0f, -90f), ObjectAnimator.ofFloat(itemView, "alpha", 1f, 0f) ) - animatorSet.setDuration((200 + (i * 2)).toLong()) + animatorSet.duration = (200 + (i * 2)).toLong() animatorSet.start() } val animatorSet = AnimatorSet() @@ -681,8 +691,13 @@ class NewAllApps: Fragment() { ObjectAnimator.ofFloat(recyclerView!!, "translationX", 0f, -600f), ObjectAnimator.ofFloat(recyclerView!!, "alpha", 1f, 0f) ) - animatorSet.setDuration(325) + animatorSet.duration = 325 animatorSet.start() + animatorSet.doOnEnd { + recyclerView!!.alpha = 0f + ObjectAnimator.ofFloat(recyclerView!!, "rotationY", 0f, 0f).start() + ObjectAnimator.ofFloat(recyclerView!!, "translationX", 0f, 0f).start() + } startAppDelay(item) } private fun startAppDelay(item: App) { @@ -690,27 +705,18 @@ class NewAllApps: Fragment() { delay(300) runApp(item.appPackage!!) delay(100) + val animatorSetItems = AnimatorSet() + animatorSetItems.duration = 100 for(i in 0..(R.id.appbarTextView)!!.text = text + activity.findViewById(R.id.appbarTextView)!!.text = text } } } \ No newline at end of file diff --git a/app/src/main/java/ru/dimon6018/metrolauncher/content/oobe/fragments/AlmostDoneFragment.kt b/app/src/main/java/ru/dimon6018/metrolauncher/content/oobe/fragments/AlmostDoneFragment.kt index 15959bd..db46916 100644 --- a/app/src/main/java/ru/dimon6018/metrolauncher/content/oobe/fragments/AlmostDoneFragment.kt +++ b/app/src/main/java/ru/dimon6018/metrolauncher/content/oobe/fragments/AlmostDoneFragment.kt @@ -2,20 +2,16 @@ package ru.dimon6018.metrolauncher.content.oobe.fragments import android.animation.AnimatorSet import android.animation.ObjectAnimator -import android.content.Intent import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment -import androidx.lifecycle.lifecycleScope import com.google.android.material.button.MaterialButton -import kotlinx.coroutines.delay -import kotlinx.coroutines.launch import ru.dimon6018.metrolauncher.Application -import ru.dimon6018.metrolauncher.Main import ru.dimon6018.metrolauncher.R import ru.dimon6018.metrolauncher.content.oobe.WelcomeActivity +import kotlin.system.exitProcess class AlmostDoneFragment: Fragment() { @@ -33,37 +29,26 @@ class AlmostDoneFragment: Fragment() { val next: MaterialButton = view.findViewById(R.id.next) WelcomeActivity.setText(requireActivity(), getString(R.string.welcomeAlmostDone)) next.setOnClickListener { - lifecycleScope.launch { - enterAnimation(true) - delay(200) - Application.PREFS!!.setLauncherState(1) - requireActivity().startActivity(Intent(activity, Main::class.java)) - } + Application.PREFS!!.setLauncherState(1) + exitProcess(0) } return view } - private fun enterAnimation(exit: Boolean) { + private fun enterAnimation() { if(main == null) { return } val animatorSet = AnimatorSet() - if(exit) { - animatorSet.playTogether( - ObjectAnimator.ofFloat(main!!, "translationX", 0f, -1000f), - ObjectAnimator.ofFloat(main!!, "alpha", 1f, 0f), - ) - } else { - animatorSet.playTogether( + animatorSet.playTogether( ObjectAnimator.ofFloat(main!!, "translationX", 1000f, 0f), - ObjectAnimator.ofFloat(main!!, "alpha", 0f, 1f), - ) - } + ObjectAnimator.ofFloat(main!!, "alpha", 0f, 1f) + ) animatorSet.setDuration(300) animatorSet.start() } override fun onResume() { - enterAnimation(false) + enterAnimation() super.onResume() } } \ No newline at end of file diff --git a/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/SettingsActivity.kt b/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/SettingsActivity.kt index f25ba97..b8367a9 100644 --- a/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/SettingsActivity.kt +++ b/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/SettingsActivity.kt @@ -17,6 +17,7 @@ import com.google.android.material.card.MaterialCardView import com.google.android.material.textview.MaterialTextView import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.cancel import kotlinx.coroutines.delay import kotlinx.coroutines.launch import leakcanary.LeakCanary @@ -238,6 +239,7 @@ class SettingsActivity : AppCompatActivity() { aboutBtn!!.alpha = 1f leaks!!.alpha = 1f expBtn!!.alpha = 1f + cancel() } } } diff --git a/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/activities/AnimationSettingsActivity.kt b/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/activities/AnimationSettingsActivity.kt index 5d67bee..c406ca7 100644 --- a/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/activities/AnimationSettingsActivity.kt +++ b/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/activities/AnimationSettingsActivity.kt @@ -47,6 +47,7 @@ class AnimationSettingsActivity: AppCompatActivity() { } transitionAnim.setOnCheckedChangeListener { _, isChecked -> PREFS!!.setTransitionAnim(isChecked) + PREFS!!.setPrefsChanged(true) } allAppsAnim.setOnCheckedChangeListener { _, isChecked -> PREFS!!.setAllAppsAnim(isChecked) diff --git a/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/activities/UpdateActivity.kt b/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/activities/UpdateActivity.kt index d616f90..b0d176d 100644 --- a/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/activities/UpdateActivity.kt +++ b/app/src/main/java/ru/dimon6018/metrolauncher/content/settings/activities/UpdateActivity.kt @@ -102,9 +102,9 @@ class UpdateActivity: AppCompatActivity() { } updateDetails!!.setOnClickListener { WPDialog(this).setTopDialog(true) - .setTitle(getString(R.string.details)) - .setMessage(getUpdateMessage()) - .setPositiveButton(getString(android.R.string.ok), null).show() + .setTitle(getString(R.string.details)) + .setMessage(getUpdateMessage()) + .setPositiveButton(getString(android.R.string.ok), null).show() } check!!.setOnClickListener { if(!checkStoragePermissions()) { @@ -423,9 +423,9 @@ class UpdateActivity: AppCompatActivity() { refreshUi() withContext(mainDispatcher) { WPDialog(this@UpdateActivity).setTopDialog(true) - .setTitle(getString(R.string.error)) - .setMessage(getString(R.string.downloading_error)) - .setPositiveButton(getString(android.R.string.ok), null).show() + .setTitle(getString(R.string.error)) + .setMessage(getString(R.string.downloading_error)) + .setPositiveButton(getString(android.R.string.ok), null).show() } cancel() return@launch @@ -497,9 +497,9 @@ class UpdateActivity: AppCompatActivity() { withContext(mainDispatcher) { refreshUi() WPDialog(this@UpdateActivity).setTopDialog(true) - .setTitle(getString(R.string.error)) - .setMessage(getString(R.string.downloading_error)) - .setPositiveButton(getString(android.R.string.ok), null).show() + .setTitle(getString(R.string.error)) + .setMessage(getString(R.string.downloading_error)) + .setPositiveButton(getString(android.R.string.ok), null).show() } } cancel() diff --git a/app/src/main/res/layout/oobe.xml b/app/src/main/res/layout/oobe.xml index 4a1ab2b..7fdeee8 100644 --- a/app/src/main/res/layout/oobe.xml +++ b/app/src/main/res/layout/oobe.xml @@ -14,7 +14,7 @@ android:layout_height="wrap_content" android:fitsSystemWindows="true"> - - diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5ee90ae..b400dc3 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -82,7 +82,7 @@ настроить Настроить телефон Выберите рекомендуемые настройки, чтобы использовать передачу данных по сотовой сети и автоматически загружать обновления лаунчера. Рекомендуемые настройки также будут отправлять информацию о телефоне и использовании лаунчера для улучшения MPL. - Вы закончили настройку лаунчера. Спасибо, что решили попробовать MPL. Приятного использования! + Вы закончили настройку лаунчера. Спасибо, что решили попробовать MPL. Приятного использования! \n MPL будет перезапущен. Найдите информацию об ошибке в Интернете Открыть браузер Открытить системные параметры @@ -221,4 +221,5 @@ Произошла ошибка. Попробуйте повторить поиск. Автоматически выключать анимации, если включен режим разработчика Анимации могут не работать, если вы выключили их в опциях для разработчиков. + Обновление для Lawnicons готово к скачиванию \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6304103..48f89a7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -81,7 +81,7 @@ custom Customise your phone settings Choose recommended settings to enable mobile data and automatically download launcher update. Recommended settings will also send phone info and launcher usage information to improve MPL. - You have finished setting up the launcher. Thank you for deciding to give MPL a try. Enjoy using it! + You have finished setting up the launcher. Thank you for deciding to give MPL a try. Enjoy using it! \n MPL will be restarted. Find information about the bug on the Internet Open browser Open system settings @@ -220,4 +220,5 @@ There\'s been an error. Try searching again. Automatically turn off animations if developer mode is enabled Animations may not work if you have turned them off in the developer options. + The update for Lawnicons is ready to download \ No newline at end of file diff --git a/build.gradle b/build.gradle index 93d75cc..9351d56 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.4.2' apply false - id 'com.android.library' version '8.4.2' apply false + id 'com.android.application' version '8.5.0' apply false + id 'com.android.library' version '8.5.0' apply false id 'org.jetbrains.kotlin.android' version '2.0.0' apply false id 'com.google.devtools.ksp' version "2.0.0-1.0.22" apply false } diff --git a/liboverscroll/build.gradle b/liboverscroll/build.gradle index a286e12..6f85c44 100644 --- a/liboverscroll/build.gradle +++ b/liboverscroll/build.gradle @@ -2,11 +2,11 @@ apply plugin: 'com.android.library' android { namespace 'me.everything.android.ui.overscroll' - compileSdk 34 - + compileSdk 35 + setBuildToolsVersion('35.0.0') defaultConfig { minSdk 23 - targetSdk 34 + targetSdk 35 } buildTypes { release {