0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-17 16:55:10 +00:00

fixed download of splits

This commit is contained in:
X1nto 2020-05-24 12:17:42 +04:00
parent 66c901d3c2
commit aee031cd02
4 changed files with 9 additions and 10 deletions

View file

@ -4,6 +4,7 @@ import android.os.Bundle
import android.view.View
import android.widget.Button
import android.widget.ProgressBar
import android.widget.RadioButton
import android.widget.RadioGroup
import com.vanced.manager.R
import com.vanced.manager.core.base.BaseFragment
@ -16,12 +17,13 @@ open class LanguageInstall : BaseFragment() {
val finishButton = view.findViewById<Button>(R.id.vanced_install_finish)
val loadBar = view.findViewById<ProgressBar>(R.id.vanlang_progress)
val langGroup = view.findViewById<RadioGroup>(R.id.lang_radiogroup)
val selectedLangId = langGroup.checkedRadioButtonId
finishButton.setOnClickListener {
if (selectedLangId.toString() != "en")
val selectedThemeId = langGroup.checkedRadioButtonId
val selectedButton = view.findViewById<RadioButton>(selectedThemeId)
if (selectedButton.tag.toString() != "en")
downloadEn()
downloadSplit("lang", selectedLangId.toString(), true, loadBar, R.id.action_installTo_homeFragment)
downloadSplit("lang", selectedButton.tag.toString(), true, loadBar, R.id.action_installTo_homeFragment)
}
}

View file

@ -3,8 +3,6 @@ package com.vanced.manager.core.fragments
import android.os.Bundle
import android.view.View
import android.widget.*
import androidx.fragment.app.Fragment
import androidx.navigation.findNavController
import com.vanced.manager.R
import com.vanced.manager.core.base.BaseFragment
@ -21,8 +19,7 @@ open class ThemeInstall : BaseFragment() {
nextButton.setOnClickListener {
val selectedThemeId = themeGroup.checkedRadioButtonId
val selectedButton = view.findViewById<RadioButton>(selectedThemeId)
Toast.makeText(requireContext(), selectedButton.tag.toString(), Toast.LENGTH_SHORT).show()
//downloadSplit("theme", selectedThemeId.toString(), false, loadBar, R.id.toInstallVariantFragment)
downloadSplit("theme", selectedButton.tag.toString(), false, loadBar, R.id.toInstallVariantFragment)
}
}

View file

@ -22,7 +22,7 @@ open class VariantInstall : BaseFragment() {
Build.SUPPORTED_ABIS.contains("x86") -> "x86"
Build.SUPPORTED_ABIS.contains("arm64-v8a") -> "arm64-v8a"
Build.SUPPORTED_ABIS.contains("armeabi-v7a") -> "armeabi-v7a"
else -> "arm"
else -> "armeabi-v7a"
}
downloadSplit("arch", arch, false, loadBar, R.id.toInstallThemeFragment)

View file

@ -85,12 +85,12 @@
android:textSize="18sp" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/Magyar"
android:id="@+id/hu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/exo_semibold"
android:text="Magyar"
android:tag="ma"
android:tag="hu"
android:textSize="18sp" />
<com.google.android.material.radiobutton.MaterialRadioButton