Merge remote-tracking branch 'origin/master'

This commit is contained in:
Christopher Beckmann 2016-01-31 14:54:05 +01:00
commit a20ce17240
3 changed files with 9 additions and 2 deletions

View file

@ -2,6 +2,8 @@ package org.secuso.privacyfriendlysudoku.ui;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.PorterDuff;
import android.graphics.drawable.LayerDrawable;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.support.design.widget.NavigationView;
@ -116,6 +118,10 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
});
GameDifficulty lastChosenDifficulty = GameDifficulty.valueOf(settings.getString("lastChosenDifficulty", "Easy"));
difficultyBar.setRating(GameDifficulty.getValidDifficultyList().indexOf(lastChosenDifficulty) + 1);
LayerDrawable stars = (LayerDrawable)difficultyBar.getProgressDrawable();
stars.getDrawable(2).setColorFilter(getResources().getColor(R.color.colorPrimary), PorterDuff.Mode.SRC_ATOP);//Color for Stars fully selected
stars.getDrawable(1).setColorFilter(getResources().getColor(R.color.middleblue), PorterDuff.Mode.SRC_ATOP);//Color for Stars partially selected
stars.getDrawable(0).setColorFilter(getResources().getColor(R.color.lightblue), PorterDuff.Mode.SRC_ATOP);//color for stars not selected
// on first create always check for loadable levels!
SharedPreferences.Editor editor = settings.edit();

View file

@ -29,6 +29,7 @@
<item name="android:windowSoftInputMode">adjustPan|stateUnspecified</item>
</style>
<!-- <style name="FontStyle">
<item name="android:fontFamily"></item>
</style> -->