mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-25 12:45:12 +00:00
added a version selector and more dialogs
This commit is contained in:
parent
6015b072b6
commit
c897f55039
76 changed files with 463 additions and 434 deletions
2
app/proguard-rules.pro
vendored
2
app/proguard-rules.pro
vendored
|
@ -13,7 +13,7 @@
|
|||
#}
|
||||
|
||||
-keep class com.vanced.manager.core.App
|
||||
-keepnames class androidx.navigation.fragment.NavHostFragment
|
||||
-keep class com.crowdin.platform.* { *; }
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
|
|
|
@ -50,14 +50,14 @@
|
|||
|
||||
<activity
|
||||
android:name=".ui.WelcomeActivity"
|
||||
android:theme="@style/DarkTheme.Blue"/>
|
||||
android:theme="@style/DarkTheme_Blue"/>
|
||||
|
||||
<activity
|
||||
android:name=".ui.MainActivity"
|
||||
android:configChanges="layoutDirection|locale"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/DarkTheme.Blue">
|
||||
android:theme="@style/DarkTheme_Blue">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
|
|
@ -19,7 +19,7 @@ class AppListAdapter(
|
|||
) : RecyclerView.Adapter<AppListAdapter.ListViewHolder>() {
|
||||
|
||||
val apps = mutableListOf<String>()
|
||||
val dataModels = mutableListOf<DataModel?>()
|
||||
private val dataModels = mutableListOf<DataModel?>()
|
||||
private val rootDataModels = mutableListOf<DataModel?>()
|
||||
private val prefs = getDefaultSharedPreferences(context)
|
||||
private var itemCount = 0
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package com.vanced.manager.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.TextView
|
||||
import com.vanced.manager.model.AppVersionsModel
|
||||
|
||||
class AppVersionsAdapter(context: Context, private var values: Array<AppVersionsModel>) : ArrayAdapter<AppVersionsModel?>(context, android.R.layout.simple_spinner_dropdown_item, values) {
|
||||
|
||||
override fun getCount(): Int {
|
||||
return values.size
|
||||
}
|
||||
|
||||
override fun getItem(position: Int): AppVersionsModel {
|
||||
return values[position]
|
||||
}
|
||||
|
||||
override fun getItemId(position: Int): Long {
|
||||
return position.toLong()
|
||||
}
|
||||
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val label = super.getView(position, convertView, parent) as TextView
|
||||
label.text = values[position].version
|
||||
return label
|
||||
}
|
||||
|
||||
override fun getDropDownView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val label = super.getDropDownView(position, convertView, parent) as TextView
|
||||
label.text = values[position].version
|
||||
return label
|
||||
}
|
||||
|
||||
fun getPrefValue(position: Int): String {
|
||||
return values[position].value
|
||||
}
|
||||
|
||||
}
|
|
@ -13,6 +13,7 @@ import com.crowdin.platform.data.remote.NetworkType
|
|||
import com.downloader.PRDownloader
|
||||
import com.vanced.manager.BuildConfig.*
|
||||
import com.vanced.manager.utils.InternetTools.baseUrl
|
||||
import com.vanced.manager.utils.InternetTools.loadJson
|
||||
import com.vanced.manager.utils.JsonHelper.getJson
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -20,17 +21,10 @@ import kotlinx.coroutines.launch
|
|||
|
||||
open class App: Application() {
|
||||
|
||||
var vanced = ObservableField<JsonObject?>()
|
||||
var music = ObservableField<JsonObject?>()
|
||||
var microg = ObservableField<JsonObject?>()
|
||||
var manager = ObservableField<JsonObject?>()
|
||||
|
||||
private val prefs by lazy { getDefaultSharedPreferences(this) }
|
||||
|
||||
//var braveTiers = ObservableField<JsonObject?>()
|
||||
|
||||
override fun onCreate() {
|
||||
loadJson()
|
||||
loadJson(this)
|
||||
super.onCreate()
|
||||
PRDownloader.initialize(this)
|
||||
|
||||
|
@ -39,7 +33,9 @@ open class App: Application() {
|
|||
withDistributionHash(CROWDIN_HASH)
|
||||
withNetworkType(NetworkType.WIFI)
|
||||
if (ENABLE_CROWDIN_AUTH) {
|
||||
withRealTimeUpdates()
|
||||
if (prefs.getBoolean("crowdin_real_time", false))
|
||||
withRealTimeUpdates()
|
||||
|
||||
withSourceLanguage("en")
|
||||
withAuthConfig(AuthConfig(CROWDIN_CLIENT_ID, CROWDIN_CLIENT_SECRET, null))
|
||||
withScreenshotEnabled()
|
||||
|
@ -53,32 +49,6 @@ open class App: Application() {
|
|||
|
||||
}
|
||||
|
||||
open fun loadJson() = CoroutineScope(Dispatchers.IO).launch {
|
||||
val installUrl = prefs.getString("install_url", baseUrl)
|
||||
val latest = getJson("$installUrl/latest.json")
|
||||
// braveTiers.apply {
|
||||
// set(getJson("$installUrl/sponsor.json"))
|
||||
// notifyChange()
|
||||
// }
|
||||
|
||||
vanced.apply {
|
||||
set(latest?.obj("vanced"))
|
||||
notifyChange()
|
||||
}
|
||||
music.apply {
|
||||
set(latest?.obj("music"))
|
||||
notifyChange()
|
||||
}
|
||||
microg.apply {
|
||||
set(latest?.obj("microg"))
|
||||
notifyChange()
|
||||
}
|
||||
manager.apply {
|
||||
set(latest?.obj("manager"))
|
||||
notifyChange()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
Crowdin.onConfigurationChanged()
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.vanced.manager.R
|
|||
import com.vanced.manager.core.App
|
||||
import com.vanced.manager.utils.DownloadHelper.downloadProgress
|
||||
import com.vanced.manager.utils.InternetTools.getFileNameFromUrl
|
||||
import com.vanced.manager.utils.InternetTools.microg
|
||||
import com.vanced.manager.utils.PackageHelper.install
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -19,7 +20,7 @@ object MicrogDownloader {
|
|||
context: Context,
|
||||
) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
val url = (context.applicationContext as App).microg.get()?.string("url")
|
||||
val url = microg.get()?.string("url")
|
||||
|
||||
downloadProgress.get()?.currentDownload = PRDownloader.download(url, context.getExternalFilesDir("microg")?.path, "microg.apk")
|
||||
.build()
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.vanced.manager.core.App
|
|||
import com.vanced.manager.utils.DownloadHelper.downloadProgress
|
||||
import com.vanced.manager.utils.InternetTools.baseUrl
|
||||
import com.vanced.manager.utils.InternetTools.getFileNameFromUrl
|
||||
import com.vanced.manager.utils.InternetTools.music
|
||||
import com.vanced.manager.utils.PackageHelper.install
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -23,7 +24,7 @@ object MusicDownloader {
|
|||
CoroutineScope(Dispatchers.IO).launch {
|
||||
val prefs = getDefaultSharedPreferences(context)
|
||||
variant = prefs.getString("vanced_variant", "nonroot")
|
||||
val url = "${prefs.getString("install_url", baseUrl)}/music/v${(context.applicationContext as App).music.get()?.string("version")}.apk"
|
||||
val url = "${prefs.getString("install_url", baseUrl)}/music/v${music.get()?.string("version")}.apk"
|
||||
|
||||
downloadProgress.get()?.currentDownload = PRDownloader.download(url, context.getExternalFilesDir("music/$variant")?.path, "music.apk")
|
||||
.build()
|
||||
|
|
|
@ -10,12 +10,14 @@ import com.downloader.PRDownloader
|
|||
import com.google.firebase.analytics.FirebaseAnalytics
|
||||
import com.google.firebase.analytics.ktx.logEvent
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.core.App
|
||||
import com.vanced.manager.utils.AppUtils.vancedRootPkg
|
||||
import com.vanced.manager.utils.DownloadHelper.downloadProgress
|
||||
import com.vanced.manager.utils.Extensions.convertToAppVersions
|
||||
import com.vanced.manager.utils.InternetTools
|
||||
import com.vanced.manager.utils.InternetTools.baseUrl
|
||||
import com.vanced.manager.utils.InternetTools.getFileNameFromUrl
|
||||
import com.vanced.manager.utils.InternetTools.vanced
|
||||
import com.vanced.manager.utils.InternetTools.vancedVersions
|
||||
import com.vanced.manager.utils.LanguageHelper.getDefaultVancedLanguages
|
||||
import com.vanced.manager.utils.PackageHelper.getPkgVerCode
|
||||
import com.vanced.manager.utils.PackageHelper.installVanced
|
||||
|
@ -53,16 +55,15 @@ object VancedDownloader {
|
|||
private var downloadPath: String? = null
|
||||
|
||||
fun downloadVanced(context: Context) {
|
||||
val app = context.applicationContext as App
|
||||
defPrefs = getDefaultSharedPreferences(context)
|
||||
installUrl = defPrefs.getString("install_url", baseUrl)
|
||||
prefs = context.getSharedPreferences("installPrefs", Context.MODE_PRIVATE)
|
||||
variant = defPrefs.getString("vanced_variant", "nonroot")
|
||||
downloadPath = context.getExternalFilesDir("vanced/$variant")?.path
|
||||
File(downloadPath.toString()).deleteRecursively()
|
||||
lang = prefs.getString("lang", getDefaultVancedLanguages(app))?.split(", ")?.toMutableList()
|
||||
lang = prefs.getString("lang", getDefaultVancedLanguages())?.split(", ")?.toMutableList()
|
||||
theme = prefs.getString("theme", "dark")
|
||||
vancedVersion = app.vanced.get()?.string("version")
|
||||
vancedVersion = defPrefs.getString("vanced_version", vancedVersions.get()?.value?.convertToAppVersions()?.get(0)?.value)
|
||||
themePath = "$installUrl/apks/v$vancedVersion/$variant/Theme"
|
||||
hashUrl = "apks/v$vancedVersion/$variant/Theme/hash.json"
|
||||
//newInstaller = defPrefs.getBoolean("new_installer", false)
|
||||
|
@ -74,7 +75,7 @@ object VancedDownloader {
|
|||
}
|
||||
count = 0
|
||||
|
||||
vancedVersionCode = app.vanced.get()?.int("versionCode") ?: 0
|
||||
vancedVersionCode = vanced.get()?.int("versionCode") ?: 0
|
||||
downloadSplits(context)
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
package com.vanced.manager.model
|
||||
|
||||
data class AppVersionsModel(
|
||||
val version: String,
|
||||
val value: String
|
||||
)
|
|
@ -3,11 +3,8 @@ package com.vanced.manager.model
|
|||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.databinding.Observable
|
||||
import androidx.databinding.ObservableBoolean
|
||||
import androidx.databinding.ObservableField
|
||||
import androidx.databinding.ObservableInt
|
||||
import androidx.databinding.*
|
||||
import com.beust.klaxon.JsonArray
|
||||
import com.beust.klaxon.JsonObject
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.utils.PackageHelper.isPackageInstalled
|
||||
|
@ -20,7 +17,8 @@ open class DataModel(
|
|||
private val context: Context,
|
||||
val appPkg: String,
|
||||
val appName: String,
|
||||
val appIcon: Drawable?
|
||||
val appIcon: Drawable?,
|
||||
appVersions: ObservableField<JsonArray<String>>? = null
|
||||
) {
|
||||
|
||||
private val versionCode = ObservableInt()
|
||||
|
@ -28,29 +26,34 @@ open class DataModel(
|
|||
|
||||
val isAppInstalled = ObservableBoolean()
|
||||
val versionName = ObservableField<String>()
|
||||
//val versions = ObservableField<Array<AppVersionsModel>>()
|
||||
val installedVersionName = ObservableField<String>()
|
||||
val buttonTxt = ObservableField<String>()
|
||||
//val buttonIcon = ObservableField<Drawable>()
|
||||
val changelog = ObservableField<String>()
|
||||
|
||||
fun fetch() = CoroutineScope(Dispatchers.IO).launch {
|
||||
val jobj = jsonObject.get()
|
||||
isAppInstalled.set(isPackageInstalled(appPkg, context.packageManager))
|
||||
versionName.set(jsonObject.get()?.string("version")?.removeSuffix("-vanced") ?: context.getString(R.string.unavailable))
|
||||
versionName.set(jobj?.string("version")?.removeSuffix("-vanced") ?: context.getString(R.string.unavailable))
|
||||
//versions.set(appVersions?.get()?.value?.convertToAppVersions())
|
||||
installedVersionName.set(getPkgVersionName(isAppInstalled.get(), appPkg))
|
||||
versionCode.set(jsonObject.get()?.int("versionCode") ?: 0)
|
||||
versionCode.set(jobj?.int("versionCode") ?: 0)
|
||||
installedVersionCode.set(getPkgVersionCode(isAppInstalled.get(), appPkg))
|
||||
buttonTxt.set(compareInt(installedVersionCode.get(), versionCode.get()))
|
||||
//buttonIcon.set(compareIntDrawable(installedVersionCode.get(), versionCode.get()))
|
||||
changelog.set(jsonObject.get()?.string("changelog") ?: context.getString(R.string.unavailable))
|
||||
changelog.set(jobj?.string("changelog") ?: context.getString(R.string.unavailable))
|
||||
}
|
||||
|
||||
init {
|
||||
fetch()
|
||||
jsonObject.addOnPropertyChangedCallback(object : Observable.OnPropertyChangedCallback() {
|
||||
jsonObject.addOnPropertyChangedCallback(object : Observable.OnPropertyChangedCallback() {
|
||||
override fun onPropertyChanged(sender: Observable?, propertyId: Int) {
|
||||
fetch()
|
||||
}
|
||||
})
|
||||
appVersions?.addOnPropertyChangedCallback(object : Observable.OnPropertyChangedCallback() {
|
||||
override fun onPropertyChanged(sender: Observable?, propertyId: Int) {
|
||||
fetch()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -83,13 +86,4 @@ open class DataModel(
|
|||
|
||||
}
|
||||
|
||||
private fun compareIntDrawable(int1: Int, int2: Int): Drawable? {
|
||||
return when {
|
||||
int1 == 0 -> ContextCompat.getDrawable(context, R.drawable.ic_download)
|
||||
int2 > int1 -> ContextCompat.getDrawable(context, R.drawable.ic_update)
|
||||
int2 == int1 -> ContextCompat.getDrawable(context, R.drawable.ic_done)
|
||||
else -> ContextCompat.getDrawable(context, R.drawable.ic_download)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.vanced.manager.model
|
||||
|
||||
data class VancedPrefModel(
|
||||
val name: String,
|
||||
val value: String
|
||||
val name: String,
|
||||
val value: String
|
||||
)
|
|
@ -17,6 +17,7 @@ import androidx.preference.PreferenceManager.getDefaultSharedPreferences
|
|||
import com.crowdin.platform.Crowdin
|
||||
import com.crowdin.platform.LoadingStateListener
|
||||
import com.google.firebase.messaging.FirebaseMessaging
|
||||
import com.vanced.manager.BuildConfig.ENABLE_CROWDIN_AUTH
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.databinding.ActivityMainBinding
|
||||
import com.vanced.manager.ui.dialogs.DialogContainer
|
||||
|
@ -27,6 +28,8 @@ import com.vanced.manager.ui.fragments.SettingsFragmentDirections
|
|||
import com.vanced.manager.utils.Extensions.show
|
||||
import com.vanced.manager.utils.InternetTools
|
||||
import com.vanced.manager.utils.LanguageContextWrapper
|
||||
import com.vanced.manager.utils.LanguageHelper.authCrowdin
|
||||
import com.vanced.manager.utils.LanguageHelper.onActivityResult
|
||||
import com.vanced.manager.utils.PackageHelper
|
||||
import com.vanced.manager.utils.ThemeHelper.setFinalTheme
|
||||
|
||||
|
@ -48,8 +51,10 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
setFinalTheme(this)
|
||||
setFinalTheme()
|
||||
super.onCreate(savedInstanceState)
|
||||
if (ENABLE_CROWDIN_AUTH)
|
||||
authCrowdin()
|
||||
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
|
||||
|
||||
|
@ -80,13 +85,12 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
override fun onResume() {
|
||||
setFinalTheme(this)
|
||||
setFinalTheme()
|
||||
super.onResume()
|
||||
Crowdin.registerDataLoadingObserver(loadingObserver)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
|
||||
when (item.itemId) {
|
||||
android.R.id.home -> {
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
|
@ -117,6 +121,11 @@ class MainActivity : AppCompatActivity() {
|
|||
super.attachBaseContext(Crowdin.wrapContext(LanguageContextWrapper.wrap(newBase)))
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
onActivityResult(requestCode)
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
recreate() //restarting activity to recreate viewmodels, otherwise some text won't update
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
package com.vanced.manager.ui.core
|
||||
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Rect
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
class ItemDecoration(private val line: Drawable?) : RecyclerView.ItemDecoration() {
|
||||
|
||||
override fun getItemOffsets(
|
||||
outRect: Rect,
|
||||
view: View,
|
||||
parent: RecyclerView,
|
||||
state: RecyclerView.State
|
||||
) {
|
||||
with(outRect) {
|
||||
top = 4
|
||||
bottom = 4
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDrawOver(c: Canvas, parent: RecyclerView, state: RecyclerView.State) {
|
||||
val dividerLeft = parent.paddingLeft
|
||||
val dividerRight = parent.width - parent.paddingRight
|
||||
|
||||
val childCount = parent.childCount
|
||||
(0..childCount - 2).forEach {
|
||||
val child = parent.getChildAt(it)
|
||||
val params = child.layoutParams as RecyclerView.LayoutParams
|
||||
val dividerTop: Int = child.bottom + params.bottomMargin
|
||||
val dividerBottom: Int = dividerTop + line!!.intrinsicHeight
|
||||
line.setBounds(dividerLeft, dividerTop, dividerRight, dividerBottom)
|
||||
line.draw(c)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -2,7 +2,6 @@ package com.vanced.manager.ui.core
|
|||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.CompoundButton
|
||||
import android.widget.FrameLayout
|
||||
|
@ -30,15 +29,14 @@ class PreferenceSwitch @JvmOverloads constructor(
|
|||
|
||||
override fun onFinishInflate() {
|
||||
super.onFinishInflate()
|
||||
preference_switch.isChecked = prefs.getBoolean(prefKey, defValue)
|
||||
setOnClickListener {
|
||||
preference_switch.isChecked = !preference_switch.isChecked
|
||||
Log.d("clickTest", "clicked")
|
||||
}
|
||||
preference_switch.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
prefs.edit().putBoolean(prefKey, isChecked).apply()
|
||||
mListener?.onChecked(buttonView, isChecked)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun setOnCheckedListener(method: (buttonView: CompoundButton, isChecked: Boolean) -> Unit) {
|
||||
|
@ -61,8 +59,10 @@ class PreferenceSwitch @JvmOverloads constructor(
|
|||
val key = typedArray.getText(R.styleable.PreferenceSwitch_switch_key)
|
||||
val value = typedArray.getBoolean(R.styleable.PreferenceSwitch_switch_def_value, false)
|
||||
|
||||
if (key != null)
|
||||
if (key != null) {
|
||||
prefKey = key.toString()
|
||||
preference_switch.isChecked = prefs.getBoolean(key.toString(), value)
|
||||
}
|
||||
|
||||
defValue = value
|
||||
preference_switch_title.text = title
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
package com.vanced.manager.ui.dialogs
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.edit
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
import com.google.android.material.radiobutton.MaterialRadioButton
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.databinding.DialogBottomRadioButtonBinding
|
||||
import com.vanced.manager.model.AppVersionsModel
|
||||
import com.vanced.manager.utils.Extensions.getCheckedButtonTag
|
||||
import com.vanced.manager.utils.Extensions.getDefaultPrefs
|
||||
import com.vanced.manager.utils.Extensions.show
|
||||
|
||||
class AppVersionSelectorDialog(
|
||||
private val versions: Array<AppVersionsModel>,
|
||||
private val app: String
|
||||
) : BottomSheetDialogFragment() {
|
||||
|
||||
private lateinit var binding: DialogBottomRadioButtonBinding
|
||||
private val prefs by lazy { requireActivity().getDefaultPrefs() }
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
binding = DataBindingUtil.inflate(inflater, R.layout.dialog_bottom_radio_button, container, false)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
loadBoxes()
|
||||
view.findViewWithTag<MaterialRadioButton>(prefs.getString("${app}_version", versions[0].value)).isChecked = true
|
||||
binding.dialogTitle.text = requireActivity().getString(R.string.version)
|
||||
binding.dialogSave.setOnClickListener {
|
||||
prefs.edit {
|
||||
putString("${app}_version", binding.dialogRadiogroup.getCheckedButtonTag())
|
||||
}
|
||||
dismiss()
|
||||
VancedPreferencesDialog().show(requireActivity())
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadBoxes() {
|
||||
requireActivity().runOnUiThread {
|
||||
for (i in versions.indices) {
|
||||
val rb = MaterialRadioButton(requireActivity()).apply {
|
||||
text = versions[i].version
|
||||
tag = versions[i].value
|
||||
textSize = 18f
|
||||
}
|
||||
binding.dialogRadiogroup.addView(rb, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -15,7 +15,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
|||
import com.google.android.material.button.MaterialButton
|
||||
import com.google.android.material.checkbox.MaterialCheckBox
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.core.App
|
||||
import com.vanced.manager.utils.InternetTools.vanced
|
||||
import com.vanced.manager.utils.LanguageHelper.getDefaultVancedLanguages
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -37,8 +37,7 @@ class VancedLanguageSelectionDialog : BottomSheetDialogFragment() {
|
|||
@ExperimentalStdlibApi
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
val app = activity?.application as App
|
||||
langs = app.vanced.get()?.array<String>("langs")?.value ?: mutableListOf("null")
|
||||
langs = vanced.get()?.array<String>("langs")?.value ?: mutableListOf("null")
|
||||
loadBoxes(view.findViewById(R.id.lang_button_ll))
|
||||
view.findViewById<MaterialButton>(R.id.vanced_install_finish).setOnClickListener {
|
||||
val chosenLangs = mutableListOf<String>()
|
||||
|
@ -62,7 +61,7 @@ class VancedLanguageSelectionDialog : BottomSheetDialogFragment() {
|
|||
@ExperimentalStdlibApi
|
||||
private fun loadBoxes(ll: LinearLayout) {
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
val langPrefs = prefs.getString("lang", getDefaultVancedLanguages(requireActivity()))
|
||||
val langPrefs = prefs.getString("lang", getDefaultVancedLanguages())
|
||||
if (this@VancedLanguageSelectionDialog::langs.isInitialized) {
|
||||
if (!langs.contains("null")) {
|
||||
langs.forEach { lang ->
|
||||
|
|
|
@ -5,14 +5,15 @@ import android.os.Bundle
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.AdapterView
|
||||
import android.widget.AdapterView.OnItemSelectedListener
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.adapter.VancedPrefArray
|
||||
import com.vanced.manager.databinding.DialogInstallationPreferencesBinding
|
||||
import com.vanced.manager.model.VancedPrefModel
|
||||
import com.vanced.manager.model.AppVersionsModel
|
||||
import com.vanced.manager.utils.Extensions.convertToAppTheme
|
||||
import com.vanced.manager.utils.Extensions.convertToAppVersions
|
||||
import com.vanced.manager.utils.Extensions.show
|
||||
import com.vanced.manager.utils.InternetTools.vancedVersions
|
||||
import com.vanced.manager.utils.LanguageHelper.getDefaultVancedLanguages
|
||||
import java.util.*
|
||||
|
||||
|
@ -33,7 +34,7 @@ class VancedPreferencesDialog : BottomSheetDialogFragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
val prefs = requireActivity().getSharedPreferences("installPrefs", Context.MODE_PRIVATE)
|
||||
val langPrefs = prefs.getString("lang", getDefaultVancedLanguages(requireActivity()))?.split(", ")?.toTypedArray()
|
||||
val langPrefs = prefs.getString("lang", getDefaultVancedLanguages())?.split(", ")?.toTypedArray()
|
||||
val showLang = mutableListOf<String>()
|
||||
if (langPrefs != null) {
|
||||
for (lang in langPrefs) {
|
||||
|
@ -41,37 +42,25 @@ class VancedPreferencesDialog : BottomSheetDialogFragment() {
|
|||
showLang.add(loc.getDisplayLanguage(loc).capitalize(Locale.ROOT))
|
||||
}
|
||||
}
|
||||
val vancedVersionsConv = vancedVersions.get()?.value?.convertToAppVersions() ?: arrayOf(AppVersionsModel("", ""))
|
||||
|
||||
val darkTheme = VancedPrefModel(
|
||||
requireActivity().getString(R.string.install_light_dark),
|
||||
"dark"
|
||||
)
|
||||
binding.chosenTheme.text = requireActivity().getString(R.string.chosen_theme, prefs.getString("theme", "dark")?.convertToAppTheme(requireActivity()))
|
||||
binding.chosenVersion.text = requireActivity().getString(R.string.chosen_version, prefs.getString("vanced_version", vancedVersionsConv[0].value))
|
||||
binding.chosenLang.text = requireActivity().getString(R.string.chosen_lang, showLang)
|
||||
|
||||
val blackTheme = VancedPrefModel(
|
||||
requireActivity().getString(R.string.install_light_black),
|
||||
"black"
|
||||
)
|
||||
binding.openThemeSelector.setOnClickListener {
|
||||
dismiss()
|
||||
VancedThemeDialog().show(requireActivity())
|
||||
}
|
||||
|
||||
val adapter = arrayOf(darkTheme, blackTheme)
|
||||
binding.themeSpinner.adapter = VancedPrefArray(requireActivity(), android.R.layout.simple_spinner_dropdown_item, adapter)
|
||||
binding.themeSpinner.setSelection(if (prefs.getString("theme", "dark") == "dark") 0 else 1)
|
||||
binding.openVersionSelector.setOnClickListener {
|
||||
dismiss()
|
||||
AppVersionSelectorDialog(vancedVersionsConv, "vanced").show(requireActivity())
|
||||
}
|
||||
|
||||
binding.openLanguageSelector.setOnClickListener {
|
||||
dismiss()
|
||||
VancedLanguageSelectionDialog().show(requireActivity().supportFragmentManager, "")
|
||||
}
|
||||
|
||||
binding.chosenLang.text = requireActivity().getString(R.string.chosen_lang, showLang)
|
||||
|
||||
binding.themeSpinner.onItemSelectedListener = object : OnItemSelectedListener {
|
||||
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
prefs.edit().putString("theme", adapter[position].value).apply()
|
||||
}
|
||||
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) {
|
||||
return
|
||||
}
|
||||
VancedLanguageSelectionDialog().show(requireActivity())
|
||||
}
|
||||
|
||||
binding.chosenPrefsInstall.setOnClickListener {
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package com.vanced.manager.ui.dialogs
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.edit
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
import com.google.android.material.radiobutton.MaterialRadioButton
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.databinding.DialogBottomRadioButtonBinding
|
||||
import com.vanced.manager.utils.Extensions.convertToAppTheme
|
||||
import com.vanced.manager.utils.Extensions.getCheckedButtonTag
|
||||
import com.vanced.manager.utils.Extensions.show
|
||||
import com.vanced.manager.utils.InternetTools.vanced
|
||||
import java.util.*
|
||||
|
||||
class VancedThemeDialog : BottomSheetDialogFragment() {
|
||||
|
||||
private lateinit var binding: DialogBottomRadioButtonBinding
|
||||
private val prefs by lazy { requireActivity().getSharedPreferences("installPrefs", Context.MODE_PRIVATE) }
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
binding = DataBindingUtil.inflate(inflater, R.layout.dialog_bottom_radio_button, container, false)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
loadButtons()
|
||||
binding.dialogTitle.text = requireActivity().getString(R.string.theme)
|
||||
view.findViewWithTag<MaterialRadioButton>(prefs.getString("theme", "dark")).isChecked = true
|
||||
binding.dialogSave.setOnClickListener {
|
||||
prefs.edit { putString("theme", binding.dialogRadiogroup.getCheckedButtonTag()) }
|
||||
dismiss()
|
||||
VancedPreferencesDialog().show(requireActivity())
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadButtons() {
|
||||
requireActivity().runOnUiThread {
|
||||
vanced.get()?.array<String>("themes")?.value?.forEach { theme ->
|
||||
val rb = MaterialRadioButton(requireActivity()).apply {
|
||||
text = theme.convertToAppTheme(requireActivity())
|
||||
tag = theme
|
||||
textSize = 18f
|
||||
}
|
||||
binding.dialogRadiogroup.addView(rb, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -16,6 +16,7 @@ import com.vanced.manager.R
|
|||
import com.vanced.manager.ui.WelcomeActivity
|
||||
import com.vanced.manager.ui.dialogs.ManagerUpdateDialog
|
||||
import com.vanced.manager.ui.dialogs.URLChangeDialog
|
||||
import com.vanced.manager.utils.LanguageHelper.authCrowdin
|
||||
|
||||
class DevSettingsFragment: PreferenceFragmentCompat() {
|
||||
|
||||
|
@ -45,22 +46,13 @@ class DevSettingsFragment: PreferenceFragmentCompat() {
|
|||
|
||||
}
|
||||
|
||||
findPreference<Preference>("crowdin_auth")?.isVisible = !Crowdin.isAuthorized()
|
||||
findPreference<SwitchPreferenceCompat>("crowdin_upload_screenshot")?.isVisible = Crowdin.isAuthorized()
|
||||
findPreference<SwitchPreferenceCompat>("crowdin_real_time")?.isVisible = Crowdin.isAuthorized()
|
||||
|
||||
findPreference<Preference>("crowdin_auth")?.setOnPreferenceClickListener {
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
if (!Settings.canDrawOverlays(requireActivity())) {
|
||||
val intent = Intent(
|
||||
Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
||||
Uri.parse("package:" + requireActivity().packageName)
|
||||
)
|
||||
startActivityForResult(intent, 69)
|
||||
return@setOnPreferenceClickListener true
|
||||
}
|
||||
|
||||
Crowdin.authorize(requireActivity())
|
||||
requireActivity().authCrowdin()
|
||||
true
|
||||
}
|
||||
|
||||
|
@ -91,14 +83,4 @@ class DevSettingsFragment: PreferenceFragmentCompat() {
|
|||
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == 69) {
|
||||
@RequiresApi(23)
|
||||
if (Settings.canDrawOverlays(requireActivity())) {
|
||||
Crowdin.authorize(requireActivity())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -14,6 +14,7 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
|||
import androidx.navigation.findNavController
|
||||
import androidx.preference.PreferenceManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.crowdin.platform.util.inflateWithCrowdin
|
||||
import com.github.florent37.viewtooltip.ViewTooltip
|
||||
import com.google.android.flexbox.FlexboxLayoutManager
|
||||
import com.google.android.flexbox.JustifyContent
|
||||
|
@ -36,26 +37,6 @@ open class HomeFragment : Fragment() {
|
|||
private val prefs by lazy { PreferenceManager.getDefaultSharedPreferences(requireActivity()) }
|
||||
private lateinit var tooltip: ViewTooltip
|
||||
|
||||
// private val tabListener = object : TabLayout.OnTabSelectedListener {
|
||||
//
|
||||
// override fun onTabSelected(tab: TabLayout.Tab) {
|
||||
// if (tab.position == 1 && !Shell.rootAccess()) {
|
||||
// Toast.makeText(requireActivity(), getString(R.string.root_not_granted), Toast.LENGTH_SHORT).show()
|
||||
// }
|
||||
// val variant = if (tab.position == 1) "root" else "nonroot"
|
||||
// getDefaultSharedPreferences(requireActivity()).edit().putString("vanced_variant", variant).apply()
|
||||
// }
|
||||
//
|
||||
// override fun onTabUnselected(tab: TabLayout.Tab) {
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// override fun onTabReselected(tab: TabLayout.Tab) {
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
|
@ -117,19 +98,6 @@ open class HomeFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
// with(binding) {
|
||||
// mainViewpager.adapter = VariantAdapter(viewModel, requireActivity())
|
||||
// TabLayoutMediator(mainTablayout, mainViewpager) { tab, position ->
|
||||
// val variants = arrayOf("nonroot", "root")
|
||||
// tab.text = variants[position]
|
||||
// }.attach()
|
||||
// mainTablayout.getTabAt(if (getDefaultSharedPreferences(requireActivity()).getString("vanced_variant", "nonroot") == "root") 1 else 0)?.select()
|
||||
// }
|
||||
|
||||
// installing.observe(viewLifecycleOwner, { value ->
|
||||
// if (value) hideTab() else showTab()
|
||||
// })
|
||||
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
@ -154,28 +122,6 @@ open class HomeFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
// private fun hideTab() {
|
||||
// val tabHide = AnimationUtils.loadAnimation(requireActivity(), R.anim.tablayout_exit)
|
||||
// with(binding) {
|
||||
// if (mainTablayout.visibility != View.GONE) {
|
||||
// mainTablayout.startAnimation(tabHide)
|
||||
// mainTablayout.visibility = View.GONE
|
||||
// }
|
||||
// mainViewpager.isUserInputEnabled = false
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private fun showTab() {
|
||||
// val tabShow = AnimationUtils.loadAnimation(requireActivity(), R.anim.tablayout_enter)
|
||||
// with(binding) {
|
||||
// if (mainTablayout.visibility != View.VISIBLE) {
|
||||
// mainTablayout.visibility = View.VISIBLE
|
||||
// mainTablayout.startAnimation(tabShow)
|
||||
// }
|
||||
// mainViewpager.isUserInputEnabled = true
|
||||
// }
|
||||
// }
|
||||
|
||||
private fun registerReceivers() {
|
||||
val intentFilter = IntentFilter()
|
||||
intentFilter.addAction(INSTALL_FAILED)
|
||||
|
@ -184,7 +130,7 @@ open class HomeFragment : Fragment() {
|
|||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
inflater.inflate(R.menu.toolbar_menu, menu)
|
||||
inflater.inflateWithCrowdin(R.menu.toolbar_menu, menu, resources)
|
||||
super.onCreateOptionsMenu(menu, inflater)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.vanced.manager.ui.viewmodels
|
|||
import android.content.ActivityNotFoundException
|
||||
import android.content.ComponentName
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.ContextCompat
|
||||
|
@ -17,7 +16,6 @@ import androidx.preference.PreferenceManager.getDefaultSharedPreferences
|
|||
import com.crowdin.platform.Crowdin
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.core.App
|
||||
import com.vanced.manager.model.DataModel
|
||||
import com.vanced.manager.ui.dialogs.AppDownloadDialog
|
||||
import com.vanced.manager.ui.dialogs.InstallationFilesDetectedDialog
|
||||
|
@ -33,6 +31,9 @@ import com.vanced.manager.utils.Extensions.fetchData
|
|||
import com.vanced.manager.utils.Extensions.setRefreshing
|
||||
import com.vanced.manager.utils.Extensions.show
|
||||
import com.vanced.manager.utils.InternetTools
|
||||
import com.vanced.manager.utils.InternetTools.loadJson
|
||||
import com.vanced.manager.utils.InternetTools.musicVersions
|
||||
import com.vanced.manager.utils.InternetTools.vancedVersions
|
||||
import com.vanced.manager.utils.PackageHelper.apkExist
|
||||
import com.vanced.manager.utils.PackageHelper.musicApkExists
|
||||
import com.vanced.manager.utils.PackageHelper.uninstallApk
|
||||
|
@ -40,8 +41,6 @@ import com.vanced.manager.utils.PackageHelper.uninstallRootApk
|
|||
import com.vanced.manager.utils.PackageHelper.vancedInstallFilesExist
|
||||
|
||||
open class HomeViewModel(private val activity: FragmentActivity): ViewModel() {
|
||||
|
||||
private val app = activity.application as App
|
||||
|
||||
private val prefs = getDefaultSharedPreferences(activity)
|
||||
|
||||
|
@ -58,7 +57,7 @@ open class HomeViewModel(private val activity: FragmentActivity): ViewModel() {
|
|||
|
||||
fun fetchData() {
|
||||
activity.setRefreshing(true)
|
||||
app.loadJson()
|
||||
loadJson(activity)
|
||||
Crowdin.forceUpdate(activity)
|
||||
activity.setRefreshing(false)
|
||||
}
|
||||
|
@ -124,7 +123,6 @@ open class HomeViewModel(private val activity: FragmentActivity): ViewModel() {
|
|||
}
|
||||
}
|
||||
activity.getString(R.string.microg) -> {
|
||||
Log.d("test", apkExist(activity, "microg.apk").toString())
|
||||
if (apkExist(activity, "microg.apk")) InstallationFilesDetectedDialog(app).show(activity) else AppDownloadDialog(app).show(activity)
|
||||
}
|
||||
}
|
||||
|
@ -135,12 +133,12 @@ open class HomeViewModel(private val activity: FragmentActivity): ViewModel() {
|
|||
|
||||
init {
|
||||
activity.setRefreshing(true)
|
||||
vanced.set(DataModel(app.vanced, activity, vancedPkg, activity.getString(R.string.vanced), ContextCompat.getDrawable(activity, R.drawable.ic_vanced)))
|
||||
vancedRoot.set(DataModel(app.vanced, activity, vancedRootPkg, activity.getString(R.string.vanced), ContextCompat.getDrawable(activity, R.drawable.ic_vanced)))
|
||||
music.set(DataModel(app.music, activity, musicPkg, activity.getString(R.string.music), ContextCompat.getDrawable(activity, R.drawable.ic_music)))
|
||||
musicRoot.set(DataModel(app.music, activity, musicRootPkg, activity.getString(R.string.music), ContextCompat.getDrawable(activity, R.drawable.ic_music)))
|
||||
microg.set(DataModel(app.microg, activity, microgPkg, activity.getString(R.string.microg), ContextCompat.getDrawable(activity, R.drawable.ic_microg)))
|
||||
manager.set(DataModel(app.manager, activity, managerPkg, activity.getString(R.string.app_name), ContextCompat.getDrawable(activity, R.mipmap.ic_launcher)))
|
||||
vanced.set(DataModel(InternetTools.vanced, activity, vancedPkg, activity.getString(R.string.vanced), ContextCompat.getDrawable(activity, R.drawable.ic_vanced), vancedVersions))
|
||||
vancedRoot.set(DataModel(InternetTools.vanced, activity, vancedRootPkg, activity.getString(R.string.vanced), ContextCompat.getDrawable(activity, R.drawable.ic_vanced), vancedVersions))
|
||||
music.set(DataModel(InternetTools.music, activity, musicPkg, activity.getString(R.string.music), ContextCompat.getDrawable(activity, R.drawable.ic_music), musicVersions))
|
||||
musicRoot.set(DataModel(InternetTools.music, activity, musicRootPkg, activity.getString(R.string.music), ContextCompat.getDrawable(activity, R.drawable.ic_music), musicVersions))
|
||||
microg.set(DataModel(InternetTools.microg, activity, microgPkg, activity.getString(R.string.microg), ContextCompat.getDrawable(activity, R.drawable.ic_microg)))
|
||||
manager.set(DataModel(InternetTools.manager, activity, managerPkg, activity.getString(R.string.app_name), ContextCompat.getDrawable(activity, R.mipmap.ic_launcher)))
|
||||
activity.setRefreshing(false)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import androidx.lifecycle.ViewModelProvider
|
|||
|
||||
class HomeViewModelFactory(private val activity: FragmentActivity) : ViewModelProvider.Factory {
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
|
||||
return HomeViewModel(activity) as T
|
||||
}
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
package com.vanced.manager.utils
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import android.widget.RadioGroup
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.preference.PreferenceManager.getDefaultSharedPreferences
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.google.android.material.radiobutton.MaterialRadioButton
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.core.App
|
||||
import com.vanced.manager.model.AppVersionsModel
|
||||
import com.vanced.manager.utils.InternetTools.loadJson
|
||||
import java.util.*
|
||||
|
||||
object Extensions {
|
||||
|
||||
|
@ -16,13 +21,13 @@ object Extensions {
|
|||
}
|
||||
|
||||
fun DialogFragment.show(activity: FragmentActivity) {
|
||||
this.show(activity.supportFragmentManager, "")
|
||||
show(activity.supportFragmentManager, "")
|
||||
}
|
||||
|
||||
fun Activity.fetchData() {
|
||||
val refreshLayout = findViewById<SwipeRefreshLayout>(R.id.home_refresh)
|
||||
setRefreshing(true, refreshLayout)
|
||||
(application as App).loadJson()
|
||||
loadJson(this)
|
||||
setRefreshing(false, refreshLayout)
|
||||
}
|
||||
|
||||
|
@ -39,4 +44,21 @@ object Extensions {
|
|||
}
|
||||
}
|
||||
|
||||
fun Context.getDefaultPrefs(): SharedPreferences = getDefaultSharedPreferences(this)
|
||||
|
||||
//Not sure how much this can affect performance
|
||||
//but if anyone can improve this even slightly,
|
||||
//feel free to open a PR
|
||||
fun List<String>.convertToAppVersions(): Array<AppVersionsModel> {
|
||||
val versionsModel = arrayListOf(AppVersionsModel("latest", this[0]))
|
||||
for (i in reversed().indices) {
|
||||
versionsModel.add(AppVersionsModel(this[i], this[i]))
|
||||
}
|
||||
return versionsModel.toTypedArray()
|
||||
}
|
||||
|
||||
fun String.convertToAppTheme(context: Context): String {
|
||||
return context.getString(R.string.light_plus_other, this.capitalize(Locale.ROOT))
|
||||
}
|
||||
|
||||
}
|
|
@ -6,15 +6,33 @@ import android.net.Uri
|
|||
import android.util.Log
|
||||
import androidx.browser.customtabs.CustomTabsIntent
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.databinding.ObservableField
|
||||
import androidx.preference.PreferenceManager.getDefaultSharedPreferences
|
||||
import com.beust.klaxon.JsonArray
|
||||
import com.beust.klaxon.JsonObject
|
||||
import com.vanced.manager.BuildConfig
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.core.App
|
||||
import com.vanced.manager.utils.Extensions.getDefaultPrefs
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
object InternetTools {
|
||||
|
||||
private const val TAG = "VMNetTools"
|
||||
|
||||
var vanced = ObservableField<JsonObject?>()
|
||||
var music = ObservableField<JsonObject?>()
|
||||
var microg = ObservableField<JsonObject?>()
|
||||
var manager = ObservableField<JsonObject?>()
|
||||
|
||||
var vancedVersions = ObservableField<JsonArray<String>>()
|
||||
var musicVersions = ObservableField<JsonArray<String>>()
|
||||
|
||||
//var braveTiers = ObservableField<JsonObject?>()
|
||||
|
||||
fun openUrl(Url: String, color: Int, context: Context) {
|
||||
val customTabPrefs = getDefaultSharedPreferences(context).getBoolean("use_customtabs", true)
|
||||
if (customTabPrefs) {
|
||||
|
@ -57,8 +75,37 @@ object InternetTools {
|
|||
}
|
||||
}
|
||||
|
||||
fun loadJson(context: Context) = CoroutineScope(Dispatchers.IO).launch {
|
||||
val installUrl = context.getDefaultPrefs().getString("install_url", baseUrl)
|
||||
val latest = JsonHelper.getJson("$installUrl/latest.json?fetchTime=${SimpleDateFormat("HHmmss", Locale.getDefault())}")
|
||||
val versions = JsonHelper.getJson("$installUrl/versions.json?fetchTime=${SimpleDateFormat("HHmmss", Locale.getDefault())}")
|
||||
// braveTiers.apply {
|
||||
// set(getJson("$installUrl/sponsor.json"))
|
||||
// notifyChange()
|
||||
// }
|
||||
|
||||
vanced.apply {
|
||||
set(latest?.obj("vanced"))
|
||||
notifyChange()
|
||||
}
|
||||
vancedVersions.set(versions?.array("vanced"))
|
||||
music.apply {
|
||||
set(latest?.obj("music"))
|
||||
notifyChange()
|
||||
}
|
||||
musicVersions.set(versions?.array("music"))
|
||||
microg.apply {
|
||||
set(latest?.obj("microg"))
|
||||
notifyChange()
|
||||
}
|
||||
manager.apply {
|
||||
set(latest?.obj("manager"))
|
||||
notifyChange()
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun getJsonString(file: String, obj: String, context: Context): String {
|
||||
val installUrl = getDefaultSharedPreferences(context).getString("install_url", baseUrl)
|
||||
val installUrl = context.getDefaultPrefs().getString("install_url", baseUrl)
|
||||
return try {
|
||||
JsonHelper.getJson("$installUrl/$file")?.string(obj) ?: context.getString(R.string.unavailable)
|
||||
} catch (e: Exception) {
|
||||
|
@ -68,7 +115,7 @@ object InternetTools {
|
|||
}
|
||||
|
||||
fun isUpdateAvailable(context: Context): Boolean {
|
||||
val result = (context.applicationContext as App).manager.get()?.int("versionCode") ?: 0
|
||||
val result = manager.get()?.int("versionCode") ?: 0
|
||||
|
||||
return result > BuildConfig.VERSION_CODE
|
||||
}
|
||||
|
|
|
@ -2,12 +2,16 @@ package com.vanced.manager.utils
|
|||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.res.Resources
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.LocaleList
|
||||
import android.provider.Settings
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.crowdin.platform.Crowdin
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.core.App
|
||||
import com.vanced.manager.utils.InternetTools.vanced
|
||||
import java.util.*
|
||||
|
||||
object LanguageHelper {
|
||||
|
@ -30,29 +34,16 @@ object LanguageHelper {
|
|||
|
||||
}
|
||||
|
||||
fun getDefaultVancedLanguages(activity: Activity): String {
|
||||
val serverLangs = (activity.applicationContext as App).vanced.get()!!.array<String>("langs")
|
||||
@Suppress("DEPRECATION")
|
||||
fun getDefaultVancedLanguages(): String {
|
||||
val serverLangs = vanced.get()?.array("langs") ?: mutableListOf("")
|
||||
val sysLocales = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) Resources.getSystem().configuration.locales.toLangTags() else arrayOf(Resources.getSystem().configuration.locale.language)
|
||||
val finalLangs = mutableListOf<String>()
|
||||
sysLocales.forEach { sysLocale ->
|
||||
if (sysLocale == "en")
|
||||
finalLangs.add(sysLocale)
|
||||
else if (serverLangs != null && serverLangs.contains(sysLocale))
|
||||
finalLangs.add(sysLocale)
|
||||
}
|
||||
|
||||
return finalLangs.distinct().sorted().joinToString(", ")
|
||||
}
|
||||
|
||||
fun getDefaultVancedLanguages(app: App): String {
|
||||
val serverLangs = app.vanced.get()!!.array<String>("langs")
|
||||
val sysLocales = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) Resources.getSystem().configuration.locales.toLangTags() else arrayOf(Resources.getSystem().configuration.locale.language)
|
||||
val finalLangs = mutableListOf<String>()
|
||||
sysLocales.forEach { sysLocale ->
|
||||
if (sysLocale == "en")
|
||||
finalLangs.add(sysLocale)
|
||||
else if (serverLangs != null && serverLangs.contains(sysLocale))
|
||||
finalLangs.add(sysLocale)
|
||||
when {
|
||||
sysLocale == "en" -> finalLangs.add(sysLocale)
|
||||
serverLangs.contains(sysLocale) -> finalLangs.add(sysLocale)
|
||||
}
|
||||
}
|
||||
|
||||
return finalLangs.distinct().sorted().joinToString(", ")
|
||||
|
@ -67,4 +58,26 @@ object LanguageHelper {
|
|||
return langTags
|
||||
}
|
||||
|
||||
fun Activity.authCrowdin() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (!Settings.canDrawOverlays(this)) {
|
||||
val intent = Intent(
|
||||
Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
||||
Uri.parse("package:$packageName")
|
||||
)
|
||||
startActivityForResult(intent, 69)
|
||||
return
|
||||
}
|
||||
Crowdin.authorize(this)
|
||||
}
|
||||
}
|
||||
|
||||
fun Activity.onActivityResult(requestCode: Int) {
|
||||
if (requestCode == 69 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (Settings.canDrawOverlays(this)) {
|
||||
Crowdin.authorize(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -11,13 +11,13 @@ import android.util.Log
|
|||
import com.topjohnwu.superuser.Shell
|
||||
import com.topjohnwu.superuser.io.SuFile
|
||||
import com.vanced.manager.BuildConfig
|
||||
import com.vanced.manager.core.App
|
||||
import com.vanced.manager.core.installer.AppInstallerService
|
||||
import com.vanced.manager.core.installer.AppUninstallerService
|
||||
import com.vanced.manager.utils.AppUtils.sendCloseDialog
|
||||
import com.vanced.manager.utils.AppUtils.sendFailure
|
||||
import com.vanced.manager.utils.AppUtils.sendRefresh
|
||||
import com.vanced.manager.utils.AppUtils.vancedRootPkg
|
||||
import com.vanced.manager.utils.InternetTools.vanced
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -249,8 +249,7 @@ object PackageHelper {
|
|||
)
|
||||
|
||||
Shell.getShell {
|
||||
val application = context.applicationContext as App
|
||||
val vancedVersionCode = application.vanced.get()?.int("versionCode")
|
||||
val vancedVersionCode = vanced.get()?.int("versionCode")
|
||||
val apkFilesPath = context.getExternalFilesDir("vanced/root")?.path
|
||||
val fileInfoList = apkFilesPath?.let { it1 -> getFileInfoList(it1) }
|
||||
if (fileInfoList != null) {
|
||||
|
|
|
@ -2,24 +2,24 @@ package com.vanced.manager.utils
|
|||
|
||||
import android.app.Activity
|
||||
import android.content.res.Configuration
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.utils.Extensions.getDefaultPrefs
|
||||
|
||||
object ThemeHelper {
|
||||
|
||||
fun setFinalTheme(activity: Activity) {
|
||||
val currentAccent = PreferenceManager.getDefaultSharedPreferences(activity).getString("manager_accent", "Blue")
|
||||
when (PreferenceManager.getDefaultSharedPreferences(activity)
|
||||
.getString("manager_theme", "System Default")) {
|
||||
"Light" -> activity.setTheme(getLightAccent(currentAccent))
|
||||
"Dark" -> activity.setTheme(getDarkAccent(currentAccent))
|
||||
fun Activity.setFinalTheme() {
|
||||
val prefs = getDefaultPrefs()
|
||||
val currentAccent = prefs.getString("manager_accent", "Blue")
|
||||
when (prefs.getString("manager_theme", "System Default")) {
|
||||
"Light" -> setTheme(getLightAccent(currentAccent))
|
||||
"Dark" -> setTheme(getDarkAccent(currentAccent))
|
||||
"System Default" -> {
|
||||
when (activity.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) {
|
||||
Configuration.UI_MODE_NIGHT_YES -> activity.setTheme(getDarkAccent(currentAccent))
|
||||
Configuration.UI_MODE_NIGHT_NO -> activity.setTheme(getLightAccent(currentAccent))
|
||||
when (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) {
|
||||
Configuration.UI_MODE_NIGHT_YES -> setTheme(getDarkAccent(currentAccent))
|
||||
Configuration.UI_MODE_NIGHT_NO -> setTheme(getLightAccent(currentAccent))
|
||||
}
|
||||
}
|
||||
else -> activity.setTheme(getLightAccent("Blue"))
|
||||
else -> setTheme(getLightAccent("Blue"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM10,17l-3.5,-3.5 1.41,-1.41L10,14.17 15.18,9l1.41,1.41L10,17z"/>
|
||||
</vector>
|
|
@ -1,5 +0,0 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM17,13l-5,5 -5,-5h3V9h4v4h3z"/>
|
||||
</vector>
|
|
@ -1,5 +0,0 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM14,13v4h-4v-4H7l5,-5 5,5h-3z"/>
|
||||
</vector>
|
38
app/src/main/res/layout/dialog_bottom_radio_button.xml
Normal file
38
app/src/main/res/layout/dialog_bottom_radio_button.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/BottomDialogCard">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialog_title"
|
||||
style="@style/BottomDialogCardTitle" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/dialog_radiogroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/dialog_save"
|
||||
style="@style/BottomDialogButtonStyle"
|
||||
android:text="@string/save" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</layout>
|
|
@ -26,15 +26,41 @@
|
|||
style="@style/BottomDialogCardTextItem"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/theme_spinner"
|
||||
android:text="@string/theme" />
|
||||
android:layout_toStartOf="@id/open_theme_selector" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/theme_spinner"
|
||||
<ImageButton
|
||||
android:id="@+id/open_theme_selector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:entries="@array/vanced_themes" />
|
||||
android:background="@android:color/transparent"
|
||||
android:maxWidth="24dp"
|
||||
android:maxHeight="24dp"
|
||||
android:src="@drawable/ic_baseline_navigate_next_36" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chosen_version"
|
||||
style="@style/BottomDialogCardTextItem"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/open_version_selector" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/open_version_selector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:maxWidth="24dp"
|
||||
android:maxHeight="24dp"
|
||||
android:src="@drawable/ic_baseline_navigate_next_36" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -48,8 +74,7 @@
|
|||
style="@style/BottomDialogCardTextItem"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@+id/open_language_selector"
|
||||
android:text="@string/language_title" />
|
||||
android:layout_toStartOf="@+id/open_language_selector" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/open_language_selector"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
android:id="@+id/use_custom_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:switch_def_value="true"
|
||||
app:switch_key="use_customtabs"
|
||||
app:switch_summary="@string/link_custom_tabs"
|
||||
|
|
|
@ -80,7 +80,6 @@
|
|||
android:layout_marginEnd="2dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:onClick="@{()-> viewModel.openMicrogSettings()}"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_app_settings_black_24dp"
|
||||
android:visibility="@{(app.equals(@string/microg) && dataModel.isAppInstalled()) ? View.VISIBLE : View.GONE}"
|
||||
app:layout_constraintEnd_toStartOf="@id/app_uninstall"
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Welcome</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Choose your preferred language(s) for Vanced</string>
|
||||
<string name="install_light_black">Light + Black</string>
|
||||
<string name="install_light_dark">Light + Dark</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager Devs</string>
|
||||
<string name="sources">Sources</string>
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
اهلا</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Choose your preferred language(s) for Vanced</string>
|
||||
<string name="install_light_black">ابيض + اسود</string>
|
||||
<string name="install_light_dark">ابيض + داكن</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager Devs</string>
|
||||
<string name="sources">مصادر</string>
|
||||
|
|
|
@ -58,8 +58,6 @@
|
|||
<string name="welcome">Xoş gəlmisiniz</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vanced üçün istədiyiniz dili seçin</string>
|
||||
<string name="install_light_black">İşıqlı + Qara</string>
|
||||
<string name="install_light_dark">İşıqlı + Qaranlıq</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Menecer Təkmilcilər</string>
|
||||
<string name="sources">Mənbələr</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">স্বাগতম</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">ভ্যানসডের জন্য আপনার পছন্দসই ভাষা (গুলি) চয়ন করুন</string>
|
||||
<string name="install_light_black">আলো + কালো</string>
|
||||
<string name="install_light_dark">আলো + অন্ধকার</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">পরিচালক বিকাশকারী</string>
|
||||
<string name="sources">সূত্রসমূহ</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">স্বাগত</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">ভ্যান্সডের জন্য আপনার পছন্দসই ভাষা(গুলি) চয়ন করুন</string>
|
||||
<string name="install_light_black">হালকা + কালো</string>
|
||||
<string name="install_light_dark">হালকা + অন্ধকার</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">ম্যানেজার বিকাশকারীরা</string>
|
||||
<string name="sources">উৎসগুলি</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Benvingut</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Trieu els vostres idiomes preferits per a Vanced</string>
|
||||
<string name="install_light_black">Clar + Negre</string>
|
||||
<string name="install_light_dark">Clar + Fosc</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Gestor de desenvolupadors</string>
|
||||
<string name="sources">Fonts</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Vítejte</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vyberte preferovaný jazyk pro Vanced</string>
|
||||
<string name="install_light_black">Světlý + černý</string>
|
||||
<string name="install_light_dark">Světlý + tmavý</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Vývojáři aplikace</string>
|
||||
<string name="sources">Zdrojové kódy</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Velkommen</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vælg dit fortrukne sprog til Vanced</string>
|
||||
<string name="install_light_black">Lyst + Sort</string>
|
||||
<string name="install_light_dark">Lyst + Mørkt</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager udviklere</string>
|
||||
<string name="sources">Kilder</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Willkommen</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Wählen Sie ihre bevorzugte Sprache(n) für Vanced</string>
|
||||
<string name="install_light_black">Hell + Schwarz</string>
|
||||
<string name="install_light_dark">Hell + Dunkel</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager-Entwickler</string>
|
||||
<string name="sources">Quellen</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Καλώς ορίσατε</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Επιλέξτε την(/ις) γλώσσα(/ες) που επιθυμείτε για το Vanced</string>
|
||||
<string name="install_light_black">Ανοιχτόχρωμο + Απόλυτο μαύρο</string>
|
||||
<string name="install_light_dark">Ανοιχτόχρωμο + Σκούροχρωμο</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Προγραμματιστές Διαχειριστή Vanced</string>
|
||||
<string name="sources">Πηγές</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Bienvenido</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Elige tu(s) idioma(s) preferido(s) para Vanced</string>
|
||||
<string name="install_light_black">Claro + Negro</string>
|
||||
<string name="install_light_dark">Claro + Oscuro</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Desarrolladores del Manager</string>
|
||||
<string name="sources">Fuentes</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Tervetuloa</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Valitse Vancedille haluamasi kieli tai kielet</string>
|
||||
<string name="install_light_black">Vaalea + Musta</string>
|
||||
<string name="install_light_dark">Vaalea + Tumma</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Kehittäjäpäällikkö</string>
|
||||
<string name="sources">Lähdekoodi</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Bienvenue</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Choisir votre langage(s) préféré(s) pour Vanced</string>
|
||||
<string name="install_light_black">Clair + Noir</string>
|
||||
<string name="install_light_dark">Clair + Sombre</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager pour les développeurs</string>
|
||||
<string name="sources">Sources</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">स्वागत है!</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vanced के लिए अपनी पसंदीदा भाषा (ए) चुनें</string>
|
||||
<string name="install_light_black">लाइट + ब्लैक</string>
|
||||
<string name="install_light_dark">लाइट + डार्क</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">प्रबंधक डेवलपर्स</string>
|
||||
<string name="sources">स्रोत</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Üdvözöljük</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vanced nyelvének kiválasztása</string>
|
||||
<string name="install_light_black">Világos + Sötét</string>
|
||||
<string name="install_light_dark">Világos + Fekete</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Fejlesztői Menedzser</string>
|
||||
<string name="sources">Források</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Selamat datang</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Pilih bahasa yang anda inginkan untuk Vanced</string>
|
||||
<string name="install_light_black">Terang + Hitam</string>
|
||||
<string name="install_light_dark">Terang + Gelap</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Pengembang Manager</string>
|
||||
<string name="sources">Sumber</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Benvenuto</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Scegli le tue lingue preferite per Vanced</string>
|
||||
<string name="install_light_black">Chiaro + nero</string>
|
||||
<string name="install_light_dark">Chiaro + scuro</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Sviluppatori di Manager</string>
|
||||
<string name="sources">Codice sorgente</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">ברוכים הבאים</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">בחר את השפה המועדפת עליך לVanced</string>
|
||||
<string name="install_light_black">בהיר + שחור</string>
|
||||
<string name="install_light_dark">בהיר + כהה</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">מנהל המפתחים</string>
|
||||
<string name="sources">מקורות</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">ようこそ</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vanced で使用する言語を選択</string>
|
||||
<string name="install_light_black">ライト + ブラック</string>
|
||||
<string name="install_light_dark">ライト + ダーク</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager 開発</string>
|
||||
<string name="sources">ソースコード</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">მოგესალმებით</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Choose your preferred language(s) for Vanced</string>
|
||||
<string name="install_light_black">ღია + შავი</string>
|
||||
<string name="install_light_dark">ღია + მუქი</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager Devs</string>
|
||||
<string name="sources">წყაროები</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">환영합니다</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vanced에서 선호하는 언어를 선택해주세요</string>
|
||||
<string name="install_light_black">라이트 + 블랙</string>
|
||||
<string name="install_light_dark">라이트 + 다크</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager 개발자</string>
|
||||
<string name="sources">소스</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Welkom</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Kies je gewenste taal/talen voor Vanced</string>
|
||||
<string name="install_light_black">Licht + Zwart</string>
|
||||
<string name="install_light_dark">Licht + Donker</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager Ontwikkelaars</string>
|
||||
<string name="sources">Bronnen</string>
|
||||
|
|
|
@ -60,8 +60,6 @@
|
|||
<string name="welcome">Velkommen</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Velg dine foretrukne språk for Vanced</string>
|
||||
<string name="install_light_black">Light + Black</string>
|
||||
<string name="install_light_dark">Light + Dark</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager Devs</string>
|
||||
<string name="sources">Sources</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">ਜੀ ਆਇਆਂ ਨੂੰ!</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vanced ਦੇ ਲਈ ਆਪਣੀ ਪਸੰਦੀਦਾ ਭਾਸ਼ਾ (ਏ) ਚੁਣੋ</string>
|
||||
<string name="install_light_black">ਲਾਇਟ + ਬਲੈਕ</string>
|
||||
<string name="install_light_dark">ਲਾਇਟ + ਡਾਰਕ</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">ਪ੍ਬੰਧਕ ਨਿਰਮਾਣਕਰਤਾ</string>
|
||||
<string name="sources">ਸਰੋਤ</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Witaj</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Wybierz preferowany język(i) dla Vanced</string>
|
||||
<string name="install_light_black">Jasny + Czarny</string>
|
||||
<string name="install_light_dark">Jasny + Ciemny</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Deweloperzy Menedżera</string>
|
||||
<string name="sources">Źródła</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Bem-vindo</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Escolha o seu idioma preferido para o Vanced</string>
|
||||
<string name="install_light_black">Claro + Preto</string>
|
||||
<string name="install_light_dark">Claro + Escuro</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Desenvolvedores do Manager</string>
|
||||
<string name="sources">Fontes</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Bem-Vindo</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Escolha a(s) sua(s) língua(s) de preferência para o Vanced</string>
|
||||
<string name="install_light_black">Claro + Preto</string>
|
||||
<string name="install_light_dark">Claro + Escuro</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Programadores do Manager</string>
|
||||
<string name="sources">Fontes</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Bun venit</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Alegeți limba preferată pentru Vanced</string>
|
||||
<string name="install_light_black">Luminos + Negru</string>
|
||||
<string name="install_light_dark">Luminos + Întunecat</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Dezvoltatori</string>
|
||||
<string name="sources">Surse</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Добро пожаловать</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Выберите предпочитаемый язык для Vanced</string>
|
||||
<string name="install_light_black">Светлая + Чёрная</string>
|
||||
<string name="install_light_dark">Светлая + Тёмная</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Разработчики Менеджера</string>
|
||||
<string name="sources">Исходники</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">ආයුබෝවන්</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Choose your preferred language(s) for Vanced</string>
|
||||
<string name="install_light_black">Light + Black</string>
|
||||
<string name="install_light_dark">Light + Dark</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager Devs</string>
|
||||
<string name="sources">Sources</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Добро дошли</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Одаберите језик за коришћење Vanced апликације</string>
|
||||
<string name="install_light_black">Светла + Црна</string>
|
||||
<string name="install_light_dark">Светла + Тамна</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Менаџер развоја</string>
|
||||
<string name="sources">Извор</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Välkommen</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Välj önskade språk för Vanced</string>
|
||||
<string name="install_light_black">Ljus + svart</string>
|
||||
<string name="install_light_dark">Ljus + svart</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Hanteraren Dev</string>
|
||||
<string name="sources">Källor</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">வரவேற்பு</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">வேன்ஸ்டுக்காக உங்களுக்கு விருப்பமான மொழியைத் தேர்வுசெய்க</string>
|
||||
<string name="install_light_black">ஒளி + கருப்பு</string>
|
||||
<string name="install_light_dark">ஒளி + கருப்பு</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">மேலாளர் டெவலப்பர்கள்</string>
|
||||
<string name="sources">மூலம்</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Hoş Geldiniz</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Vanced için tercih ettiğiniz dil(ler)i seçin</string>
|
||||
<string name="install_light_black">Açık + Siyah</string>
|
||||
<string name="install_light_dark">Açık + Koyu</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager Geliştiricisi</string>
|
||||
<string name="sources">Kaynaklar</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Привіт!</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Виберіть бажану мову(и) для Vanced</string>
|
||||
<string name="install_light_black">Світла + Чорна</string>
|
||||
<string name="install_light_dark">Світла + Темна</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Розробники інсталятора</string>
|
||||
<string name="sources">Джерела</string>
|
||||
|
|
|
@ -1,42 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="LightTheme.Blue" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
||||
<item name="colorPrimary">#2e73ff</item>
|
||||
<item name="colorPrimaryVariant">#2C7EB9</item>
|
||||
<item name="colorSecondary">#3E78AF</item>
|
||||
<item name="colorSecondaryVariant">#803E78AF</item>
|
||||
<item name="colorSurface">#e9e9e9</item>
|
||||
<item name="colorSurfaceVariant">#F3F3F3</item>
|
||||
<item name="colorSurfaceSurfaceVariant">?colorSurface</item>
|
||||
<item name="colorOnPrimary">#F9F9F9</item>
|
||||
<item name="colorOnPrimaryVariant">#e8e8e8</item>
|
||||
<item name="colorOnSecondary">#F9F9F9</item>
|
||||
<item name="colorOnBackground">?colorOnSurface</item>
|
||||
<item name="colorError">#CC0047</item>
|
||||
<item name="colorOnError">#F9F9F9</item>
|
||||
<item name="colorOnSurface">#444444</item>
|
||||
<item name="colorOnSurfaceVariant">#C3131313</item>
|
||||
<item name="colorDisabled">@color/Gray</item>
|
||||
<item name="colorDisabledVariant">#000000</item>
|
||||
<item name="iconColor">?colorPrimaryVariant</item>
|
||||
<item name="toolbarIconColor">#111111</item>
|
||||
<item name="DialogBG">#ffffff</item>
|
||||
<item name="colorSettingsTitle">#000000</item>
|
||||
<item name="colorSecondaryText">#B3000000</item>
|
||||
<item name="colorLinkImage">#73000000</item>
|
||||
<item name="colorLinkBG">#F7F7F7</item>
|
||||
<item name="colorWelcomeHeaderSubtitle">#99000000</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:windowBackground">?colorSurface</item>
|
||||
<item name="android:statusBarColor">?colorSurface</item>
|
||||
<item name="materialAlertDialogTheme">@style/DialogStyle</item>
|
||||
<item name="snackbarStyle">@style/SnackBar</item>
|
||||
<item name="snackbarButtonStyle">@style/SnackButton</item>
|
||||
<item name="snackbarTextViewStyle">@style/SnackBarText</item>
|
||||
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">Chào mừng</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Chọn ngôn ngữ mong muốn cho Vanced</string>
|
||||
<string name="install_light_black">Sáng + Đen</string>
|
||||
<string name="install_light_dark">Sáng + Tối</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Đội ngũ phát triển</string>
|
||||
<string name="sources">Nguồn</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">欢迎</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">为 Vanced 选择您的首选语言</string>
|
||||
<string name="install_light_black">浅 + 黑</string>
|
||||
<string name="install_light_dark">浅 + 深</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager 开发人员</string>
|
||||
<string name="sources">程式码</string>
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
<string name="welcome">歡迎</string>
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">為 Vanced 選擇您偏好的語言</string>
|
||||
<string name="install_light_black">淺色 + 黑色</string>
|
||||
<string name="install_light_dark">淺色 + 深色</string>
|
||||
<!-- About Page -->
|
||||
<string name="manager_dev">Manager 開發者</string>
|
||||
<string name="sources">原始碼</string>
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string-array name="vanced_themes">
|
||||
<item>@string/install_light_dark</item>
|
||||
<item>@string/install_light_black</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
|
@ -68,6 +68,8 @@
|
|||
<string name="app_install_files_detected_summary">Manager detected that all necessary files for %1$s installation were found. Do you want to install?</string>
|
||||
<string name="checking_updates">Checking for updates…</string>
|
||||
<string name="chosen_lang">Language(s): %1$s</string>
|
||||
<string name="chosen_theme">Theme: %1$s</string>
|
||||
<string name="chosen_version">Version: %1$s</string>
|
||||
<string name="guide">Guide</string>
|
||||
<string name="hold_on">Stop!</string>
|
||||
<string name="installing_app">Installing %1$s</string>
|
||||
|
@ -80,6 +82,7 @@
|
|||
<string name="success">Success!</string>
|
||||
<string name="vanced_installation_preferences">Vanced Installation Preferences</string>
|
||||
<string name="vanced_installed">Vanced has successfully been installed! Open now?</string>
|
||||
<string name="version">Version</string>
|
||||
<string name="music_installed">Vanced Music has successfully been installed! Open now?</string>
|
||||
<string name="please_be_patient">Please be patient…</string>
|
||||
<string name="launch">Open</string>
|
||||
|
@ -87,8 +90,7 @@
|
|||
|
||||
<!-- Install Page -->
|
||||
<string name="choose_preferred_language">Choose your preferred language(s) for Vanced</string>
|
||||
<string name="install_light_black">Light + Black</string>
|
||||
<string name="install_light_dark">Light + Dark</string>
|
||||
<string name="light_plus_other">Light + %1$s</string>
|
||||
<string name="select_at_least_one_lang">Select at least one language!</string>
|
||||
|
||||
<!-- About Page -->
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<!-- LIGHT -->
|
||||
|
||||
<style name="LightTheme.Blue" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
<style name="LightTheme_Blue" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
||||
<item name="colorPrimary">#2e73ff</item>
|
||||
<item name="colorPrimaryVariant">#2C7EB9</item>
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<style name="LightTheme.Red" parent="LightTheme.Blue">
|
||||
<style name="LightTheme_Red" parent="LightTheme_Blue">
|
||||
|
||||
<item name="colorPrimary">#D71414</item>
|
||||
<item name="colorPrimaryVariant">#B92C2C</item>
|
||||
|
@ -49,7 +49,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<style name="LightTheme.Green" parent="LightTheme.Blue">
|
||||
<style name="LightTheme_Green" parent="LightTheme_Blue">
|
||||
|
||||
<item name="colorPrimary">#3ED714</item>
|
||||
<item name="colorPrimaryVariant">#2CB943</item>
|
||||
|
@ -58,7 +58,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<style name="LightTheme.Yellow" parent="LightTheme.Blue">
|
||||
<style name="LightTheme_Yellow" parent="LightTheme_Blue">
|
||||
|
||||
<item name="colorPrimary">#ffd500</item>
|
||||
<item name="colorPrimaryVariant">#A6FFD500</item>
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<style name="LightTheme.Purple" parent="LightTheme.Blue">
|
||||
<style name="LightTheme_Purple" parent="LightTheme_Blue">
|
||||
|
||||
<item name="colorPrimary">#6D49B7</item>
|
||||
<item name="colorPrimaryVariant">#563C8D</item>
|
||||
|
@ -78,7 +78,7 @@
|
|||
|
||||
<!-- DARK -->
|
||||
|
||||
<style name="DarkTheme.Blue" parent="Theme.MaterialComponents.NoActionBar">
|
||||
<style name="DarkTheme_Blue" parent="Theme.MaterialComponents.NoActionBar">
|
||||
|
||||
<item name="colorPrimary">#2e73ff</item>
|
||||
<item name="colorPrimaryVariant">#2C7EB9</item>
|
||||
|
@ -116,7 +116,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<style name="DarkTheme.Red" parent="DarkTheme.Blue">
|
||||
<style name="DarkTheme_Red" parent="DarkTheme_Blue">
|
||||
|
||||
<item name="colorPrimary">#D71414</item>
|
||||
<item name="colorPrimaryVariant">#B92C2C</item>
|
||||
|
@ -125,7 +125,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<style name="DarkTheme.Green" parent="DarkTheme.Blue">
|
||||
<style name="DarkTheme_Green" parent="DarkTheme_Blue">
|
||||
|
||||
<item name="colorPrimary">#3ED714</item>
|
||||
<item name="colorPrimaryVariant">#2CB943</item>
|
||||
|
@ -134,7 +134,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<style name="DarkTheme.Yellow" parent="DarkTheme.Blue">
|
||||
<style name="DarkTheme_Yellow" parent="DarkTheme_Blue">
|
||||
|
||||
<item name="colorPrimary">#ffd500</item>
|
||||
<item name="colorPrimaryVariant">#A6FFD500</item>
|
||||
|
@ -143,7 +143,7 @@
|
|||
|
||||
</style>
|
||||
|
||||
<style name="DarkTheme.Purple" parent="DarkTheme.Blue">
|
||||
<style name="DarkTheme_Purple" parent="DarkTheme_Blue">
|
||||
|
||||
<item name="colorPrimary">#6D49B7</item>
|
||||
<item name="colorPrimaryVariant">#563C8D</item>
|
||||
|
|
Loading…
Reference in a new issue