From 971b08df35e9902ead7ca38adf7808465df47dd7 Mon Sep 17 00:00:00 2001 From: X1nto Date: Sun, 28 Jun 2020 18:47:51 +0400 Subject: [PATCH] new additions and optimisations --- .../core/downloader/MicrogDownloadService.kt | 29 ++++++++- .../core/downloader/VancedDownloadService.kt | 26 ++++++-- .../manager/ui/dialogs/DialogContainer.kt | 4 +- .../ChosenPreferenceDialogFragment.kt | 4 +- .../manager/ui/fragments/HomeFragment.kt | 5 +- .../manager/ui/fragments/SettingsFragment.kt | 16 ++--- .../manager/ui/fragments/URLChangeFragment.kt | 42 +++++++++++++ .../manager/ui/viewmodels/HomeViewModel.kt | 14 ++--- .../com/vanced/manager/utils/InternetTools.kt | 20 +++--- .../manager/utils/NotificationHelper.kt | 32 ++++++++++ .../layout/fragment_chosen_preferences.xml | 50 ++++----------- .../main/res/layout/fragment_custom_url.xml | 63 +++++++++++++++++++ app/src/main/res/layout/fragment_home.xml | 5 ++ .../res/layout/fragment_manager_changelog.xml | 2 +- .../res/layout/fragment_microg_changelog.xml | 2 +- .../res/layout/fragment_vanced_changelog.xml | 2 +- app/src/main/res/layout/include_microg.xml | 1 + .../main/res/layout/include_useful_links.xml | 3 +- app/src/main/res/layout/include_vanced.xml | 1 + .../main/res/navigation/mobile_navigation.xml | 19 +----- app/src/main/res/values/strings.xml | 14 ++++- app/src/main/res/xml/preferences.xml | 10 +-- 22 files changed, 258 insertions(+), 106 deletions(-) create mode 100644 app/src/main/java/com/vanced/manager/ui/fragments/URLChangeFragment.kt create mode 100644 app/src/main/java/com/vanced/manager/utils/NotificationHelper.kt create mode 100644 app/src/main/res/layout/fragment_custom_url.xml diff --git a/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt b/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt index 522974b6..db723c74 100644 --- a/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt +++ b/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt @@ -13,6 +13,9 @@ import com.downloader.OnStartOrResumeListener import com.downloader.PRDownloader import com.vanced.manager.ui.fragments.HomeFragment import com.vanced.manager.utils.InternetTools.getFileNameFromUrl +import com.vanced.manager.utils.NotificationHelper +import java.lang.Exception +import java.lang.IllegalStateException import java.util.concurrent.ExecutionException class MicrogDownloadService: Service() { @@ -20,8 +23,11 @@ class MicrogDownloadService: Service() { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { try { downloadMicrog() - } catch (e: ExecutionException) { - Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show() + } catch (e: Exception) { + when (e) { + is ExecutionException, is IllegalStateException -> Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show() + else -> throw e + } } stopSelf() return START_STICKY @@ -33,6 +39,7 @@ class MicrogDownloadService: Service() { val apkUrl = GetJson().AsJSONObject("https://x1nto.github.io/VancedFiles/microg.json") val dwnldUrl = apkUrl.get("url").asString + val channel = 420 PRDownloader.download(dwnldUrl, filesDir.path, "microg.apk") .build() .setOnStartOrResumeListener { OnStartOrResumeListener { TODO("Not yet implemented") } } @@ -43,6 +50,12 @@ class MicrogDownloadService: Service() { intent.putExtra("microgProgress", mProgress.toInt()) intent.putExtra("fileName", "Downloading ${getFileNameFromUrl(dwnldUrl)}...") LocalBroadcastManager.getInstance(this).sendBroadcast(intent) + NotificationHelper.displayDownloadNotif( + channel, + maxVal = 0, + filename = getFileNameFromUrl(dwnldUrl), + context = this@MicrogDownloadService + ) } .start(object : OnDownloadListener { override fun onDownloadComplete() { @@ -50,12 +63,24 @@ class MicrogDownloadService: Service() { intent.action = HomeFragment.MICROG_DOWNLOADED LocalBroadcastManager.getInstance(this@MicrogDownloadService).sendBroadcast(intent) prefs?.edit()?.putBoolean("isMicrogDownloading", false)?.apply() + NotificationHelper.displayDownloadNotif( + channel, + maxVal = 0, + filename = getFileNameFromUrl(dwnldUrl), + context = this@MicrogDownloadService + ) } override fun onError(error: Error) { val intent = Intent(HomeFragment.DOWNLOAD_ERROR) intent.action = HomeFragment.DOWNLOAD_ERROR intent.putExtra("DownloadError", error.toString()) LocalBroadcastManager.getInstance(this@MicrogDownloadService).sendBroadcast(intent) + NotificationHelper.displayDownloadNotif( + channel, + maxVal = 0, + filename = getFileNameFromUrl(dwnldUrl), + context = this@MicrogDownloadService + ) } }) } diff --git a/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt b/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt index 510554b9..b0ec9339 100644 --- a/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt +++ b/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt @@ -15,15 +15,25 @@ import com.vanced.manager.core.installer.RootSplitInstallerService import com.vanced.manager.core.installer.SplitInstaller import com.vanced.manager.ui.fragments.HomeFragment import com.vanced.manager.utils.InternetTools.getFileNameFromUrl +import com.vanced.manager.utils.InternetTools.getLatestVancedUrl +import com.vanced.manager.utils.NotificationHelper.displayDownloadNotif +import java.lang.Exception +import java.lang.IllegalStateException import java.util.concurrent.ExecutionException class VancedDownloadService: Service() { + private val baseUrl = PreferenceManager.getDefaultSharedPreferences(this).getString("install_url", getLatestVancedUrl(this)) + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { try { downloadSplits() - } catch (e: ExecutionException) { - Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show() + } catch (e: Exception) { + when (e) { + is ExecutionException, is IllegalStateException -> Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show() + else -> throw e + } + } stopSelf() return START_STICKY @@ -53,6 +63,8 @@ class VancedDownloadService: Service() { else -> throw NotImplementedError("This type of APK is NOT valid. What the hell did you even do?") } + val channel = 69 + PRDownloader.download(url, cacheDir.path, getFileNameFromUrl(url)) .build() .setOnProgressListener { progress -> @@ -65,6 +77,7 @@ class VancedDownloadService: Service() { "Downloading ${getFileNameFromUrl(url)}..." ) LocalBroadcastManager.getInstance(this).sendBroadcast(intent) + displayDownloadNotif(channel, mProgress.toInt(), filename = getFileNameFromUrl(url), context = this) } .start(object : OnDownloadListener { override fun onDownloadComplete() { @@ -74,11 +87,15 @@ class VancedDownloadService: Service() { "lang" -> { if (lang == "en") { prepareInstall(variant!!) + displayDownloadNotif(channel, maxVal = 0, filename = getFileNameFromUrl(url), context = this@VancedDownloadService) } else { downloadSplits("enlang") } } - "enlang" -> prepareInstall(variant!!) + "enlang" -> { + prepareInstall(variant!!) + displayDownloadNotif(channel, maxVal = 0, filename = getFileNameFromUrl(url), context = this@VancedDownloadService) + } } } @@ -109,9 +126,6 @@ class VancedDownloadService: Service() { private fun launchRootInstaller() { startService(Intent(this, RootSplitInstallerService::class.java)) } - companion object { - const val baseUrl = "https://vanced.app/api/v1/apks/v15.05.54" - } override fun onBind(intent: Intent?): IBinder? { return null diff --git a/app/src/main/java/com/vanced/manager/ui/dialogs/DialogContainer.kt b/app/src/main/java/com/vanced/manager/ui/dialogs/DialogContainer.kt index 2a67cab6..8ed05aa9 100644 --- a/app/src/main/java/com/vanced/manager/ui/dialogs/DialogContainer.kt +++ b/app/src/main/java/com/vanced/manager/ui/dialogs/DialogContainer.kt @@ -42,8 +42,8 @@ object DialogContainer { fun showRootDialog(activity: Activity) { AlertDialog.Builder(activity) - .setTitle(activity.getString(R.string.miui_two_title)) - .setMessage(activity.getString(R.string.miui_two)) + .setTitle(activity.getString(R.string.hold_on)) + .setMessage(activity.getString(R.string.disable_signature)) .setPositiveButton(activity.getString(R.string.button_dismiss)) { dialog, _ -> dialog.dismiss() PreferenceManager.getDefaultSharedPreferences(activity).edit().putBoolean("show_root_dialog", false).apply() diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/ChosenPreferenceDialogFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/ChosenPreferenceDialogFragment.kt index ddb24ad8..6e463565 100644 --- a/app/src/main/java/com/vanced/manager/ui/fragments/ChosenPreferenceDialogFragment.kt +++ b/app/src/main/java/com/vanced/manager/ui/fragments/ChosenPreferenceDialogFragment.kt @@ -35,8 +35,8 @@ class ChosenPreferenceDialogFragment : DialogFragment() { val prefs = activity?.getSharedPreferences("installPrefs", Context.MODE_PRIVATE) - themetxt.text = prefs?.getString("theme", "dark") - langtxt.text = prefs?.getString("lang", "en") + themetxt.text = activity?.getString(R.string.chosen_theme, prefs?.getString("theme", "dark")) + langtxt.text = activity?.getString(R.string.chosen_lang, prefs?.getString("lang", "en")) closebtn.setOnClickListener { dismiss() } diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt index a509da1c..0e366781 100644 --- a/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt +++ b/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt @@ -9,6 +9,7 @@ import android.graphics.Color import android.os.Bundle import android.util.Log import android.view.* +import android.view.animation.AccelerateDecelerateInterpolator import android.view.animation.Animation import android.view.animation.RotateAnimation import android.widget.* @@ -74,12 +75,12 @@ class HomeFragment : Home() { viewPagerContainer?.visibility = View.GONE tabLayoutContainer?.visibility = View.GONE isExpanded = false - arrow?.startAnimation(RotateAnimation(180f, 0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f)) + arrow?.animate()?.rotation(0F)?.interpolator = AccelerateDecelerateInterpolator() } else { viewPagerContainer?.visibility = View.VISIBLE tabLayoutContainer?.visibility = View.VISIBLE isExpanded = true - arrow?.startAnimation(RotateAnimation(0f, 180f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f)) + arrow?.animate()?.rotation(180F)?.interpolator = AccelerateDecelerateInterpolator() } } diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/SettingsFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/SettingsFragment.kt index d9914e3f..48eb72ac 100644 --- a/app/src/main/java/com/vanced/manager/ui/fragments/SettingsFragment.kt +++ b/app/src/main/java/com/vanced/manager/ui/fragments/SettingsFragment.kt @@ -1,6 +1,5 @@ package com.vanced.manager.ui.fragments -import android.content.Intent import android.os.Bundle import android.view.Menu import android.view.MenuInflater @@ -9,18 +8,16 @@ import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceManager import com.vanced.manager.R -import com.vanced.manager.ui.MainActivity class SettingsFragment : PreferenceFragmentCompat() { - @ExperimentalStdlibApi override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.preferences, rootKey) activity?.title = getString(R.string.title_settings) setHasOptionsMenu(true) - /* + val updateCheck: Preference? = findPreference("update_check") updateCheck?.setOnPreferenceClickListener { val fm = childFragmentManager.beginTransaction() @@ -28,8 +25,6 @@ class SettingsFragment : PreferenceFragmentCompat() { updateDialog.show(fm, "Update Center") true } - - */ val themeSwitch: ListPreference? = findPreference("theme_mode") themeSwitch?.summary = @@ -46,7 +41,6 @@ class SettingsFragment : PreferenceFragmentCompat() { true } - /* val chosenPrefs: Preference? = findPreference("vanced_chosen_modes") chosenPrefs?.setOnPreferenceClickListener { val fm = childFragmentManager.beginTransaction() @@ -55,7 +49,13 @@ class SettingsFragment : PreferenceFragmentCompat() { true } - */ + val installUrl: Preference? = findPreference("install_url") + installUrl?.setOnPreferenceClickListener { + val fm = childFragmentManager.beginTransaction() + val chosenPrefsDialog = URLChangeFragment() + chosenPrefsDialog.show(fm, "Install URL") + true + } } diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/URLChangeFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/URLChangeFragment.kt new file mode 100644 index 00000000..9008fa6a --- /dev/null +++ b/app/src/main/java/com/vanced/manager/ui/fragments/URLChangeFragment.kt @@ -0,0 +1,42 @@ +package com.vanced.manager.ui.fragments + +import android.graphics.Color +import android.graphics.drawable.ColorDrawable +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.EditText +import androidx.fragment.app.DialogFragment +import androidx.preference.PreferenceManager +import com.dezlum.codelabs.getjson.GetJson +import com.google.android.material.button.MaterialButton +import com.vanced.manager.R +import com.vanced.manager.utils.InternetTools.getLatestVancedUrl + +class URLChangeFragment : DialogFragment() { + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + if (dialog != null && dialog?.window != null) { + dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) + } + return inflater.inflate(R.layout.fragment_update_check, container, false) + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + val urlField = view.findViewById(R.id.url_input) + val prefs = PreferenceManager.getDefaultSharedPreferences(activity) + urlField.hint = prefs.getString("install_url", activity?.let { getLatestVancedUrl(it) }) + view.findViewById(R.id.url_save).setOnClickListener { + prefs.edit().putString("install_url", urlField.text.toString()).apply() + } + view.findViewById(R.id.url_reset).setOnClickListener { + prefs.edit().putString("install_url", activity?.let { getLatestVancedUrl(it) }).apply() + } + } + +} diff --git a/app/src/main/java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt b/app/src/main/java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt index cf33bab5..19ec5c7e 100644 --- a/app/src/main/java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt +++ b/app/src/main/java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt @@ -46,10 +46,10 @@ class HomeViewModel(application: Application): AndroidViewModel(application) { val vancedVersion: MutableLiveData = MutableLiveData() val microgVersion: MutableLiveData = MutableLiveData() - val vancedInstalledVersionCode = getPkgVerCode(vancedInstalled, vancedPkgName) + private val vancedInstalledVersionCode = getPkgVerCode(vancedInstalled, vancedPkgName) private val microgInstalledVersionCode = getPkgVerCode(microgInstalled, "com.mgoogle.android.gms") - val vancedVersionCode = displayJsonInt("vanced.json", "versionCode", application) + private val vancedVersionCode = displayJsonInt("vanced.json", "versionCode", application) private val microgVersionCode = displayJsonInt("microg.json", "versionCode", application) val microgInstallButtonTxt = compareInt(microgInstalledVersionCode, microgVersionCode, application) @@ -112,7 +112,7 @@ class HomeViewModel(application: Application): AndroidViewModel(application) { return if (connected) when { int1 > int2 -> application.getString(R.string.update) - int2 == int1 -> application.getString(R.string.button_installed) + int2 == int1 -> application.getString(R.string.button_reinstall) else -> application.getString(R.string.install) } else application.getString(R.string.install) } @@ -135,21 +135,21 @@ class HomeViewModel(application: Application): AndroidViewModel(application) { vancedInstallButtonIcon.value = if (variant == "nonroot") { if (microgInstalled) - compareIntDrawable(vancedInstalledVersionCode, vancedVersionCode, application) + compareIntDrawable(vancedVersionCode, vancedInstalledVersionCode, application) else null } else - compareIntDrawable(vancedInstalledVersionCode, vancedVersionCode, application) + compareIntDrawable(vancedVersionCode, vancedInstalledVersionCode, application) vancedInstallButtonTxt.value = if (variant == "nonroot") { if (microgInstalled) { - compareInt(vancedInstalledVersionCode, vancedVersionCode, application) + compareInt(vancedVersionCode, vancedInstalledVersionCode, application) } else { application.getString(R.string.no_microg) } } else - compareInt(vancedInstalledVersionCode, vancedVersionCode, application) + compareInt(vancedVersionCode, vancedInstalledVersionCode, application) } diff --git a/app/src/main/java/com/vanced/manager/utils/InternetTools.kt b/app/src/main/java/com/vanced/manager/utils/InternetTools.kt index 72214de3..5e8f2f61 100644 --- a/app/src/main/java/com/vanced/manager/utils/InternetTools.kt +++ b/app/src/main/java/com/vanced/manager/utils/InternetTools.kt @@ -1,24 +1,12 @@ package com.vanced.manager.utils import android.content.Context -import android.net.Uri -import android.view.View -import androidx.browser.customtabs.CustomTabsIntent -import androidx.core.content.ContextCompat import com.dezlum.codelabs.getjson.GetJson import com.vanced.manager.BuildConfig import com.vanced.manager.R import java.lang.IllegalStateException object InternetTools { - - fun openUrl(Url: String, color: Int, context: Context) { - val builder = CustomTabsIntent.Builder() - builder.setToolbarColor(ContextCompat.getColor(context, color)) - val customTabsIntent = builder.build() - customTabsIntent.launchUrl(context, Uri.parse(Url)) - } - fun getFileNameFromUrl(url: String) = url.substring(url.lastIndexOf('/')+1, url.length) fun displayJsonString(json: String, obj: String, context: Context): String { @@ -50,5 +38,13 @@ object InternetTools { return remoteVersion > BuildConfig.VERSION_CODE } + fun getLatestVancedUrl(context: Context): String { + return if (GetJson().isConnected(context)) { + val latestVer = GetJson().AsJSONObject("https://x1nto.github.io/vanced.json").getAsJsonObject("version").asString + "https://vanced.app/api/v1/apks/$latestVer" + } else + "https://vanced.app/api/v1/apks/v15.05.54" + } + } diff --git a/app/src/main/java/com/vanced/manager/utils/NotificationHelper.kt b/app/src/main/java/com/vanced/manager/utils/NotificationHelper.kt new file mode 100644 index 00000000..a62e251b --- /dev/null +++ b/app/src/main/java/com/vanced/manager/utils/NotificationHelper.kt @@ -0,0 +1,32 @@ +package com.vanced.manager.utils + +import android.app.Notification +import android.app.NotificationManager +import android.content.Context +import android.os.Build +import com.vanced.manager.R + +object NotificationHelper { + + fun displayDownloadNotif(channel: Int, maxVal: Int = 100, progress:Int = 0, filename: String, context: Context) { + val notifBuilder = + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) + Notification.Builder(context, channel.toString()).setChannelId(channel.toString()) + else + Notification.Builder(context).setPriority(Notification.PRIORITY_DEFAULT) + + notifBuilder.apply { + setContentTitle(context.getString(R.string.app_name)) + setContentText(context.getString(R.string.downloading_file, filename)) + } + val notif = notifBuilder.build() + val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager + notificationManager.apply { + notifBuilder.setProgress(maxVal, progress, false) + notify(channel, notif) + } + + + } + +} \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_chosen_preferences.xml b/app/src/main/res/layout/fragment_chosen_preferences.xml index 2f593117..567aa7b2 100644 --- a/app/src/main/res/layout/fragment_chosen_preferences.xml +++ b/app/src/main/res/layout/fragment_chosen_preferences.xml @@ -20,49 +20,23 @@ - + android:layout_height="wrap_content" + android:text="" /> - - - - - - - - - - - - - + android:layout_height="wrap_content" + android:text="" /> + android:text="@string/reset" /> diff --git a/app/src/main/res/layout/fragment_custom_url.xml b/app/src/main/res/layout/fragment_custom_url.xml new file mode 100644 index 00000000..f6feb33f --- /dev/null +++ b/app/src/main/res/layout/fragment_custom_url.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 6e99de6c..4e8011c5 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -17,6 +17,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" + android:animateLayoutChanges="true" android:scrollbars="none"> @@ -64,6 +67,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/Widget.MaterialComponents.Button.OutlinedButton" + bind:strokeWidth="3dp" + bind:strokeColor="?colorPrimary" android:textAllCaps="false" android:text="@string/root"/> diff --git a/app/src/main/res/layout/fragment_manager_changelog.xml b/app/src/main/res/layout/fragment_manager_changelog.xml index 857f67bb..a8caa605 100644 --- a/app/src/main/res/layout/fragment_manager_changelog.xml +++ b/app/src/main/res/layout/fragment_manager_changelog.xml @@ -10,7 +10,7 @@ android:id="@+id/manager_changelog" android:layout_width="match_parent" android:layout_height="wrap_content" - android:textSize="18sp" + android:textSize="16sp" android:text="@string/loading" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_microg_changelog.xml b/app/src/main/res/layout/fragment_microg_changelog.xml index 33cfa853..8b7ccc75 100644 --- a/app/src/main/res/layout/fragment_microg_changelog.xml +++ b/app/src/main/res/layout/fragment_microg_changelog.xml @@ -10,7 +10,7 @@ android:id="@+id/microg_changelog" android:layout_width="match_parent" android:layout_height="wrap_content" - android:textSize="18sp" + android:textSize="16sp" android:text="Changes:\n - Added casting support\n - Fixed notifications\n\nMicroG now requires Vanced 14.21.54 and up" tools:ignore="HardcodedText" /> diff --git a/app/src/main/res/layout/fragment_vanced_changelog.xml b/app/src/main/res/layout/fragment_vanced_changelog.xml index 972754a8..5e2f0e7b 100644 --- a/app/src/main/res/layout/fragment_vanced_changelog.xml +++ b/app/src/main/res/layout/fragment_vanced_changelog.xml @@ -10,7 +10,7 @@ android:id="@+id/vanced_changelog" android:layout_width="match_parent" android:layout_height="match_parent" - android:textSize="18sp" + android:textSize="16sp" android:text="Removed:\n - Auto subtitles (has been replaced with live captions)\n - minimised video player style (Google removed it) \n diff --git a/app/src/main/res/layout/include_microg.xml b/app/src/main/res/layout/include_microg.xml index 96b82d25..fd8cba1f 100644 --- a/app/src/main/res/layout/include_microg.xml +++ b/app/src/main/res/layout/include_microg.xml @@ -132,6 +132,7 @@ android:layout_height="wrap_content" style="@style/CardTitle" android:text="Downloading" + android:textSize="16sp" android:visibility="gone" tools:visibility="visible"/> diff --git a/app/src/main/res/layout/include_useful_links.xml b/app/src/main/res/layout/include_useful_links.xml index 3573f272..6d4f96ce 100644 --- a/app/src/main/res/layout/include_useful_links.xml +++ b/app/src/main/res/layout/include_useful_links.xml @@ -14,7 +14,8 @@ + app:contentPaddingTop="2dp" + android:animateLayoutChanges="true"> diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml index 9b00fdbd..408e1f08 100644 --- a/app/src/main/res/navigation/mobile_navigation.xml +++ b/app/src/main/res/navigation/mobile_navigation.xml @@ -43,8 +43,8 @@ android:label="@string/title_settings"> - - - - - - Close + Reset + Save About @@ -15,7 +17,7 @@ Changelogs Check - Root mode detected! In order for manager to install Vanced correctly, please make sure you disabled signature verification. + Downloading %1$s Failed to uninstall package: Install Operation failed because user aborted installation @@ -25,14 +27,16 @@ Operation failed because app is incompatible with your device Operation failed because apk files are invalid Unexpected error occurred while installing Vanced. Did you disable signature verification? + Unexpected error occurred while installing Vanced. Did you disable MiUI Optimisations? Operation failed because there was an error with storage. Hold up how is that even possible? - Installed + Reinstall Installed: Latest: Loading… MicroG successfully installed Network connection unavailable No Microg! + Unable to download %1$s Unavailable Update Useful Links @@ -51,11 +55,15 @@ Interface Manager Chosen Installation values + Language: %1$s + Theme: %1$s + Chosen Preferences Theme Follow System Dark Theme Light Theme Choose your preferred theme + Update Channel URL Push Notifications Receive push notifications when update is released Re-check @@ -64,6 +72,7 @@ No new updates + Hold on! Detected MiUI user! Hey! Looks like you\'re a MiUI user. in order to properly use Vanced Manager, you will have to disable MiUI optimisations in developer settings\nIf you can\'t find such setting, it means that you are using a new version of ROM which does not need fixing anything. I\'m gonna stop you right there! @@ -80,6 +89,7 @@ Choose your preferred language for Vanced Note: if you install anything other than English, English will still be installed as an additional language Choose your preferred theme for Vanced + Root mode detected! In order for manager to install Vanced correctly, please make sure you disabled signature verification. Finish Light + Black Light + Dark diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index b4c6ba3a..799d7f81 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -11,8 +11,7 @@ + android:icon="@drawable/ic_cloud_upload_black_24dp" /> + android:key="vanced_chosen_modes" /> + +