Make dark theme darker, Add a soft blue theme

This commit is contained in:
Ender's Games 2018-09-26 12:35:56 -04:00
parent 6dd2df0bd5
commit 2c8446c3d1
19 changed files with 74 additions and 21 deletions

View File

@ -156,6 +156,8 @@ public class AboutFragment extends Fragment {
int app_theme = mPrefs.getInt(Config.pref_app_theme, 0);
if (app_theme == 7) {
list.setSelector(R.drawable.list_selector_dream);
} else if (app_theme == 7) {
list.setSelector(R.drawable.list_selector_blue);
} else {
list.setSelector(R.drawable.list_selector_dark);
}

View File

@ -452,6 +452,9 @@ public class FileBrowser extends Fragment {
if (app_theme == 7) {
childview.findViewById(R.id.childview)
.setBackgroundResource(R.drawable.game_selector_dream);
} else if (app_theme == 1) {
childview.findViewById(R.id.childview)
.setBackgroundResource(R.drawable.game_selector_blue);
} else {
childview.findViewById(R.id.childview)
.setBackgroundResource(R.drawable.game_selector_dark);

View File

@ -60,6 +60,8 @@ public class MainActivity extends AppCompatActivity implements
int app_theme = mPrefs.getInt(Config.pref_app_theme, 0);
if (app_theme == 7) {
setTheme(R.style.AppTheme_Dream);
} else if (app_theme == 1) {
setTheme(R.style.AppTheme_Blue);
} else {
setTheme(R.style.AppTheme);
}

View File

@ -201,7 +201,7 @@ public class OptionsFragment extends Fragment {
mPrefs.edit().putInt(Config.pref_app_theme, 7).apply();
mCallback.recreateActivity();
} else {
mPrefs.edit().putInt(Config.pref_app_theme, 0).apply();
mPrefs.edit().putInt(Config.pref_app_theme, position).apply();
mCallback.recreateActivity();
}
}

View File

@ -78,6 +78,8 @@ public class GitAdapter extends BaseAdapter {
int app_theme = mPrefs.getInt(Config.pref_app_theme, 0);
if (app_theme == 7) {
vi.setBackgroundResource(R.drawable.list_selector_dream);
} else if (app_theme == 1) {
vi.setBackgroundResource(R.drawable.list_selector_blue);
} else {
vi.setBackgroundResource(R.drawable.list_selector_dark);
}
@ -101,7 +103,7 @@ public class GitAdapter extends BaseAdapter {
RelativeLayout item = (RelativeLayout) vi.findViewById(R.id.change);
if (current != null && current.equals(sha.substring(0, 7))) {
item.getBackground().setColorFilter(0xFF00FF00,
PorterDuff.Mode.OVERLAY);
PorterDuff.Mode.MULTIPLY);
} else {
item.getBackground().setColorFilter(null);
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@mipmap/texture_blue"
android:tileMode="repeat" />

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Selector style for listrow -->
<item android:drawable="@android:color/transparent" android:state_pressed="false" android:state_selected="false" android:state_focused="false"/>
<item android:drawable="@drawable/gradient_bg_hover_blue" android:state_pressed="true"/>
<item android:drawable="@drawable/gradient_bg_hover_blue" android:state_focused="true"/>
<item android:drawable="@drawable/gradient_bg_hover_blue" android:state_pressed="false" android:state_selected="true"/>
</selector>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- Gradient Bg for listrow -->
<gradient
android:angle="270"
android:centerColor="#6b6b6b"
android:endColor="#4d4d4d"
android:startColor="#868686" />
</shape>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- Gradient BgColor for listrow Selected -->
<gradient
android:angle="270"
android:centerColor="@color/colorBlueAccentDark"
android:endColor="@color/colorBlueAccent"
android:startColor="@color/colorBlueAccent" />
</shape>

View File

@ -5,7 +5,7 @@
<!-- Gradient BgColor for listrow Selected -->
<gradient
android:angle="270"
android:centerColor="@color/colorDreamAccentDark"
android:centerColor="@color/colorDreamAccentLight"
android:endColor="@color/colorDreamAccent"
android:startColor="@color/colorDreamAccent" />

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Selector style for listrow -->
<item android:drawable="@drawable/gradient_bg" android:state_pressed="false" android:state_selected="false"/>
<item android:drawable="@drawable/gradient_bg_hover_blue" android:state_pressed="true"/>
<item android:drawable="@drawable/gradient_bg_hover_blue" android:state_pressed="false" android:state_selected="true"/>
</selector>

View File

@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Selector style for listrow -->
<item android:drawable="@drawable/gradient_bg_dark" android:state_pressed="false" android:state_selected="false"/>
<item android:drawable="@drawable/gradient_bg" android:state_pressed="false" android:state_selected="false"/>
<item android:drawable="@drawable/gradient_bg_hover_dark" android:state_pressed="true"/>
<item android:drawable="@drawable/gradient_bg_hover_dark" android:state_pressed="false" android:state_selected="true"/>

View File

@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Selector style for listrow -->
<item android:drawable="@drawable/gradient_bg_dream" android:state_pressed="false" android:state_selected="false"/>
<item android:drawable="@drawable/gradient_bg" android:state_pressed="false" android:state_selected="false"/>
<item android:drawable="@drawable/gradient_bg_hover_dream" android:state_pressed="true"/>
<item android:drawable="@drawable/gradient_bg_hover_dream" android:state_pressed="false" android:state_selected="true"/>

View File

@ -36,6 +36,7 @@
android:layout_marginTop="16dip"
android:layout_toRightOf="@+id/thumbnail"
android:text="GitHub Committer"
android:textColor="#040404"
android:textSize="14sp"
android:textStyle="bold"
android:typeface="sans" />
@ -48,6 +49,7 @@
android:layout_marginTop="2dip"
android:layout_toRightOf="@+id/thumbnail"
android:text="GitHub Commit Message"
android:textColor="#343434"
android:textSize="12sp" />
<!-- Right Date -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,16 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorDarkPrimary">#3F51B5</color>
<color name="colorDarkPrimaryDark">#303F9F</color>
<color name="colorDarkPrimary">#0b2032</color>
<color name="colorDarkPrimaryDark">#041121</color>
<color name="colorDarkAccent">#FF4081</color>
<color name="colorDarkAccentDark">#e91e63</color>
<color name="colorDarkText">#e0e0e0</color>
<color name="colorDarkTint">#e0e0e0</color>
<color name="colorBluePrimary">#226696</color>
<color name="colorBluePrimaryDark">#164f6e</color>
<color name="colorBlueAccent">#e040fb</color>
<color name="colorBlueAccentDark">#9c27b0</color>
<color name="colorBlueText">#e0e0e0</color>
<color name="colorBlueTint">#072540</color>
<color name="colorDreamPrimary">#6e6b66</color>
<color name="colorDreamPrimaryDark">#534e4b</color>
<color name="colorDreamAccent">#5787c7</color>
<color name="colorDreamAccentDark">#42a5f5</color>
<color name="colorDreamAccentLight">#42a5f5</color>
<color name="colorDreamText">#3d3533</color>
<color name="colorDreamTint">#534e4b</color>

View File

@ -22,6 +22,7 @@
<string-array name="themes_app">
<item>Dark</item>
<item>Blue</item>
<item>Dream</item>
</string-array>

View File

@ -14,6 +14,17 @@
<item name="android:tint">@color/colorDarkTint</item>
</style>
<style name="AppTheme.Blue" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">@color/colorBluePrimary</item>
<item name="colorPrimaryDark">@color/colorBluePrimaryDark</item>
<item name="colorAccent">@color/colorBlueAccent</item>
<item name="android:windowBackground">@drawable/background_blue</item>
<item name="android:textColorPrimary">@android:color/white</item>
<item name="android:textColorSecondary">@color/colorBlueText</item>
<item name="android:textColorTertiary">@android:color/white</item>
<item name="android:tint">@color/colorBlueTint</item>
</style>
<style name="AppTheme.Dream" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorDreamPrimary</item>
<item name="colorPrimaryDark">@color/colorDreamPrimaryDark</item>