mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-27 01:04:16 +01:00
Add Ko-Fi credits to settings
This commit is contained in:
parent
128ea33073
commit
160c2f3457
@ -12,6 +12,7 @@ import androidx.appcompat.app.AppCompatActivity
|
|||||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
import androidx.preference.CheckBoxPreference
|
import androidx.preference.CheckBoxPreference
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
|
import androidx.preference.PreferenceCategory
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import emu.skyline.databinding.SettingsActivityBinding
|
import emu.skyline.databinding.SettingsActivityBinding
|
||||||
import emu.skyline.preference.IntegerListPreference
|
import emu.skyline.preference.IntegerListPreference
|
||||||
@ -96,6 +97,13 @@ class SettingsActivity : AppCompatActivity() {
|
|||||||
@Suppress("SENSELESS_COMPARISON")
|
@Suppress("SENSELESS_COMPARISON")
|
||||||
if (BuildConfig.BUILD_TYPE != "release")
|
if (BuildConfig.BUILD_TYPE != "release")
|
||||||
findPreference<Preference>("category_debug")?.isVisible = true
|
findPreference<Preference>("category_debug")?.isVisible = true
|
||||||
|
|
||||||
|
|
||||||
|
resources.getStringArray(R.array.credits_entries).asIterable().shuffled().forEach {
|
||||||
|
findPreference<PreferenceCategory>("category_credits")?.addPreference(Preference(context!!).apply {
|
||||||
|
title = it
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDisplayPreferenceDialog(preference : Preference) {
|
override fun onDisplayPreferenceDialog(preference : Preference) {
|
||||||
|
@ -90,4 +90,11 @@
|
|||||||
<item>0</item>
|
<item>0</item>
|
||||||
<item>8</item>
|
<item>8</item>
|
||||||
</integer-array>
|
</integer-array>
|
||||||
|
<string-array name="credits_entries">
|
||||||
|
<item>j0hnnybrav0</item>
|
||||||
|
<item>Ell Jensen</item>
|
||||||
|
<item>Pete y los Androides</item>
|
||||||
|
<item>ArkSource</item>
|
||||||
|
<item>程家小将</item>
|
||||||
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user