Toolbar background color

main
h4h13 2019-06-04 22:19:20 +05:30
parent 65d9f01eb9
commit 169c2b969b
11 changed files with 80 additions and 17 deletions

View File

@ -31,7 +31,7 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 329 versionCode 330
versionName '3.1.850' versionName '3.1.850'
multiDexEnabled true multiDexEnabled true

View File

@ -1 +1 @@
<html> <head> <style type="text/css"> * { word-wrap: break-word; } {style-placeholder} a { color: #{link-color}; } a:active { color: #{link-color-active}; } ul { list-style-position: outside; padding-left: 0; padding-right: 0; margin-left: 1rem; } li { padding-top: 8px; } </style> </head> <body> <p>We're really sorry for Announcing this Retro Music is driving towards pure Android Material Design guidelines we don't want any unnecessary UI elements that don't need for Music player.</p> <p>Artist images are not loading because last.fm changed policy for image downloading</p> <h4>v3.1.850</h4> <ul> <li>Toolbar will be clickable for Search</li> <li></li> </ul> <h4>v3.1.800</h4> <ul> <li>Search bar CardView background</li> <li>Improve volume zero</li> <li>Now playing and Album theme picker rollback to dialog</li> <li>Fix sharing app link</li> <li>Fix scanning dialog</li> <li>Search bar with CardView</li> <li>Added settings icons for options</li> </ul> <h4>v3.1.700</h4> <ul> <li>Cleaned internal code</li> <li>Removed full screen option</li> <li>Added Toolbar elevation</li> <li>To access menu either tap on Toolbar or Hamburger icon</li> <li>Fix back button not working on playing queue</li> <li>Fix crashing on What's New screen</li> <li>Fix lyrics dialog</li> <li>Changed toggles to line icons</li> <li>Custom UserImageView for loading user profile image</li> <li>Fix crashing on artist list for number format error</li> <li>Fix blacklist dialog crashing</li> <li>Rearranged icons and main menu access</li> <li>Fix some crashes when device is locked or background</li> <li>Folder screen have main options access</li> <li>Dialogs are now using Material Dialogs v3(BottomSheet)</li> <li>Fix Shuffle icon for Artist, Album, Genre and Playlist details</li> </ul> <h4>v3.1.400</h4> <ul> <li>Removed sync lyrics for Android 5</li> <li>Fix Seek-bar color in settings</li> <li>Added keyboard to popup on search</li> <li>Added keyboard to popup on search</li> <li>Improved lock-screen behavior and UI</li> <li>Improved text appearance</li> <li>Fix bio text not showing in settings</li> <li>Fix not showing slider(blur, filter song) amount in settings</li> <li>Fix setting ringtone</li> <li>Fix file sharing crash</li> <li>Fix some crashes</li> <li>Fix playlist icon on small devices</li> <li>Fix empty lyrics text color</li> <li>Fix album cover background purple color in color theme</li> </ul> <h4>v3.1.300</h4> <ul> <li>Fix rename playlist text color</li> <li>Fix same album showing in details page</li> <li>Fix lyrics text alignment on sync and lyrics reading improved</li> <li>Improved home sections loading</li> <li>Removed library options which are duplicated (it's available from profile menu)</li> <li>Replaced collapsing Fab with Android Floating Extended Fab</li> <li>Replaced home with for you</li> <li>Fixed profile image not loading in about</li> <li>Improved selecting user profile image</li> <li>Added bio to enter custom message</li> <li>Improved some UI screens</li> </ul> <h4>v3.1.240</h4> <ul> <li>Fix Search not showing from home screen</li> <li>Fix Volume controls color issue</li> <li>Fix Seek bar alignment</li> <li>Added tiny theme</li> <li>Improved full theme appearances</li> <li>Now playing theme preview updated</li> <li>Fix composer error</li> <li>Bottom Options improved(internal)</li> </ul> <h4>v3.1.200</h4> <ul> <li>Added composer sort and editing</li> <li>Fix Crash in Album tag editor while selecting options</li> <li>Added Filter song length</li> <li>Added Favourites playlist icon will be accent color</li> <li>Added Colorful settings icons</li> <li>Added Corners for dialog</li> </ul> <h4>v3.0.570</h4> <ul> <li>Fix Album/Artist square image</li> <li>Fix Delete dialog text format</li> <li>Fix Profile picture not showing after coming back from folders</li> <li>Fix Play button color i Simple and Plain themes</li> <li>Fix Sleep timer dialog crashing</li> <li>Fix Share song dialog title and text</li> </ul> <p>If you see entire app white or dark or black select same theme in settings to fix </p> <p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a> </p> <p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again. </p> </body> <html> <head> <style type="text/css"> * { word-wrap: break-word; } {style-placeholder} a { color: #{link-color}; } a:active { color: #{link-color-active}; } ul { list-style-position: outside; padding-left: 0; padding-right: 0; margin-left: 1rem; } li { padding-top: 8px; } </style> </head> <body> <p>We're really sorry for Announcing this Retro Music is driving towards pure Android Material Design guidelines we don't want any unnecessary UI elements that don't need for Music player.</p> <p>Artist images are not loading because last.fm changed policy for image downloading</p> <h4>v3.1.850</h4> <ul> <li>Toolbar will be clickable for Search</li> </ul> <h4>v3.1.800</h4> <ul> <li>Search bar CardView background</li> <li>Improve volume zero</li> <li>Now playing and Album theme picker rollback to dialog</li> <li>Fix sharing app link</li> <li>Fix scanning dialog</li> <li>Added settings icons for options</li> </ul> <h4>v3.1.700</h4> <ul> <li>Cleaned internal code</li> <li>Removed full screen option</li> <li>Added Toolbar elevation</li> <li>To access menu either tap on Toolbar or Hamburger icon</li> <li>Fix back button not working on playing queue</li> <li>Fix crashing on What's New screen</li> <li>Fix lyrics dialog</li> <li>Changed toggles to line icons</li> <li>Custom UserImageView for loading user profile image</li> <li>Fix crashing on artist list for number format error</li> <li>Fix blacklist dialog crashing</li> <li>Rearranged icons and main menu access</li> <li>Fix some crashes when device is locked or background</li> <li>Folder screen have main options access</li> <li>Dialogs are now using Material Dialogs v3(BottomSheet)</li> <li>Fix Shuffle icon for Artist, Album, Genre and Playlist details</li> </ul> <h4>v3.1.400</h4> <ul> <li>Removed sync lyrics for Android 5</li> <li>Fix Seek-bar color in settings</li> <li>Added keyboard to popup on search</li> <li>Added keyboard to popup on search</li> <li>Improved lock-screen behavior and UI</li> <li>Improved text appearance</li> <li>Fix bio text not showing in settings</li> <li>Fix not showing slider(blur, filter song) amount in settings</li> <li>Fix setting ringtone</li> <li>Fix file sharing crash</li> <li>Fix some crashes</li> <li>Fix playlist icon on small devices</li> <li>Fix empty lyrics text color</li> <li>Fix album cover background purple color in color theme</li> </ul> <h4>v3.1.300</h4> <ul> <li>Fix rename playlist text color</li> <li>Fix same album showing in details page</li> <li>Fix lyrics text alignment on sync and lyrics reading improved</li> <li>Improved home sections loading</li> <li>Removed library options which are duplicated (it's available from profile menu)</li> <li>Replaced collapsing Fab with Android Floating Extended Fab</li> <li>Replaced home with for you</li> <li>Fixed profile image not loading in about</li> <li>Improved selecting user profile image</li> <li>Added bio to enter custom message</li> <li>Improved some UI screens</li> </ul> <h4>v3.1.240</h4> <ul> <li>Fix Search not showing from home screen</li> <li>Fix Volume controls color issue</li> <li>Fix Seek bar alignment</li> <li>Added tiny theme</li> <li>Improved full theme appearances</li> <li>Now playing theme preview updated</li> <li>Fix composer error</li> <li>Bottom Options improved(internal)</li> </ul> <h4>v3.1.200</h4> <ul> <li>Added composer sort and editing</li> <li>Fix Crash in Album tag editor while selecting options</li> <li>Added Filter song length</li> <li>Added Favourites playlist icon will be accent color</li> <li>Added Colorful settings icons</li> <li>Added Corners for dialog</li> </ul> <h4>v3.0.570</h4> <ul> <li>Fix Album/Artist square image</li> <li>Fix Delete dialog text format</li> <li>Fix Profile picture not showing after coming back from folders</li> <li>Fix Play button color i Simple and Plain themes</li> <li>Fix Sleep timer dialog crashing</li> <li>Fix Share song dialog title and text</li> </ul> <p>If you see entire app white or dark or black select same theme in settings to fix </p> <p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a> </p> <p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again. </p> </body>

View File

@ -59,7 +59,7 @@ class SearchActivity : AbsMusicServiceActivity(), OnQueryTextListener, SearchCon
back.setOnClickListener { onBackPressed() } back.setOnClickListener { onBackPressed() }
voiceSearch.setOnClickListener { startMicSearch() } voiceSearch.setOnClickListener { startMicSearch() }
searchContainer.setCardBackgroundColor(ColorStateList.valueOf(ThemeStore.primaryColor(this))) searchContainer.setCardBackgroundColor(RetroUtil.toolbarColor(this))
keyboardPopup.setOnClickListener { keyboardPopup.setOnClickListener {
val inputManager = getSystemService(Service.INPUT_METHOD_SERVICE) as InputMethodManager val inputManager = getSystemService(Service.INPUT_METHOD_SERVICE) as InputMethodManager

View File

@ -1,6 +1,7 @@
package code.name.monkey.retromusic.fragments.mainactivity; package code.name.monkey.retromusic.fragments.mainactivity;
import android.app.Activity; import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -28,6 +29,7 @@ import org.jetbrains.annotations.NotNull;
import code.name.monkey.appthemehelper.ThemeStore; import code.name.monkey.appthemehelper.ThemeStore;
import code.name.monkey.appthemehelper.common.ATHToolbarActivity; import code.name.monkey.appthemehelper.common.ATHToolbarActivity;
import code.name.monkey.appthemehelper.util.ATHUtil; import code.name.monkey.appthemehelper.util.ATHUtil;
import code.name.monkey.appthemehelper.util.ColorUtil;
import code.name.monkey.appthemehelper.util.TintHelper; import code.name.monkey.appthemehelper.util.TintHelper;
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper; import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.R;
@ -142,7 +144,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
private void setupToolbar() { private void setupToolbar() {
int primaryColor = ThemeStore.Companion.primaryColor(getContext()); int primaryColor = ThemeStore.Companion.primaryColor(getContext());
TintHelper.setTintAuto(contentContainer, primaryColor, true); TintHelper.setTintAuto(contentContainer, primaryColor, true);
toolbar.setBackgroundColor(primaryColor); toolbar.setBackgroundColor(RetroUtil.toolbarColor(getMainActivity()));
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp); toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
toolbar.setOnClickListener(v -> { toolbar.setOnClickListener(v -> {
Pair<View, String> pair = new Pair<>(toolbarContainer, getString(R.string.transition_toolbar)); Pair<View, String> pair = new Pair<>(toolbarContainer, getString(R.string.transition_toolbar));

View File

@ -63,6 +63,7 @@ import code.name.monkey.retromusic.model.Song;
import code.name.monkey.retromusic.util.FileUtil; import code.name.monkey.retromusic.util.FileUtil;
import code.name.monkey.retromusic.util.PreferenceUtil; import code.name.monkey.retromusic.util.PreferenceUtil;
import code.name.monkey.retromusic.util.RetroColorUtil; import code.name.monkey.retromusic.util.RetroColorUtil;
import code.name.monkey.retromusic.util.RetroUtil;
import code.name.monkey.retromusic.util.ViewUtil; import code.name.monkey.retromusic.util.ViewUtil;
import code.name.monkey.retromusic.views.BreadCrumbLayout; import code.name.monkey.retromusic.views.BreadCrumbLayout;
@ -228,7 +229,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
getMainActivity().setSupportActionBar(toolbar); getMainActivity().setSupportActionBar(toolbar);
TintHelper.setTintAuto(container, primaryColor, true); TintHelper.setTintAuto(container, primaryColor, true);
appBarLayout.setBackgroundColor(primaryColor); appBarLayout.setBackgroundColor(primaryColor);
toolbar.setBackgroundColor(primaryColor); toolbar.setBackgroundColor(RetroUtil.toolbarColor(getMainActivity()));
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp); toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
toolbar.setOnClickListener(v -> { toolbar.setOnClickListener(v -> {
showMainMenu(); showMainMenu();

View File

@ -152,7 +152,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
private fun setupToolbar() { private fun setupToolbar() {
toolbar.apply { toolbar.apply {
setBackgroundColor(ThemeStore.primaryColor(context)) setBackgroundColor(RetroUtil.toolbarColor(mainActivity))
setNavigationIcon(R.drawable.ic_menu_white_24dp) setNavigationIcon(R.drawable.ic_menu_white_24dp)
setOnClickListener { setOnClickListener {

View File

@ -61,15 +61,26 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import code.name.monkey.appthemehelper.ThemeStore; import code.name.monkey.appthemehelper.ThemeStore;
import code.name.monkey.appthemehelper.util.ATHUtil;
import code.name.monkey.appthemehelper.util.TintHelper; import code.name.monkey.appthemehelper.util.TintHelper;
import code.name.monkey.retromusic.App; import code.name.monkey.retromusic.App;
import code.name.monkey.retromusic.R;
public class RetroUtil { public class RetroUtil {
private static final int[] TEMP_ARRAY = new int[1]; private static final int[] TEMP_ARRAY = new int[1];
private static final String SHOW_NAV_BAR_RES_NAME = "config_showNavigationBar"; private static final String SHOW_NAV_BAR_RES_NAME = "config_showNavigationBar";
public static int calculateNoOfColumns(Context context) { public static int toolbarColor(@NonNull Context context) {
int color = ThemeStore.Companion.primaryColor(context);
if (ATHUtil.INSTANCE.isWindowBackgroundDark(context)) {
return ATHUtil.INSTANCE.resolveColor(context, R.attr.cardBackgroundColor);
} else {
return color;
}
}
public static int calculateNoOfColumns(@NonNull Context context) {
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
float dpWidth = displayMetrics.widthPixels / displayMetrics.density; float dpWidth = displayMetrics.widthPixels / displayMetrics.density;
return (int) (dpWidth / 180); return (int) (dpWidth / 180);

View File

@ -6,7 +6,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView <com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
android:id="@+id/recyclerView" android:id="@+id/recyclerView"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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="wrap_content"
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingEnd="8dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/playAction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:text="@string/action_play"
android:padding="12dp"
android:textAllCaps="false"
app:icon="@drawable/ic_play_arrow_white_24dp"
app:iconGravity="textStart"
tools:backgroundTint="@color/md_grey_900" />
<com.google.android.material.button.MaterialButton
android:id="@+id/shuffleAction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:text="@string/shuffle"
android:textAllCaps="false"
android:padding="12dp"
app:icon="@drawable/ic_shuffle_white_24dp"
app:iconGravity="textStart"
tools:backgroundTint="@color/md_grey_900" />
</LinearLayout>

View File

@ -12,8 +12,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center_vertical|start" android:layout_gravity="center_vertical|start"
android:layout_marginLeft="-8dp"
android:layout_marginStart="-8dp" android:layout_marginStart="-8dp"
android:layout_marginLeft="-8dp"
android:visibility="gone" android:visibility="gone"
app:srcCompat="@drawable/ic_drag_vertical_white_24dp" app:srcCompat="@drawable/ic_drag_vertical_white_24dp"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
@ -28,10 +28,10 @@
android:id="@+id/image_container" android:id="@+id/image_container"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingEnd="0dp" android:paddingStart="16dp"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="0dp" android:paddingEnd="0dp"
android:paddingStart="16dp"> android:paddingRight="0dp">
<ImageView <ImageView
android:id="@+id/image" android:id="@+id/image"
@ -59,10 +59,10 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_weight="1" android:layout_weight="1"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
@ -88,8 +88,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_marginLeft="72dp"
android:layout_marginStart="72dp" android:layout_marginStart="72dp"
android:layout_marginLeft="72dp"
android:background="?attr/dividerColor" /> android:background="?attr/dividerColor" />
</FrameLayout> </FrameLayout>

View File

@ -22,7 +22,7 @@
android:id="@+id/action_grid_size" android:id="@+id/action_grid_size"
android:icon="@drawable/ic_grid_size_white_24dp" android:icon="@drawable/ic_grid_size_white_24dp"
android:title="@string/action_grid_size" android:title="@string/action_grid_size"
app:showAsAction="ifRoom"> app:showAsAction="never">
<menu> <menu>
<group <group
android:id="@+id/group_grid_size" android:id="@+id/group_grid_size"