Design fixes

This commit is contained in:
Karim Abou Zeid 2015-03-01 21:17:04 +01:00
commit 13843095a8
48 changed files with 137 additions and 126 deletions

View file

@ -87,7 +87,7 @@ public class AlbumViewGridAdapter extends ArrayAdapter<Album> {
if (vibrantSwatch != null) {
title.setTextColor(vibrantSwatch.getTitleTextColor());
artist.setTextColor(vibrantSwatch.getTitleTextColor());
ViewUtil.animateViewColor(footer, Util.resolveColor(context, R.attr.colorPrimary),
ViewUtil.animateViewColor(footer, getContext().getResources().getColor(R.color.materialmusic_default_bar_color),
vibrantSwatch.getRgb());
} else {
paletteBugFixBlackAndWhite(title, artist, footer);
@ -99,7 +99,7 @@ public class AlbumViewGridAdapter extends ArrayAdapter<Album> {
private void paletteBugFixBlackAndWhite(TextView title, TextView artist, View footer) {
title.setTextColor(Util.resolveColor(context, R.attr.title_text_color));
artist.setTextColor(Util.resolveColor(context, R.attr.caption_text_color));
ViewUtil.animateViewColor(footer, Util.resolveColor(context, R.attr.colorPrimary),
Util.resolveColor(context, R.attr.colorPrimary));
int defaultBarColor = getContext().getResources().getColor(R.color.materialmusic_default_bar_color);
ViewUtil.animateViewColor(footer, defaultBarColor, defaultBarColor);
}
}

View file

@ -42,7 +42,7 @@ public class SearchAdapter extends ArrayAdapter<SearchEntry> {
title.setTypeface(null, Typeface.BOLD);
subTitle.setVisibility(View.GONE);
imageView.setVisibility(View.GONE);
convertView.setBackgroundColor(Util.resolveColor(getContext(), R.attr.colorPrimary));
convertView.setBackgroundColor(getContext().getResources().getColor(R.color.materialmusic_default_bar_color));
} else {
title.setTypeface(null, Typeface.NORMAL);
subTitle.setVisibility(View.VISIBLE);

View file

@ -340,11 +340,24 @@ public class ArtistDetailActivity extends AbsFabActivity implements OnMusicRemot
artistTitleText.setBackgroundColor(swatch.getRgb());
slidingTabs.setBackgroundColor(swatch.getRgb());
artistTitleText.setTextColor(swatch.getTitleTextColor());
} else {
setStandardColors();
}
}
});
}
private void setStandardColors() {
int titleTextColor = Util.resolveColor(this, R.attr.title_text_color);
int defaultBarColor = getResources().getColor(R.color.materialmusic_default_bar_color);
toolbarColor = defaultBarColor;
artistArtOverlayView.setBackgroundColor(defaultBarColor);
artistTitleText.setBackgroundColor(defaultBarColor);
slidingTabs.setBackgroundColor(defaultBarColor);
artistTitleText.setTextColor(titleTextColor);
}
private void setUpViewPatch() {
final View contentView = getWindow().getDecorView().findViewById(android.R.id.content);
contentView.post(new Runnable() {

View file

@ -110,6 +110,7 @@ public class MainActivity extends AbsFabActivity
}
private void setUpToolBar() {
setTitle(getResources().getString(R.string.app_name));
toolbar = (Toolbar) findViewById(R.id.toolbar);
statusBar = findViewById(R.id.statusBar);
setSupportActionBar(toolbar);

View file

@ -273,9 +273,9 @@ public class MusicControllerActivity extends AbsFabActivity implements OnMusicRe
private void setStandardColors() {
int songTitleTextColor = Util.resolveColor(this, R.attr.title_text_color);
int artistNameTextColor = Util.resolveColor(this, R.attr.caption_text_color);
int colorPrimary = Util.resolveColor(MusicControllerActivity.this, R.attr.colorPrimary);
int defaultBarColor = getResources().getColor(R.color.materialmusic_default_bar_color);
animateColorChange(colorPrimary);
animateColorChange(defaultBarColor);
songTitle.setTextColor(songTitleTextColor);
songArtist.setTextColor(artistNameTextColor);

View file

@ -291,7 +291,7 @@ public abstract class AbsTagEditorActivity extends ActionBarActivity {
Palette.generateAsync(bitmap, new Palette.PaletteAsyncListener() {
@Override
public void onGenerated(Palette palette) {
final int vibrantColor = palette.getVibrantColor(Util.resolveColor(AbsTagEditorActivity.this, R.attr.colorPrimary));
final int vibrantColor = palette.getVibrantColor(getResources().getColor(R.color.materialmusic_default_bar_color));
paletteColorPrimary = vibrantColor;
observableScrollViewCallbacks.onScrollChanged(scrollView.getCurrentScrollY(), false, false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

View file

@ -134,11 +134,11 @@ public class NavigationDrawerFragment extends Fragment {
private void setUpListView() {
final ArrayList<NavigationDrawerItem> navigationDrawerItems = new ArrayList<>();
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.songs), R.drawable.songs));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.albums), R.drawable.album));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.artists), R.drawable.interpret));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.genres), R.drawable.songs));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.playlists), R.drawable.playlist));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.songs), R.drawable.ic_my_library_music_white_24dp));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.albums), R.drawable.ic_album_white_24dp));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.artists), R.drawable.ic_person_white_24dp));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.genres), R.drawable.ic_my_library_music_white_24dp));
navigationDrawerItems.add(new NavigationDrawerItem(getString(R.string.playlists), R.drawable.ic_queue_music_white_24dp));
drawerAdapter = new NavigationDrawerItemAdapter(getActivity(), R.id.navigation_drawer, navigationDrawerItems);