Skip to content

Commit

Permalink
Fix for Android 5 + a setting migration I didn't consider
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorcha committed Mar 18, 2015
1 parent 5d9f4a9 commit b8c2e7e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<activity
android:name=".MainActivity"
android:label="@string/app_name" >
android:label="@string/app_name">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ else if(player.equals("Default Music Player")) {
}
}

try {
sharedPrefs.getFloat("opacity", 0.5f);
}
catch(ClassCastException e) {
sharedPrefs.edit().putFloat("opacity", sharedPrefs.getInt("opacity", 0) / 100);
}

windowManager = (WindowManager) this.getSystemService(Context.WINDOW_SERVICE);

vibrator = (Vibrator) this.getSystemService(Context.VIBRATOR_SERVICE);
Expand Down
Binary file removed app/src/main/res/res/drawable-mdpi/ic_start.png
Binary file not shown.
19 changes: 19 additions & 0 deletions app/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">@color/primary</item>

<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">@color/primaryDark</item>

<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">@color/accent</item>

<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight & colorSwitchThumbNormal. -->
</style>

</resources>
3 changes: 1 addition & 2 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>

<resources>

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
Expand All @@ -17,4 +16,4 @@
colorControlHighlight & colorSwitchThumbNormal. -->
</style>

</resources>
</resources>

0 comments on commit b8c2e7e

Please sign in to comment.