Replaced the big pink heart with a vector drawable.

This commit is contained in:
Karim Abou Zeid 2016-02-28 23:25:34 +01:00
commit b8595ddaf5
6 changed files with 16 additions and 101 deletions

View file

@ -27,8 +27,8 @@ public abstract class AbsThemeActivity extends ATHToolbarActivity {
if (!ThemeStore.isConfigured(this, 1)) {
ThemeStore.editTheme(this)
.activityTheme(R.style.Theme_Phonograph_Light)
.primaryColorRes(R.color.indigo_500)
.accentColorRes(R.color.pink_A400)
.primaryColorRes(R.color.md_indigo_500)
.accentColorRes(R.color.md_pink_A400)
.commit();
}
getSharedPreferences("[[kabouzeid_app-theme-helper]]", 0).edit().putInt("activity_theme", PreferenceUtil.getInstance(this).getGeneralTheme()).commit(); // TEMPORARY FIX

View file

@ -6,7 +6,6 @@ import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.StyleRes;
import android.support.v4.content.ContextCompat;
import com.kabouzeid.gramophone.R;
import com.kabouzeid.gramophone.helper.SortOrder;
@ -23,9 +22,6 @@ public final class PreferenceUtil {
public static final String ALBUM_SONG_SORT_ORDER = "album_song_sort_order";
public static final String SONG_SORT_ORDER = "song_sort_order";
// don't use "colored_navigation_bar" key here as this causes a class cast exception for users upgrading from older versions
public static final String COLORED_NAVIGATION_BAR = "should_color_navigation_bar";
public static final String ALBUM_GRID_SIZE = "album_grid_size";
public static final String ALBUM_GRID_SIZE_LAND = "album_grid_size_land";
@ -39,13 +35,7 @@ public final class PreferenceUtil {
public static final String SONG_COLORED_FOOTERS = "song_colored_footers";
public static final String ARTIST_COLORED_FOOTERS = "artist_colored_footers";
public static final String OPAQUE_TOOLBAR_NOW_PLAYING = "opaque_toolbar_now_playing";
public static final String OPAQUE_STATUSBAR_NOW_PLAYING = "opaque_statusbar_now_playing";
public static final String FORCE_SQUARE_ALBUM_COVER = "force_square_album_art";
public static final String LARGER_TITLE_BOX_NOW_PLAYING = "larger_title_box_now_playing";
public static final String ALTERNATIVE_PROGRESS_SLIDER_NOW_PLAYING = "alternative_progress_slider_now_playing";
public static final String PLAYBACK_CONTROLLER_CARD_NOW_PLAYING = "playback_controller_card_now_playing";
public static final String COLOR_PLAYBACK_CONTROLS_NOW_PLAYING = "color_playback_controls_now_playing";
public static final String COLORED_NOTIFICATION = "colored_notification";
@ -89,17 +79,6 @@ public final class PreferenceUtil {
mPreferences.unregisterOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
}
@SuppressLint("CommitPrefEdits")
public void setGeneralTheme(Context context, String value) {
String[] allowedValues = context.getResources().getStringArray(R.array.pref_general_theme_list_values);
for (String allowedValue : allowedValues) {
if (value.equals(allowedValue)) {
mPreferences.edit().putString(GENERAL_THEME, value).commit();
return;
}
}
}
public int getGeneralTheme() {
return getThemeResFromPrefValue(mPreferences.getString(GENERAL_THEME, ""));
}
@ -117,35 +96,6 @@ public final class PreferenceUtil {
}
}
public int getThemeColorPrimary(Context context) {
return mPreferences.getInt("primary_color", ContextCompat.getColor(context, R.color.indigo_500));
}
@SuppressLint("CommitPrefEdits")
public void setThemeColorPrimary(int color) {
mPreferences.edit().putInt("primary_color", color).commit();
}
public int getThemeColorAccent(Context context) {
return mPreferences.getInt("accent_color", ContextCompat.getColor(context, R.color.pink_A400));
}
@SuppressLint("CommitPrefEdits")
public void setThemeColorAccent(int color) {
mPreferences.edit().putInt("accent_color", color).commit();
}
public final boolean shouldUseColoredNavigationBar() {
return mPreferences.getBoolean(COLORED_NAVIGATION_BAR, false);
}
@SuppressLint("CommitPrefEdits")
public void setColoredNavigationBar(boolean coloredNavigationBar) {
final SharedPreferences.Editor editor = mPreferences.edit();
editor.putBoolean(COLORED_NAVIGATION_BAR, coloredNavigationBar);
editor.commit();
}
public final int getDefaultStartPage() {
return Integer.parseInt(mPreferences.getString(DEFAULT_START_PAGE, "-1"));
}
@ -166,34 +116,6 @@ public final class PreferenceUtil {
return mPreferences.getBoolean(COLORED_NOTIFICATION, true);
}
public final boolean opaqueStatusbarNowPlaying() {
return mPreferences.getBoolean(OPAQUE_STATUSBAR_NOW_PLAYING, false);
}
public final boolean opaqueToolbarNowPlaying() {
return mPreferences.getBoolean(OPAQUE_TOOLBAR_NOW_PLAYING, false);
}
public final boolean forceSquareAlbumCover() {
return mPreferences.getBoolean(FORCE_SQUARE_ALBUM_COVER, false);
}
public final boolean playbackControllerCardNowPlaying() {
return mPreferences.getBoolean(PLAYBACK_CONTROLLER_CARD_NOW_PLAYING, false);
}
public final boolean colorPlaybackControlsNowPlaying() {
return mPreferences.getBoolean(COLOR_PLAYBACK_CONTROLS_NOW_PLAYING, true);
}
public final boolean largerTitleBoxNowPlaying() {
return mPreferences.getBoolean(LARGER_TITLE_BOX_NOW_PLAYING, false);
}
public final boolean alternativeProgressSliderNowPlaying() {
return mPreferences.getBoolean(ALTERNATIVE_PROGRESS_SLIDER_NOW_PLAYING, false);
}
public final boolean gaplessPlayback() {
return mPreferences.getBoolean(GAPLESS_PLAYBACK, false);
}
@ -366,6 +288,7 @@ public final class PreferenceUtil {
return mPreferences.getInt(LAST_CHANGELOG_VERSION, -1);
}
@SuppressLint("CommitPrefEdits")
public void setIntroShown() {
// don't use apply here
mPreferences.edit().putBoolean(INTRO_SHOWN, true).commit();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -9,13 +10,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
<android.support.v7.widget.AppCompatImageView
android:id="@+id/player_favorite_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:padding="72dp"
android:src="@drawable/ic_favorite_red_a400_96dp"
android:tint="@color/md_pink_A400"
android:tintMode="src_in"
android:visibility="invisible"
tools:ignore="ContentDescription" />
app:srcCompat="@drawable/ic_favorite_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" />
</FrameLayout>

View file

@ -1,15 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="pink_A400">#F50057</color>
<color name="indigo_500">#3F51B5</color>
<color name="grey_900">#212121</color>
<color name="grey_800">#424242</color>
<color name="grey_300">#E0E0E0</color>
<color name="blue_grey_700">#455A64</color>
<color name="white">#FFFFFF</color>
</resources>

View file

@ -12,9 +12,9 @@
<item name="rectSelector">@drawable/rect_selector_dark</item>
<item name="rectSelectorStrong">@drawable/rect_selector_strong_dark</item>
<item name="cardBackgroundColor">@color/grey_800</item>
<item name="cardBackgroundColor">@color/md_grey_800</item>
<item name="defaultFooterColor">@color/grey_900</item>
<item name="defaultFooterColor">@color/md_grey_900</item>
<item name="dividerColor">@color/md_divider_white</item>
<item name="iconColor">@color/ate_secondary_text_dark</item>
@ -41,9 +41,9 @@
<item name="rectSelector">@drawable/rect_selector</item>
<item name="rectSelectorStrong">@drawable/rect_selector_strong</item>
<item name="cardBackgroundColor">@color/white</item>
<item name="cardBackgroundColor">@color/md_white_1000</item>
<item name="defaultFooterColor">@color/grey_300</item>
<item name="defaultFooterColor">@color/md_grey_300</item>
<item name="dividerColor">@color/md_divider_black</item>
<item name="iconColor">@color/ate_secondary_text_light</item>
@ -62,9 +62,9 @@
<style name="Theme.Phonograph.Base.Black" parent="@style/Theme.Phonograph.Base">
<item name="android:windowBackground">@android:color/black</item>
<item name="dividerColor">#18FFFFFF</item>
<item name="defaultFooterColor">@color/grey_800</item>
<item name="cardBackgroundColor">@color/grey_900</item>
<item name="md_background_color">@color/grey_900</item>
<item name="defaultFooterColor">@color/md_grey_800</item>
<item name="cardBackgroundColor">@color/md_grey_900</item>
<item name="md_background_color">@color/md_grey_900</item>
</style>
<style name="FabParent">