1
0
Fork 0

added more splashscreens (shiggy, oneko)

This commit is contained in:
nin0dev 2024-08-28 10:54:26 -04:00
parent b3544cdee2
commit a9ec66d1a6
7 changed files with 71 additions and 2 deletions

View file

@ -11,6 +11,7 @@ import android.os.Bundle
import android.os.StrictMode
import android.os.StrictMode.ThreadPolicy
import android.view.KeyEvent
import android.view.View.VISIBLE
import android.view.WindowManager
import android.webkit.ValueCallback
import android.webkit.WebView
@ -21,6 +22,7 @@ import com.android.volley.toolbox.Volley
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.nin0dev.vendroid.HttpClient.fetchVencord
import com.nin0dev.vendroid.Logger.e
import pl.droidsonroids.gif.GifImageView
import java.io.IOException
class MainActivity : Activity() {
@ -78,6 +80,9 @@ class MainActivity : Activity() {
// https://developer.chrome.com/docs/devtools/remote-debugging/webviews/
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG)
setContentView(R.layout.activity_main)
if (sPrefs.getString("splash", "viggy") == "viggy") findViewById<GifImageView>(R.id.viggy_gif).visibility = VISIBLE
else if (sPrefs.getString("splash", "viggy") == "shiggy") findViewById<GifImageView>(R.id.shiggy_gif).visibility = VISIBLE
else if (sPrefs.getString("splash", "viggy") == "oneko") findViewById<GifImageView>(R.id.oneko_gif).visibility = VISIBLE
wv = findViewById(R.id.webview)!!
explodeAndroid()
wv!!.setWebViewClient(VWebviewClient())

View file

@ -37,6 +37,11 @@ class SettingsActivity : AppCompatActivity() {
"ptb" -> findViewById<MaterialRadioButton>(R.id.ptb).isChecked = true
"canary" -> findViewById<MaterialRadioButton>(R.id.canary).isChecked = true
}
when (sPrefs.getString("splash", "viggy")) {
"viggy" -> findViewById<MaterialRadioButton>(R.id.viggy).isChecked = true
"shiggy" -> findViewById<MaterialRadioButton>(R.id.shiggy).isChecked = true
"oneko" -> findViewById<MaterialRadioButton>(R.id.oneko).isChecked = true
}
if(sPrefs.getString("vencordLocation", "")?.isNotBlank() == true) {
findViewById<CheckBox>(R.id.allow_custom_location).isChecked = true
val devbuildField = findViewById<TextInputEditText>(R.id.custom_location)
@ -71,6 +76,9 @@ class SettingsActivity : AppCompatActivity() {
if (findViewById<RadioButton>(R.id.stable).isChecked) editor.putString("discordBranch", "stable")
if (findViewById<RadioButton>(R.id.ptb).isChecked) editor.putString("discordBranch", "ptb")
if (findViewById<RadioButton>(R.id.canary).isChecked) editor.putString("discordBranch", "canary")
if (findViewById<RadioButton>(R.id.viggy).isChecked) editor.putString("splash", "viggy")
if (findViewById<RadioButton>(R.id.shiggy).isChecked) editor.putString("splash", "shiggy")
if (findViewById<RadioButton>(R.id.oneko).isChecked) editor.putString("splash", "oneko")
if (findViewById<CheckBox>(R.id.allow_custom_location).isChecked && findViewById<EditText>(R.id.custom_location).text.isNotBlank()) editor.putString("vencordLocation", findViewById<EditText>(R.id.custom_location).text.toString())
editor.apply()

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View file

@ -13,11 +13,31 @@
android:orientation="vertical">
<pl.droidsonroids.gif.GifImageView
android:id="@+id/viggy_gif"
android:layout_width="wrap_content"
android:layout_height="232dp"
android:layout_height="wrap_content"
android:scaleX="1"
android:scaleY="1"
android:src="@drawable/viggy" />
android:src="@drawable/viggy"
android:visibility="gone" />
<pl.droidsonroids.gif.GifImageView
android:id="@+id/shiggy_gif"
android:layout_width="match_parent"
android:layout_height="228dp"
android:scaleX="1"
android:scaleY="1"
android:src="@drawable/shiggy"
android:visibility="gone" />
<pl.droidsonroids.gif.GifImageView
android:id="@+id/oneko_gif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleX="1"
android:scaleY="1"
android:src="@drawable/oneko"
android:visibility="gone" />
<TextView
android:layout_width="wrap_content"

View file

@ -40,6 +40,38 @@
android:enabled="false"
android:text="@string/autocheck_vencord" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/splashscreen"
android:textColor="@color/text"
android:textSize="18sp" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent">
<RadioButton
android:id="@+id/viggy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/viggy" />
<RadioButton
android:id="@+id/shiggy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/shiggy" />
<RadioButton
android:id="@+id/oneko"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/oneko" />
</RadioGroup>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -18,4 +18,8 @@
<string name="vendroid_update_available">Vendroid update available</string>
<string name="update">Update</string>
<string name="later">Later</string>
<string name="viggy">Viggy, by shoritsu</string>
<string name="shiggy">Shiggy, by naga_U</string>
<string name="oneko">Oneko</string>
<string name="splashscreen">Splash screen</string>
</resources>