Preferences Layout, fixed Kurisu Sprite appearing too late at start

This commit is contained in:
Yink 2017-03-06 01:55:38 +01:00
parent 7942135e21
commit ed4a24728b
6 changed files with 24 additions and 5 deletions

View File

@ -26,7 +26,8 @@
</activity>
<activity
android:name=".SettingsActivity"
android:label="Preferences" />
android:label="Preferences"
android:theme="@style/PreferenceTheme" />
</application>
</manifest>

View File

@ -11,7 +11,7 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.Drawable;
import android.media.*;
import android.media.MediaPlayer;
import android.media.audiofx.Visualizer;
import android.os.Build;
import android.os.Bundle;
@ -53,6 +53,7 @@ public class MainActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
kurisu = (ImageView) findViewById(R.id.imageView_kurisu);
kurisu.setImageResource(R.drawable.kurisu9a);
subtitles = (TextView) findViewById(R.id.textView_subtitles);
ImageView imageViewSubtitles = (ImageView) findViewById(R.id.imageView_subtitles);
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@android:color/holo_orange_light</item>
</style>
</resources>

View File

@ -2,5 +2,5 @@
<resources>
<color name="colorPrimary">#000</color>
<color name="colorPrimaryDark">#000</color>
<color name="colorAccent">#FF4081</color>
<color name="colorAccent">#ffcf40</color>
</resources>

View File

@ -1,11 +1,18 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="PreferenceTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@color/colorPrimaryDark</item>
</style>
</resources>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Subtitle Settings">
<CheckBoxPreference
<SwitchPreference
android:defaultValue="false"
android:key="show_subtitles"
android:summary="Shows subtitles for Amadeus' answers"