0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-30 06:53:01 +00:00

bug fixes

This commit is contained in:
X1nto 2020-08-06 14:21:18 +04:00
parent 2b7b75cd95
commit 4e591062bb
4 changed files with 9 additions and 8 deletions

View file

@ -13,7 +13,7 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 12 versionCode 12
versionName "1.2.0 (Weed)" versionName "1.2.0 (Niko)"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
} }

View file

@ -7,6 +7,7 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.EditText import android.widget.EditText
import android.widget.TextView
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import androidx.preference.PreferenceManager import androidx.preference.PreferenceManager
import com.google.android.material.button.MaterialButton import com.google.android.material.button.MaterialButton
@ -29,10 +30,10 @@ class URLChangeFragment : DialogFragment() {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
val urlField = view.findViewById<EditText>(R.id.url_input) val urlField = view.findViewById<EditText>(R.id.url_input)
val prefs = PreferenceManager.getDefaultSharedPreferences(activity) val prefs = PreferenceManager.getDefaultSharedPreferences(activity)
urlField.hint = prefs.getString("install_url", baseUrl) urlField.setText(prefs.getString("install_url", baseUrl), TextView.BufferType.EDITABLE)
view.findViewById<MaterialButton>(R.id.url_save).setOnClickListener { view.findViewById<MaterialButton>(R.id.url_save).setOnClickListener {
val finalUrl = val finalUrl =
if (!urlField.text.startsWith("https://")) if (!urlField.text.startsWith("https://") || !urlField.text.startsWith("http://"))
"https://${urlField.text}".removeSuffix("/") "https://${urlField.text}".removeSuffix("/")
else else
urlField.text.removeSuffix("/").toString() urlField.text.removeSuffix("/").toString()

View file

@ -6,14 +6,14 @@
android:duration="@android:integer/config_shortAnimTime" android:duration="@android:integer/config_shortAnimTime"
android:propertyName="scaleX" android:propertyName="scaleX"
android:valueFrom="1" android:valueFrom="1"
android:valueTo="1.1" android:valueTo="0.9"
android:valueType="floatType"/> android:valueType="floatType"/>
<objectAnimator <objectAnimator
android:duration="@android:integer/config_shortAnimTime" android:duration="@android:integer/config_shortAnimTime"
android:propertyName="scaleY" android:propertyName="scaleY"
android:valueFrom="1" android:valueFrom="1"
android:valueTo="1.1" android:valueTo="0.9"
android:valueType="floatType"/> android:valueType="floatType"/>
<objectAnimator <objectAnimator

View file

@ -6,14 +6,14 @@
android:duration="@android:integer/config_shortAnimTime" android:duration="@android:integer/config_shortAnimTime"
android:propertyName="scaleX" android:propertyName="scaleX"
android:valueFrom="1" android:valueFrom="1"
android:valueTo="1.1" android:valueTo="0.9"
android:valueType="floatType"/> android:valueType="floatType"/>
<objectAnimator <objectAnimator
android:duration="@android:integer/config_shortAnimTime" android:duration="@android:integer/config_shortAnimTime"
android:propertyName="scaleX" android:propertyName="scaleY"
android:valueFrom="1" android:valueFrom="1"
android:valueTo="1.1" android:valueTo="0.9"
android:valueType="floatType"/> android:valueType="floatType"/>
<objectAnimator <objectAnimator