Fix color issues
This commit is contained in:
parent
a81e80764d
commit
5fcdacb86b
18 changed files with 98 additions and 581 deletions
|
@ -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>
<h4>v3.1.700</h4>
<ul>
<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>
<h4>v3.1.700</h4>
<b>Artist images are not loading because last.fm changed policy for image downloading</b>
<ul>
<li>Search bar with CardView</li>
<li>Added settings icons for options</li>
<li>Removed profile</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>
|
|
@ -14,6 +14,7 @@ import androidx.core.app.ActivityCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
||||||
|
import code.name.monkey.retromusic.dialogs.OptionsSheetDialogFragment
|
||||||
import code.name.monkey.retromusic.fragments.mainactivity.LibraryFragment
|
import code.name.monkey.retromusic.fragments.mainactivity.LibraryFragment
|
||||||
import code.name.monkey.retromusic.fragments.mainactivity.folders.FoldersFragment
|
import code.name.monkey.retromusic.fragments.mainactivity.folders.FoldersFragment
|
||||||
import code.name.monkey.retromusic.fragments.mainactivity.home.BannerHomeFragment
|
import code.name.monkey.retromusic.fragments.mainactivity.home.BannerHomeFragment
|
||||||
|
@ -122,7 +123,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
||||||
PreferenceUtil.getInstance().unregisterOnSharedPreferenceChangedListener(this)
|
PreferenceUtil.getInstance().unregisterOnSharedPreferenceChangedListener(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setCurrentFragment(fragment: Fragment, b: Boolean) {
|
private fun setCurrentFragment(fragment: Fragment, b: Boolean) {
|
||||||
val trans = supportFragmentManager.beginTransaction()
|
val trans = supportFragmentManager.beginTransaction()
|
||||||
trans.replace(R.id.fragment_container, fragment, null)
|
trans.replace(R.id.fragment_container, fragment, null)
|
||||||
if (b) {
|
if (b) {
|
||||||
|
@ -294,8 +295,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
if (item.itemId == android.R.id.home) {
|
if (item.itemId == android.R.id.home) {
|
||||||
NavigationUtil.goToSearch(this);
|
OptionsSheetDialogFragment.newInstance().show(supportFragmentManager, "Main_Menu")
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item)
|
return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ class SettingsActivity : AbsBaseActivity(), SharedPreferences.OnSharedPreference
|
||||||
toolbar.apply {
|
toolbar.apply {
|
||||||
setBackgroundColor(ThemeStore.primaryColor(context))
|
setBackgroundColor(ThemeStore.primaryColor(context))
|
||||||
setNavigationOnClickListener { onBackPressed() }
|
setNavigationOnClickListener { onBackPressed() }
|
||||||
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(context))
|
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondargit context))
|
||||||
}
|
}
|
||||||
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))
|
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
||||||
R.id.actionEqualizer -> NavigationUtil.openEqualizer(mainActivity)
|
R.id.actionEqualizer -> NavigationUtil.openEqualizer(mainActivity)
|
||||||
|
|
||||||
}
|
}
|
||||||
dismiss()
|
materialDialog?.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun prepareBugReport() {
|
private fun prepareBugReport() {
|
||||||
|
@ -77,6 +77,7 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
||||||
private lateinit var actionShare: View
|
private lateinit var actionShare: View
|
||||||
private lateinit var actionBugReport: View
|
private lateinit var actionBugReport: View
|
||||||
private lateinit var buyProContainer: CardView
|
private lateinit var buyProContainer: CardView
|
||||||
|
private lateinit var materialDialog: MaterialDialog
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val layout = LayoutInflater.from(context).inflate(R.layout.fragment_main_options, null)
|
val layout = LayoutInflater.from(context).inflate(R.layout.fragment_main_options, null)
|
||||||
|
@ -106,11 +107,11 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
||||||
NavigationUtil.goToProVersion(context)
|
NavigationUtil.goToProVersion(context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
materialDialog = MaterialDialog(activity!!, BottomSheet())
|
||||||
return MaterialDialog(activity!!, BottomSheet())
|
|
||||||
.show {
|
.show {
|
||||||
customView(view = layout, scrollable = true)
|
customView(view = layout, scrollable = true)
|
||||||
}
|
}
|
||||||
|
return materialDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -3,13 +3,12 @@ package code.name.monkey.retromusic.fragments.base
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
import code.name.monkey.appthemehelper.util.VersionUtils
|
import code.name.monkey.appthemehelper.util.VersionUtils
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.dialogs.OptionsSheetDialogFragment
|
|
||||||
import code.name.monkey.retromusic.activities.MainActivity
|
import code.name.monkey.retromusic.activities.MainActivity
|
||||||
|
import code.name.monkey.retromusic.dialogs.OptionsSheetDialogFragment
|
||||||
|
|
||||||
abstract class AbsMainActivityFragment : AbsMusicServiceFragment() {
|
abstract class AbsMainActivityFragment : AbsMusicServiceFragment() {
|
||||||
|
|
||||||
|
@ -50,6 +49,6 @@ abstract class AbsMainActivityFragment : AbsMusicServiceFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun showMainMenu() {
|
protected fun showMainMenu() {
|
||||||
OptionsSheetDialogFragment.newInstance().show(childFragmentManager, "Main Menu")
|
OptionsSheetDialogFragment.newInstance().show(childFragmentManager, "Main_Menu")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,11 +139,11 @@ 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.setNavigationIcon(R.drawable.ic_menu_white_24dp);
|
||||||
toolbar.setOnClickListener(v -> {
|
toolbar.setOnClickListener(v -> {
|
||||||
showMainMenu();
|
showMainMenu();
|
||||||
});
|
});
|
||||||
toolbar.setBackgroundColor(primaryColor);
|
|
||||||
toolbar.setNavigationIcon(null);
|
|
||||||
appBarLayout.setBackgroundColor(primaryColor);
|
appBarLayout.setBackgroundColor(primaryColor);
|
||||||
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
||||||
getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(getContext())));
|
getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(getContext())));
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package code.name.monkey.retromusic.fragments.mainactivity.folders;
|
package code.name.monkey.retromusic.fragments.mainactivity.folders;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.media.MediaScannerConnection;
|
import android.media.MediaScannerConnection;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -14,7 +15,6 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.webkit.MimeTypeMap;
|
import android.webkit.MimeTypeMap;
|
||||||
import android.widget.PopupMenu;
|
import android.widget.PopupMenu;
|
||||||
import android.widget.ProgressBar;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
@ -26,8 +26,6 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.afollestad.materialcab.MaterialCab;
|
import com.afollestad.materialcab.MaterialCab;
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
|
||||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet;
|
|
||||||
import com.google.android.material.appbar.AppBarLayout;
|
import com.google.android.material.appbar.AppBarLayout;
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
||||||
|
@ -91,7 +89,6 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
|
|
||||||
private AppBarLayout appBarLayout;
|
private AppBarLayout appBarLayout;
|
||||||
|
|
||||||
|
|
||||||
private FastScrollRecyclerView recyclerView;
|
private FastScrollRecyclerView recyclerView;
|
||||||
|
|
||||||
private Comparator<File> fileComparator = (lhs, rhs) -> {
|
private Comparator<File> fileComparator = (lhs, rhs) -> {
|
||||||
|
@ -232,6 +229,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
TintHelper.setTintAuto(container, primaryColor, true);
|
TintHelper.setTintAuto(container, primaryColor, true);
|
||||||
appBarLayout.setBackgroundColor(primaryColor);
|
appBarLayout.setBackgroundColor(primaryColor);
|
||||||
toolbar.setBackgroundColor(primaryColor);
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
|
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
|
||||||
toolbar.setOnClickListener(v -> {
|
toolbar.setOnClickListener(v -> {
|
||||||
showMainMenu();
|
showMainMenu();
|
||||||
});
|
});
|
||||||
|
@ -328,10 +326,6 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case android.R.id.home:
|
|
||||||
//noinspection ConstantConditions
|
|
||||||
getActivity().onBackPressed();
|
|
||||||
break;
|
|
||||||
case R.id.action_go_to_start_directory:
|
case R.id.action_go_to_start_directory:
|
||||||
setCrumb(new BreadCrumbLayout.Crumb(tryGetCanonicalFile(PreferenceUtil.getInstance().getStartDirectory())), true);
|
setCrumb(new BreadCrumbLayout.Crumb(tryGetCanonicalFile(PreferenceUtil.getInstance().getStartDirectory())), true);
|
||||||
return true;
|
return true;
|
||||||
|
@ -469,8 +463,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
|
|
||||||
private void checkIsEmpty() {
|
private void checkIsEmpty() {
|
||||||
if (empty != null) {
|
if (empty != null) {
|
||||||
empty
|
empty.setVisibility(adapter == null || adapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
||||||
.setVisibility(adapter == null || adapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -730,21 +723,13 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Dialog createDialog(@NonNull Context context) {
|
protected Dialog createDialog(@NonNull Context context) {
|
||||||
View view = LayoutInflater.from(context).inflate(R.layout.progress_bar, null);
|
ProgressDialog dialog = new ProgressDialog(context);
|
||||||
view.setBackgroundColor(ThemeStore.Companion.primaryColor(context));
|
dialog.setIndeterminate(true);
|
||||||
ProgressBar progressBar = view.findViewById(R.id.progressBar);
|
dialog.setTitle(R.string.listing_files);
|
||||||
TintHelper.setTintAuto(progressBar, ThemeStore.Companion.accentColor(context), false);
|
dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
|
||||||
|
dialog.setOnCancelListener(dialog1 -> cancel(false));
|
||||||
MaterialDialog materialDialog = new MaterialDialog(context, new BottomSheet());
|
dialog.setOnDismissListener(dialog1 -> cancel(false));
|
||||||
materialDialog.setContentView(view);
|
return dialog;
|
||||||
materialDialog.title(R.string.listing_files, "");
|
|
||||||
materialDialog.setOnCancelListener(dialog -> cancel(false));
|
|
||||||
materialDialog.setOnDismissListener(dialog -> cancel(false));
|
|
||||||
materialDialog.negativeButton(android.R.string.cancel, "", materialDialog1 -> {
|
|
||||||
cancel(false);
|
|
||||||
return null;
|
|
||||||
});
|
|
||||||
return materialDialog;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import code.name.monkey.retromusic.util.NavigationUtil
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.RetroUtil
|
import code.name.monkey.retromusic.util.RetroUtil
|
||||||
import io.reactivex.disposables.CompositeDisposable
|
import io.reactivex.disposables.CompositeDisposable
|
||||||
import kotlinx.android.synthetic.main.fragment_banner_home.*
|
import kotlinx.android.synthetic.main.fragment_home.*
|
||||||
|
|
||||||
class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallbacks, HomeContract.HomeView {
|
class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallbacks, HomeContract.HomeView {
|
||||||
override fun showEmpty() {
|
override fun showEmpty() {
|
||||||
|
@ -111,9 +111,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
||||||
private fun setupToolbar() {
|
private fun setupToolbar() {
|
||||||
toolbar.apply {
|
toolbar.apply {
|
||||||
setBackgroundColor(if (PreferenceUtil.getInstance().isHomeBanner) Color.TRANSPARENT else ThemeStore.primaryColor(context))
|
setBackgroundColor(if (PreferenceUtil.getInstance().isHomeBanner) Color.TRANSPARENT else ThemeStore.primaryColor(context))
|
||||||
setNavigationOnClickListener {
|
setNavigationIcon(R.drawable.ic_menu_white_24dp)
|
||||||
NavigationUtil.goToSearch(activity)
|
|
||||||
}
|
|
||||||
setOnClickListener { showMainMenu() }
|
setOnClickListener { showMainMenu() }
|
||||||
}
|
}
|
||||||
mainActivity.setSupportActionBar(toolbar)
|
mainActivity.setSupportActionBar(toolbar)
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<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="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:elevation="0dp"
|
|
||||||
app:elevation="0dp">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:contentScrim="@android:color/transparent"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:statusBarScrim="@color/md_black_1000"
|
|
||||||
app:titleEnabled="false">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/imageContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="182dp"
|
|
||||||
app:layout_collapseMode="pin">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/bannerImage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
tools:background="@color/md_red_400"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<include layout="@layout/status_bar" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
style="@style/Toolbar"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
tools:ignore="UnusedAttribute">
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
|
||||||
android:id="@+id/userImage"
|
|
||||||
android:layout_width="32dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="14dp"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:civ_border="false"
|
|
||||||
app:civ_border_width="0dp"
|
|
||||||
app:civ_shadow="false" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/bannerTitle"
|
|
||||||
style="@style/BigTitleTextAppearanceToolbar"
|
|
||||||
android:layout_gravity="start|center_vertical"
|
|
||||||
android:paddingStart="24dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:text="@string/app_name"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
tools:ignore="MissingPrefix" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="64dp"
|
|
||||||
android:layout_marginEnd="64dp"
|
|
||||||
android:elevation="@dimen/card_elevation"
|
|
||||||
app:behavior_overlapTop="72dp"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:cardCornerRadius="12dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/contentContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:descendantFocusability="blocksDescendants"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<include layout="@layout/abs_playlists" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:nestedScrollingEnabled="false" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
||||||
</LinearLayout>
|
|
|
@ -1,128 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<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:id="@+id/main_fragment_content"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
|
||||||
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:elevation="0dp"
|
|
||||||
app:elevation="0dp">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:contentScrim="@android:color/transparent"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:statusBarScrim="@color/md_black_1000"
|
|
||||||
app:titleEnabled="false">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/imageContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="228dp"
|
|
||||||
app:layout_collapseMode="parallax">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/bannerImage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
tools:background="@color/md_red_400"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<include layout="@layout/status_bar" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
style="@style/Toolbar"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
tools:ignore="UnusedAttribute">
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
|
||||||
android:id="@+id/userImage"
|
|
||||||
android:layout_width="32dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="14dp"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:civ_border="false"
|
|
||||||
app:civ_border_width="0dp"
|
|
||||||
app:civ_shadow="false" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/bannerTitle"
|
|
||||||
style="@style/BigTitleTextAppearanceToolbar"
|
|
||||||
android:layout_gravity="start|center_vertical"
|
|
||||||
android:paddingStart="24dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:text="@string/library"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
tools:ignore="MissingPrefix" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:behavior_overlapTop="52dp"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="128dp"
|
|
||||||
android:layout_marginEnd="128dp"
|
|
||||||
app:cardCornerRadius="12dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/contentContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:descendantFocusability="blocksDescendants"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<include layout="@layout/abs_playlists" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:nestedScrollingEnabled="false" />
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
||||||
</LinearLayout>
|
|
|
@ -1,126 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<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:id="@+id/main_fragment_content"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:elevation="0dp"
|
|
||||||
app:elevation="0dp">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:contentScrim="@android:color/transparent"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:statusBarScrim="@color/md_black_1000"
|
|
||||||
app:titleEnabled="false">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/imageContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="196dp"
|
|
||||||
app:layout_collapseMode="parallax">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/bannerImage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
tools:background="@color/md_red_400"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<include layout="@layout/status_bar" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
style="@style/Toolbar"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
tools:ignore="UnusedAttribute">
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
|
||||||
android:id="@+id/userImage"
|
|
||||||
android:layout_width="32dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="14dp"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:civ_border="false"
|
|
||||||
app:civ_border_width="0dp"
|
|
||||||
app:civ_shadow="false" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/bannerTitle"
|
|
||||||
style="@style/BigTitleTextAppearanceToolbar"
|
|
||||||
android:layout_gravity="start|center_vertical"
|
|
||||||
android:paddingStart="24dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:text="@string/library"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
tools:ignore="MissingPrefix" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:behavior_overlapTop="52dp"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="64dp"
|
|
||||||
android:layout_marginEnd="64dp"
|
|
||||||
app:cardCornerRadius="12dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/contentContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:descendantFocusability="blocksDescendants"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<include layout="@layout/abs_playlists" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:nestedScrollingEnabled="false" />
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
||||||
</LinearLayout>
|
|
|
@ -1,120 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:elevation="0dp"
|
|
||||||
app:elevation="0dp">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:contentScrim="@android:color/transparent"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:statusBarScrim="@color/md_black_1000"
|
|
||||||
app:titleEnabled="false">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/imageContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="228dp"
|
|
||||||
app:layout_collapseMode="parallax">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/bannerImage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
tools:background="@color/md_red_400"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<include layout="@layout/status_bar" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
style="@style/Toolbar"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
tools:ignore="UnusedAttribute">
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
|
||||||
android:id="@+id/userImage"
|
|
||||||
android:layout_width="32dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="14dp"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:civ_border="false"
|
|
||||||
app:civ_border_width="0dp"
|
|
||||||
app:civ_shadow="false" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/bannerTitle"
|
|
||||||
style="@style/BigTitleTextAppearanceToolbar"
|
|
||||||
android:layout_gravity="start|center_vertical"
|
|
||||||
android:paddingStart="24dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:text="@string/app_name"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
tools:ignore="MissingPrefix" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:behavior_overlapTop="24dp"
|
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:cardCornerRadius="12dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/contentContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:descendantFocusability="blocksDescendants"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<include layout="@layout/abs_playlists" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:nestedScrollingEnabled="false" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
|
@ -30,6 +30,13 @@
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
app:elevation="0dp">
|
app:elevation="0dp">
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="6dp"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -40,6 +47,7 @@
|
||||||
style="@style/Toolbar"
|
style="@style/Toolbar"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
|
app:titleMarginStart="0dp"
|
||||||
app:title="@string/folders"
|
app:title="@string/folders"
|
||||||
tools:ignore="UnusedAttribute" />
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
|
@ -48,6 +56,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|
|
@ -24,13 +24,21 @@
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
app:elevation="0dp">
|
app:elevation="0dp">
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="6dp"
|
||||||
|
app:cardUseCompatPadding="true"
|
||||||
|
app:layout_scrollFlags="scroll|enterAlways">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar"
|
style="@style/Toolbar"
|
||||||
app:title="@string/app_name"
|
app:title="@string/app_name"
|
||||||
app:layout_collapseMode="pin"
|
app:titleMarginStart="0dp"
|
||||||
tools:ignore="UnusedAttribute" />
|
tools:ignore="UnusedAttribute" />
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
|
|
|
@ -29,15 +29,22 @@
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
app:elevation="0dp">
|
app:elevation="0dp">
|
||||||
|
|
||||||
<FrameLayout
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="6dp"
|
||||||
|
app:cardUseCompatPadding="true"
|
||||||
app:layout_scrollFlags="scroll|enterAlways">
|
app:layout_scrollFlags="scroll|enterAlways">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar"
|
style="@style/Toolbar"
|
||||||
app:layout_collapseMode="pin"
|
app:titleMarginStart="0dp"
|
||||||
tools:ignore="UnusedAttribute" />
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
|
@ -45,6 +52,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_scan"
|
||||||
|
android:icon="@drawable/ic_scanner_white_24dp"
|
||||||
|
android:title="@string/scan_media"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_go_to_start_directory"
|
android:id="@+id/action_go_to_start_directory"
|
||||||
android:icon="@drawable/ic_bookmark_music_white_24dp"
|
android:icon="@drawable/ic_bookmark_music_white_24dp"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
<style name="Toolbar">
|
<style name="Toolbar">
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
<item name="android:layout_height">?actionBarSize</item>
|
<item name="android:layout_height">50dp</item>
|
||||||
<item name="popupTheme">?toolbarPopupTheme</item>
|
<item name="popupTheme">?toolbarPopupTheme</item>
|
||||||
<item name="android:transitionName" tools:ignore="NewApi">toolbar</item>
|
<item name="android:transitionName" tools:ignore="NewApi">toolbar</item>
|
||||||
<item name="android:titleTextAppearance">@style/ToolbarTextAppearance</item>
|
<item name="android:titleTextAppearance">@style/ToolbarTextAppearance</item>
|
||||||
|
@ -41,6 +41,9 @@
|
||||||
|
|
||||||
|
|
||||||
<style name="ToolbarTextAppearance">
|
<style name="ToolbarTextAppearance">
|
||||||
|
<item name="android:textSize">16sp</item>
|
||||||
|
<item name="android:textStyle">normal</item>
|
||||||
|
<item name="android:fontFamily">@font/circular</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="ToolbarSubTitleTextAppearance">
|
<style name="ToolbarSubTitleTextAppearance">
|
||||||
|
|
|
@ -17,9 +17,7 @@ import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.TextView;
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import androidx.annotation.CheckResult;
|
import androidx.annotation.CheckResult;
|
||||||
import androidx.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
|
@ -39,6 +37,10 @@ import androidx.appcompat.widget.AppCompatImageView;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import androidx.appcompat.widget.ToolbarWidgetWrapper;
|
import androidx.appcompat.widget.ToolbarWidgetWrapper;
|
||||||
import androidx.core.graphics.drawable.DrawableCompat;
|
import androidx.core.graphics.drawable.DrawableCompat;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import code.name.monkey.appthemehelper.R;
|
import code.name.monkey.appthemehelper.R;
|
||||||
import code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
|
||||||
|
@ -82,12 +84,14 @@ public final class ToolbarContentTintHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void colorBackButton(Toolbar toolbar, @ColorInt int color) {
|
public static void colorBackButton(@NonNull Toolbar toolbar, @ColorInt int color) {
|
||||||
final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||||
for (int i = 0; i < toolbar.getChildCount(); i++) {
|
for (int i = 0; i < toolbar.getChildCount(); i++) {
|
||||||
final View backButton = toolbar.getChildAt(i);
|
final View backButton = toolbar.getChildAt(i);
|
||||||
if (backButton instanceof ImageView) {
|
if (backButton instanceof ImageView) {
|
||||||
((ImageView) backButton).getDrawable().setColorFilter(colorFilter);
|
((ImageView) backButton).getDrawable().setColorFilter(colorFilter);
|
||||||
|
} else if (backButton instanceof TextView) {
|
||||||
|
// ((TextView) backButton).setTextColor(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue