From 6001b21c42be6555ebc6ceca783a021f7daca927 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Wed, 28 Nov 2018 11:07:10 +0530 Subject: [PATCH] v2.2.100 --- app/build.gradle | 2 +- app/src/main/assets/retro-changelog.html | 2 +- .../ui/activities/LyricsActivity.java | 2 +- .../ui/activities/MainActivity.java | 1 - .../ui/activities/NowPayingActivity.java | 26 ++- .../ui/activities/PlayingQueueActivity.java | 134 ++++++++++++- .../SupportDevelopmentActivity.java | 43 +++- .../base/AbsSlidingMusicPanelActivity.java | 80 ++------ .../ui/adapter/CollageSongAdapter.java | 4 + .../ui/fragments/PlayingQueueFragment.java | 5 + .../ui/fragments/base/AbsPlayerFragment.java | 9 + .../mainactivity/folders/FoldersFragment.java | 4 +- .../mainactivity/home/BannerHomeFragment.java | 26 ++- .../player/blur/BlurPlayerFragment.java | 5 +- .../player/normal/PlayerFragment.java | 9 +- .../retromusic/util/NavigationUtil.java | 5 + .../retromusic/util/PreferenceUtil.java | 6 +- .../retromusic/views/CollapsingFAB.java | 12 +- .../res/drawable/bg_circular_top_corners.xml | 5 +- app/src/main/res/drawable/bottom_corners.xml | 7 + .../res/drawable/ic_clear_all_black_24dp.xml | 9 + .../main/res/layout-land/activity_album.xml | 2 + .../layout-land/activity_artist_details.xml | 2 + .../res/layout-land/fragment_banner_home.xml | 168 ++++++++-------- .../main/res/layout-land/fragment_blur.xml | 82 ++++---- .../layout-land/fragment_card_blur_player.xml | 104 +++++----- .../res/layout-land/fragment_card_player.xml | 92 +++++---- .../res/layout-land/fragment_color_player.xml | 174 ++++++++-------- .../res/layout-land/fragment_flat_player.xml | 80 ++++---- .../main/res/layout-land/fragment_home.xml | 55 ++---- .../res/layout-land/fragment_material.xml | 84 ++++---- .../res/layout-land/fragment_plain_player.xml | 158 ++++++++------- .../main/res/layout-land/fragment_player.xml | 81 ++++---- .../layout-land/fragment_simple_player.xml | 83 ++++---- .../res/layout-xlarge-land/activity_album.xml | 2 + .../activity_artist_details.xml | 2 + .../res/layout-xlarge-land/fragment_blur.xml | 4 +- .../layout-xlarge-land/fragment_player.xml | 89 +++++---- .../main/res/layout-xlarge/activity_album.xml | 2 + .../layout-xlarge/activity_artist_details.xml | 2 + .../main/res/layout-xlarge/fragment_blur.xml | 90 ++++----- .../res/layout-xlarge/fragment_player.xml | 89 +++++---- app/src/main/res/layout/abs_playlists.xml | 5 +- app/src/main/res/layout/activity_album.xml | 2 + .../res/layout/activity_artist_details.xml | 2 + app/src/main/res/layout/activity_donation.xml | 8 + .../res/layout/activity_playing_queue.xml | 31 ++- .../res/layout/activity_playlist_detail.xml | 3 +- .../res/layout/fragment_adaptive_player.xml | 104 +++++----- .../main/res/layout/fragment_banner_home.xml | 175 ++++++++-------- app/src/main/res/layout/fragment_blur.xml | 93 +++++---- .../res/layout/fragment_card_blur_player.xml | 110 ++++++----- .../main/res/layout/fragment_card_player.xml | 91 +++++---- .../main/res/layout/fragment_color_player.xml | 186 +++++++++--------- .../main/res/layout/fragment_flat_player.xml | 82 ++++---- app/src/main/res/layout/fragment_folder.xml | 21 +- app/src/main/res/layout/fragment_full.xml | 7 +- app/src/main/res/layout/fragment_home.xml | 52 ++--- app/src/main/res/layout/fragment_library.xml | 8 +- .../fragment_main_activity_recycler_view.xml | 2 + .../main/res/layout/fragment_main_options.xml | 11 +- app/src/main/res/layout/fragment_material.xml | 87 ++++---- .../main/res/layout/fragment_plain_player.xml | 155 ++++++++------- app/src/main/res/layout/fragment_player.xml | 89 +++++---- .../res/layout/fragment_simple_player.xml | 15 +- .../main/res/layout/home_section_content.xml | 18 +- app/src/main/res/layout/item_collage.xml | 3 +- app/src/main/res/values/attrs.xml | 2 + app/src/main/res/values/strings.xml | 3 + app/src/main/res/values/styles.xml | 10 +- app/src/main/res/xml/pref_advanced.xml | 9 +- appthemehelper/appthemehelper.iml | 4 + 72 files changed, 1809 insertions(+), 1420 deletions(-) create mode 100644 app/src/main/res/drawable/bottom_corners.xml create mode 100644 app/src/main/res/drawable/ic_clear_all_black_24dp.xml diff --git a/app/build.gradle b/app/build.gradle index 53af907e..c65db325 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,7 +11,7 @@ android { vectorDrawables.useSupportLibrary = true applicationId "code.name.monkey.retromusic" - versionCode 253 + versionCode 255 versionName '2.2.100' multiDexEnabled true diff --git a/app/src/main/assets/retro-changelog.html b/app/src/main/assets/retro-changelog.html index f5d4c381..5bae13be 100644 --- a/app/src/main/assets/retro-changelog.html +++ b/app/src/main/assets/retro-changelog.html @@ -1 +1 @@ -

Are you subscribed to PewDiePie

You can view the changelog dialog again at any time from the about section.

Version 2.2.100

FAQ's

*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.

\ No newline at end of file +

Are you subscribed to PewDiePie

You can view the changelog dialog again at any time from the about section.

Version 2.2.100

FAQ's

*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.

\ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/LyricsActivity.java b/app/src/main/java/code/name/monkey/retromusic/ui/activities/LyricsActivity.java index 17590e82..f4be3c82 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/LyricsActivity.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/LyricsActivity.java @@ -93,7 +93,7 @@ public class LyricsActivity extends AbsMusicServiceActivity implements setTaskDescriptionColorAuto(); setNavigationbarColorAuto(); - fitSystemWindowsLayout.setFit(true); + fitSystemWindowsLayout.setFit(!PreferenceUtil.getInstance().getFullScreenMode()); setSupportActionBar(bottomAppBar); Objects.requireNonNull(bottomAppBar.getNavigationIcon()) diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/MainActivity.java b/app/src/main/java/code/name/monkey/retromusic/ui/activities/MainActivity.java index 7c49781c..cc80ea55 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/MainActivity.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/MainActivity.java @@ -99,7 +99,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity implements Shared if (savedInstanceState == null) { selectedFragment(PreferenceUtil.getInstance().getLastPage()); - //setCurrentFragment(new LibraryFragment(), false, LibraryFragment.TAG); } else { restoreCurrentFragment(); } diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/NowPayingActivity.java b/app/src/main/java/code/name/monkey/retromusic/ui/activities/NowPayingActivity.java index 06a05ce1..5a56b8f6 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/NowPayingActivity.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/NowPayingActivity.java @@ -46,6 +46,7 @@ public class NowPayingActivity extends AbsMusicServiceActivity implements AbsPla @Override protected void onCreate(Bundle savedInstanceState) { setLightNavigationBar(true); + setDrawUnderNavigationBar(); setupWindowTransition(); super.onCreate(savedInstanceState); setContentView(R.layout.activity_now_playng); @@ -65,19 +66,30 @@ public class NowPayingActivity extends AbsMusicServiceActivity implements AbsPla @Override public void onPaletteColorChanged() { int paletteColor = playerFragment.getPaletteColor(); + boolean isColorLight = ColorUtil.isColorLight(paletteColor); + super.setTaskDescriptionColor(paletteColor); if ((currentNowPlayingScreen == NowPlayingScreen.FLAT || currentNowPlayingScreen == NowPlayingScreen.NORMAL) && PreferenceUtil.getInstance().getAdaptiveColor()) { - setLightNavigationBar(true); - setLightStatusbar(ColorUtil.isColorLight(paletteColor)); + setLightNavigationBar(ColorUtil.isColorLight(ThemeStore.primaryColor(this))); + setLightStatusbar(isColorLight); } else if (currentNowPlayingScreen == NowPlayingScreen.COLOR) { - setLightStatusbar(ColorUtil.isColorLight(paletteColor)); + setLightStatusbar(isColorLight); + setLightNavigationBar(isColorLight); + setNavigationbarColor(paletteColor); } else if (currentNowPlayingScreen == NowPlayingScreen.BLUR || currentNowPlayingScreen == NowPlayingScreen.BLUR_CARD) { setLightStatusbar(false); + setLightNavigationBar(false); } else if (currentNowPlayingScreen == NowPlayingScreen.CARD || currentNowPlayingScreen == NowPlayingScreen.FULL) { - setNavigationbarColor(Color.TRANSPARENT); + setLightStatusbar(false); + setLightNavigationBar(false); + } else if (currentNowPlayingScreen == NowPlayingScreen.FIT) { + setNavigationbarColor(ThemeStore.primaryColor(this)); + setLightNavigationBar(ColorUtil.isColorLight(ThemeStore.primaryColor(this))); + setLightStatusbar(false); } else { + boolean isTheme = isOneOfTheseThemes() && ColorUtil.isColorLight(ThemeStore.primaryColor(this)); setStatusbarColor(Color.TRANSPARENT); - setLightStatusbar(isOneOfTheseThemes() && ColorUtil.isColorLight(ThemeStore.primaryColor(this))); - setNavigationbarColorAuto(); + setLightStatusbar(isTheme); + setLightNavigationBar(isTheme); } } @@ -155,6 +167,8 @@ public class NowPayingActivity extends AbsMusicServiceActivity implements AbsPla playerFragment = (AbsPlayerFragment) getSupportFragmentManager() .findFragmentById(R.id.player_fragment_container); + + } @Override diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/PlayingQueueActivity.java b/app/src/main/java/code/name/monkey/retromusic/ui/activities/PlayingQueueActivity.java index da40ad7c..643e7887 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/PlayingQueueActivity.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/PlayingQueueActivity.java @@ -5,19 +5,28 @@ import android.os.Bundle; import android.widget.TextView; import com.google.android.material.appbar.AppBarLayout; +import com.h6ah4i.android.widget.advrecyclerview.animator.GeneralItemAnimator; +import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator; +import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager; +import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils; +import androidx.annotation.NonNull; import androidx.appcompat.widget.Toolbar; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import butterknife.BindDrawable; import butterknife.BindString; import butterknife.BindView; import butterknife.ButterKnife; +import butterknife.OnClick; import code.name.monkey.appthemehelper.ThemeStore; import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper; import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.helper.MusicPlayerRemote; import code.name.monkey.retromusic.ui.activities.base.AbsMusicServiceActivity; -import code.name.monkey.retromusic.ui.fragments.PlayingQueueFragment; +import code.name.monkey.retromusic.ui.adapter.song.PlayingQueueAdapter; import code.name.monkey.retromusic.util.MusicUtil; +import code.name.monkey.retromusic.views.CollapsingFAB; public class PlayingQueueActivity extends AbsMusicServiceActivity { @@ -40,6 +49,17 @@ public class PlayingQueueActivity extends AbsMusicServiceActivity { @BindView(R.id.title) TextView title; + @BindView(R.id.recycler_view) + RecyclerView mRecyclerView; + + @BindView(R.id.clear_queue) + CollapsingFAB clearQueue; + + private RecyclerView.Adapter mWrappedAdapter; + private RecyclerViewDragDropManager mRecyclerViewDragDropManager; + private PlayingQueueAdapter mPlayingQueueAdapter; + private LinearLayoutManager mLayoutManager; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -52,11 +72,109 @@ public class PlayingQueueActivity extends AbsMusicServiceActivity { setLightNavigationBar(true); setupToolbar(); - if (savedInstanceState == null) { - getSupportFragmentManager().beginTransaction() - .replace(R.id.fragment_container, new PlayingQueueFragment()) - .commit(); + setUpRecyclerView(); + } + + private void setUpRecyclerView() { + mRecyclerViewDragDropManager = new RecyclerViewDragDropManager(); + final GeneralItemAnimator animator = new RefactoredDefaultItemAnimator(); + + mPlayingQueueAdapter = new PlayingQueueAdapter( + this, + MusicPlayerRemote.getPlayingQueue(), + MusicPlayerRemote.getPosition(), + R.layout.item_queue); + mWrappedAdapter = mRecyclerViewDragDropManager.createWrappedAdapter(mPlayingQueueAdapter); + + mLayoutManager = new LinearLayoutManager(this); + + mRecyclerView.setLayoutManager(mLayoutManager); + mRecyclerView.setAdapter(mWrappedAdapter); + mRecyclerView.setItemAnimator(animator); + mRecyclerViewDragDropManager.attachRecyclerView(mRecyclerView); + mLayoutManager.scrollToPositionWithOffset(MusicPlayerRemote.getPosition() + 1, 0); + + mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { + @Override + public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { + super.onScrolled(recyclerView, dx, dy); + if (dy > 0) { + clearQueue.setShowTitle(false); + } else if (dy < 0) { + clearQueue.setShowTitle(true); + } + } + }); + } + + @Override + public void onQueueChanged() { + if (MusicPlayerRemote.getPlayingQueue().isEmpty()) { + finish(); + return; } + updateQueue(); + updateCurrentSong(); + } + + @Override + public void onMediaStoreChanged() { + updateQueue(); + updateCurrentSong(); + } + + @SuppressWarnings("ConstantConditions") + private void updateCurrentSong() { + } + + @Override + public void onPlayingMetaChanged() { + updateQueuePosition(); + } + + private void updateQueuePosition() { + mPlayingQueueAdapter.setCurrent(MusicPlayerRemote.getPosition()); + resetToCurrentPosition(); + } + + private void updateQueue() { + mPlayingQueueAdapter.swapDataSet(MusicPlayerRemote.getPlayingQueue(), MusicPlayerRemote.getPosition()); + resetToCurrentPosition(); + } + + private void resetToCurrentPosition() { + mRecyclerView.stopScroll(); + mLayoutManager.scrollToPositionWithOffset(MusicPlayerRemote.getPosition() + 1, 0); + } + + @Override + protected void onPause() { + if (mRecyclerViewDragDropManager != null) { + mRecyclerViewDragDropManager.cancelDrag(); + } + super.onPause(); + } + + @Override + public void onDestroy() { + if (mRecyclerViewDragDropManager != null) { + mRecyclerViewDragDropManager.release(); + mRecyclerViewDragDropManager = null; + } + + if (mRecyclerView != null) { + mRecyclerView.setItemAnimator(null); + mRecyclerView.setAdapter(null); + mRecyclerView = null; + } + + if (mWrappedAdapter != null) { + WrapperAdapterUtils.releaseAll(mWrappedAdapter); + mWrappedAdapter = null; + } + mPlayingQueueAdapter = null; + mLayoutManager = null; + super.onDestroy(); } protected String getUpNextAndQueueTime() { @@ -75,5 +193,11 @@ public class PlayingQueueActivity extends AbsMusicServiceActivity { setTitle(null); toolbar.setNavigationOnClickListener(v -> onBackPressed()); ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.accentColor(this)); + clearQueue.setColor(ThemeStore.accentColor(this)); + } + + @OnClick(R.id.clear_queue) + void clearQueue() { + MusicPlayerRemote.clearQueue(); } } diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/SupportDevelopmentActivity.java b/app/src/main/java/code/name/monkey/retromusic/ui/activities/SupportDevelopmentActivity.java index ce75e28b..51c24f8d 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/SupportDevelopmentActivity.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/SupportDevelopmentActivity.java @@ -3,6 +3,7 @@ package code.name.monkey.retromusic.ui.activities; import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.Paint; +import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; @@ -14,6 +15,7 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import com.afollestad.materialdialogs.MaterialDialog; import com.afollestad.materialdialogs.internal.MDTintHelper; import com.anjlab.android.iab.v3.BillingProcessor; import com.anjlab.android.iab.v3.SkuDetails; @@ -57,31 +59,25 @@ import static code.name.monkey.retromusic.Constants.PAYPAL_ME_URL; public class SupportDevelopmentActivity extends AbsBaseActivity implements BillingProcessor.IBillingHandler { public static final String TAG = SupportDevelopmentActivity.class.getSimpleName(); private static final int DONATION_PRODUCT_IDS = R.array.donation_ids; + private static final int TEZ_REQUEST_CODE = 123; + private static final String GOOGLE_TEZ_PACKAGE_NAME = "com.google.android.apps.nbu.paisa.user"; @BindView(R.id.progress) ProgressBar progressBar; - @BindView(R.id.progress_container) View progressContainer; - @BindView(R.id.list) RecyclerView recyclerView; - @BindView(R.id.toolbar) Toolbar toolbar; - @BindView(R.id.app_bar) AppBarLayout appBarLayout; - @BindView(R.id.root) ViewGroup viewGroup; - @BindView(R.id.title) TextView title; - @BindView(R.id.donate) MaterialButton materialButton; - private BillingProcessor billingProcessor; private AsyncTask skuDetailsLoadAsyncTask; @@ -192,6 +188,10 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi if (!billingProcessor.handleActivityResult(requestCode, resultCode, data)) { super.onActivityResult(requestCode, resultCode, data); } + if (requestCode == TEZ_REQUEST_CODE) { + // Process based on the data in response. + Log.d("result", data.getStringExtra("Status")); + } } @Override @@ -205,6 +205,33 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi super.onDestroy(); } + @OnClick(R.id.google_pay) + void googlePay() { + + new MaterialDialog.Builder(this) + .title(R.string.support_development) + .input("Enter amount", null, false, (dialog, input) -> { + Uri uri = new Uri.Builder() + .scheme("upi") + .authority("pay") + .appendQueryParameter("pa", "hemanth.vaniraviram@okaxis") + .appendQueryParameter("pn", "Retro Music") + .appendQueryParameter("mc", "1234") + .appendQueryParameter("tr", "7406201323") + .appendQueryParameter("tn", "Retro Music Player Donation") + .appendQueryParameter("am", "10.01") + .appendQueryParameter("cu", "INR") + .build(); + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(uri); + intent.setPackage(GOOGLE_TEZ_PACKAGE_NAME); + startActivityForResult(intent, TEZ_REQUEST_CODE); + }).positiveText("Donate") + .onPositive((dialog, which) -> { + + }).show(); + } + private static class SkuDetailsLoadAsyncTask extends AsyncTask> { private final WeakReference donationDialogWeakReference; diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/base/AbsSlidingMusicPanelActivity.java b/app/src/main/java/code/name/monkey/retromusic/ui/activities/base/AbsSlidingMusicPanelActivity.java index 3a3fbf0b..6dc4c5b2 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/base/AbsSlidingMusicPanelActivity.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/base/AbsSlidingMusicPanelActivity.java @@ -11,7 +11,6 @@ import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.WindowManager; import android.view.animation.PathInterpolator; -import android.widget.FrameLayout; import com.google.android.gms.cast.framework.CastSession; import com.google.android.material.bottomnavigation.BottomNavigationView; @@ -21,7 +20,6 @@ import com.sothree.slidinguppanel.SlidingUpPanelLayout.PanelState; import androidx.annotation.FloatRange; import androidx.annotation.LayoutRes; import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.core.view.ViewCompat; import androidx.fragment.app.Fragment; import butterknife.BindView; import butterknife.ButterKnife; @@ -45,10 +43,10 @@ import code.name.monkey.retromusic.ui.fragments.player.material.MaterialFragment import code.name.monkey.retromusic.ui.fragments.player.normal.PlayerFragment; import code.name.monkey.retromusic.ui.fragments.player.plain.PlainPlayerFragment; import code.name.monkey.retromusic.ui.fragments.player.simple.SimplePlayerFragment; +import code.name.monkey.retromusic.util.NavigationUtil; import code.name.monkey.retromusic.util.PreferenceUtil; import code.name.monkey.retromusic.util.ViewUtil; import code.name.monkey.retromusic.views.BottomNavigationBarTinted; -import code.name.monkey.retromusic.views.FitSystemWindowsLayout; public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivity implements SlidingUpPanelLayout.PanelSlideListener, PlayerFragment.Callbacks { @@ -227,61 +225,6 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi } - protected void applyInsets() { - ViewCompat.setOnApplyWindowInsetsListener(coordinatorLayout, (v, insets) -> { - //Bottom navigation view - ViewGroup.MarginLayoutParams bParams = (ViewGroup.MarginLayoutParams) bottomNavigationView.getLayoutParams(); - if (!PreferenceUtil.getInstance().getFullScreenMode()) - bParams.bottomMargin = insets.getSystemWindowInsetBottom(); - bParams.rightMargin = insets.getSystemWindowInsetRight(); - bParams.leftMargin = insets.getSystemWindowInsetLeft(); - - - //For now playing screen - FrameLayout layout = findViewById(R.id.safeArea); - if (layout != null) { - ViewGroup.MarginLayoutParams fParams = (ViewGroup.MarginLayoutParams) layout.getLayoutParams(); - if (!PreferenceUtil.getInstance().getFullScreenMode()) { - fParams.topMargin = insets.getSystemWindowInsetTop(); - fParams.bottomMargin = insets.getSystemWindowInsetBottom(); - } - fParams.leftMargin = insets.getSystemWindowInsetLeft(); - fParams.rightMargin = insets.getSystemWindowInsetRight(); - } - - //Mini player - FitSystemWindowsLayout miniPlayer = (FitSystemWindowsLayout) miniPlayerFragment.getView(); - if (miniPlayer != null) { - ViewGroup.MarginLayoutParams mParams = (ViewGroup.MarginLayoutParams) miniPlayer.getLayoutParams(); - mParams.bottomMargin = insets.getSystemWindowInsetBottom();//RetroUtil.checkNavigationBarHeight() ? 0 : getResources().getDimensionPixelSize(R.dimen.mini_player_height); - mParams.leftMargin = insets.getSystemWindowInsetLeft(); - mParams.rightMargin = insets.getSystemWindowInsetRight(); - } - - //For Library, Folder, Home etc - ViewGroup viewGroup = findViewById(R.id.content_container); - if (viewGroup != null) { - ViewGroup.MarginLayoutParams mParams = (ViewGroup.MarginLayoutParams) viewGroup.getLayoutParams(); - mParams.leftMargin = insets.getSystemWindowInsetLeft(); - mParams.rightMargin = insets.getSystemWindowInsetRight(); - mParams.bottomMargin = insets.getSystemWindowInsetBottom(); - } - - FrameLayout frameLayout = findViewById(R.id.sliding_panel); - if (frameLayout != null) { - ViewGroup.MarginLayoutParams mParams = (ViewGroup.MarginLayoutParams) frameLayout.getLayoutParams(); - mParams.leftMargin = insets.getSystemWindowInsetLeft(); - mParams.rightMargin = insets.getSystemWindowInsetRight(); - if (!PreferenceUtil.getInstance().getFullScreenMode()) { - mParams.bottomMargin = insets.getSystemWindowInsetBottom(); - } - } - - coordinatorLayout.setOnApplyWindowInsetsListener(null); - return insets.consumeSystemWindowInsets(); - }); - } - public SlidingUpPanelLayout.PanelState getPanelState() { return slidingUpPanelLayout == null ? null : slidingUpPanelLayout.getPanelState(); } @@ -313,7 +256,7 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi // restore values super.setLightStatusbar(lightStatusbar); super.setTaskDescriptionColor(taskColor); - super.setNavigationbarColor(ThemeStore.primaryColor(this)); + super.setNavigationbarColor(navigationbarColor); super.setLightNavigationBar(lightNavigationBar); @@ -325,12 +268,11 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi public void onPanelExpanded(View panel) { int playerFragmentColor = playerFragment.getPaletteColor(); super.setTaskDescriptionColor(playerFragmentColor); - super.setLightStatusbar(lightStatusbar); playerFragment.setMenuVisibility(true); playerFragment.setUserVisibleHint(true); playerFragment.onShow(); - + onPaletteColorChanged(); } private void setMiniPlayerAlphaProgress(@FloatRange(from = 0, to = 1) float progress) { @@ -395,6 +337,7 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi //noinspection ConstantConditions miniPlayerFragment.getView().setOnClickListener(v -> expandPanel()); + } @Override @@ -437,7 +380,8 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi super.setLightStatusbar(false); super.setLightNavigationBar(ColorUtil.isColorLight(ThemeStore.primaryColor(this))); } else if (currentNowPlayingScreen == NowPlayingScreen.FIT) { - super.setNavigationbarColor(Color.TRANSPARENT); + super.setNavigationbarColor(ThemeStore.primaryColor(this)); + super.setLightNavigationBar(ColorUtil.isColorLight(ThemeStore.primaryColor(this))); super.setLightStatusbar(false); } else { boolean isTheme = isOneOfTheseThemes() && ColorUtil.isColorLight(ThemeStore.primaryColor(this)); @@ -476,13 +420,21 @@ public abstract class AbsSlidingMusicPanelActivity extends AbsMusicServiceActivi @Override public void setNavigationbarColor(int color) { - this.navigationbarColor = color; - if (getPanelState() == SlidingUpPanelLayout.PanelState.COLLAPSED) { + navigationbarColor = color; + if (getPanelState() == PanelState.COLLAPSED) { if (navigationBarColorAnimator != null) navigationBarColorAnimator.cancel(); super.setNavigationbarColor(color); } } + @Override + public void setTaskDescriptionColor(int color) { + taskColor = color; + if (getPanelState() == PanelState.COLLAPSED) { + super.setTaskDescriptionColor(color); + } + } + private void animateNavigationBarColor(int color) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (navigationBarColorAnimator != null) navigationBarColorAnimator.cancel(); diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/adapter/CollageSongAdapter.java b/app/src/main/java/code/name/monkey/retromusic/ui/adapter/CollageSongAdapter.java index 64196be2..2c1f2144 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/adapter/CollageSongAdapter.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/adapter/CollageSongAdapter.java @@ -74,6 +74,7 @@ public class CollageSongAdapter extends RecyclerView.Adapter imageViews; + @BindView(R.id.image_1) TextView view; @@ -82,6 +83,9 @@ public class CollageSongAdapter extends RecyclerView.Adapter { + MusicPlayerRemote.openQueue(dataSet, 0, true); + }); view.setBackgroundColor(color); view.setTextColor(MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(color))); } diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/PlayingQueueFragment.java b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/PlayingQueueFragment.java index d3cc29b9..ab68d10e 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/PlayingQueueFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/PlayingQueueFragment.java @@ -22,12 +22,16 @@ import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.helper.MusicPlayerRemote; import code.name.monkey.retromusic.ui.adapter.song.PlayingQueueAdapter; import code.name.monkey.retromusic.ui.fragments.base.AbsMusicServiceFragment; +import code.name.monkey.retromusic.views.CollapsingFAB; public class PlayingQueueFragment extends AbsMusicServiceFragment { @BindView(R.id.recycler_view) RecyclerView mRecyclerView; + + Unbinder unbinder; + private RecyclerView.Adapter mWrappedAdapter; private RecyclerViewDragDropManager mRecyclerViewDragDropManager; private PlayingQueueAdapter mPlayingQueueAdapter; @@ -66,6 +70,7 @@ public class PlayingQueueFragment extends AbsMusicServiceFragment { mRecyclerView.setItemAnimator(animator); mRecyclerViewDragDropManager.attachRecyclerView(mRecyclerView); mLayoutManager.scrollToPositionWithOffset(MusicPlayerRemote.getPosition() + 1, 0); + } @Override diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/base/AbsPlayerFragment.java b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/base/AbsPlayerFragment.java index 5d6d9bdc..6ffd741a 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/base/AbsPlayerFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/base/AbsPlayerFragment.java @@ -34,6 +34,7 @@ import code.name.monkey.retromusic.util.MusicUtil; import code.name.monkey.retromusic.util.NavigationUtil; import code.name.monkey.retromusic.util.PreferenceUtil; import code.name.monkey.retromusic.util.RetroUtil; +import code.name.monkey.retromusic.views.FitSystemWindowsLayout; public abstract class AbsPlayerFragment extends AbsMusicServiceFragment implements Toolbar.OnMenuItemClickListener, PaletteColorHolder { public static final String TAG = AbsPlayerFragment.class.getSimpleName(); @@ -208,12 +209,20 @@ public abstract class AbsPlayerFragment extends AbsMusicServiceFragment implemen public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); view.setBackgroundColor(ThemeStore.primaryColor(getActivity())); + if (PreferenceUtil.getInstance().getFullScreenMode()) { if (view.findViewById(R.id.status_bar) != null) view.findViewById(R.id.status_bar).setVisibility(View.GONE); } } + public void setSafeArea(View safeArea) { + FitSystemWindowsLayout layout = safeArea.findViewById(R.id.safeArea); + if (layout != null) { + layout.setFit(!PreferenceUtil.getInstance().getFullScreenMode()); + } + } + public interface Callbacks { void onPaletteColorChanged(); diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/mainactivity/folders/FoldersFragment.java b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/mainactivity/folders/FoldersFragment.java index 7f512590..a9e57f44 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/mainactivity/folders/FoldersFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/mainactivity/folders/FoldersFragment.java @@ -238,11 +238,11 @@ public class FoldersFragment extends AbsMainActivityFragment implements int primaryColor = ThemeStore.primaryColor(getContext()); - toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp); + toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp); //noinspection ConstantConditions getActivity().setTitle(null); getMainActivity().setSupportActionBar(toolbar); - toolbar.setNavigationOnClickListener(v -> showMainMenu()); + toolbar.setNavigationOnClickListener(v -> getActivity().onBackPressed()); TintHelper.setTintAuto(container, primaryColor, true); appbar.setBackgroundColor(primaryColor); toolbar.setBackgroundColor(primaryColor); diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/mainactivity/home/BannerHomeFragment.java b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/mainactivity/home/BannerHomeFragment.java index aa7d6859..128866e5 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/mainactivity/home/BannerHomeFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/mainactivity/home/BannerHomeFragment.java @@ -21,7 +21,6 @@ import java.util.Random; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.widget.Toolbar; import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; @@ -31,7 +30,6 @@ import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.Unbinder; import code.name.monkey.appthemehelper.ThemeStore; -import code.name.monkey.appthemehelper.util.TintHelper; import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.helper.MusicPlayerRemote; import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks; @@ -67,8 +65,6 @@ import static code.name.monkey.retromusic.Constants.USER_PROFILE; public class BannerHomeFragment extends AbsMainActivityFragment implements MainActivityFragmentCallbacks, HomeContract.HomeView { public static final String TAG = "BannerHomeFragment"; - @BindView(R.id.toolbar) - Toolbar toolbar; @BindView(R.id.image) @Nullable @@ -110,6 +106,9 @@ public class BannerHomeFragment extends AbsMainActivityFragment implements MainA @BindView(R.id.container) View container; + @BindView(R.id.content_container) + View contentContainer; + @BindView(R.id.suggestion_songs) RecyclerView suggestionsSongs; @@ -204,10 +203,11 @@ public class BannerHomeFragment extends AbsMainActivityFragment implements MainA @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - View view = inflater.inflate(PreferenceUtil.getInstance().toggleHomeBanner() ? R.layout.fragment_banner_home : R.layout.fragment_home, + View view = inflater.inflate(PreferenceUtil.getInstance().isHomeBanner() ? R.layout.fragment_banner_home : R.layout.fragment_home, container, false); unbinder = ButterKnife.bind(this, view); - setStatusbarColorAuto(view); + if (!PreferenceUtil.getInstance().isHomeBanner()) + setStatusbarColorAuto(view); return view; } @@ -217,20 +217,18 @@ public class BannerHomeFragment extends AbsMainActivityFragment implements MainA setupToolbar(); loadImageFromStorage(userImage); homePresenter.subscribe(); - getTimeOfTheDay(PreferenceUtil.getInstance().toggleHomeBanner()); + getTimeOfTheDay(PreferenceUtil.getInstance().isHomeBanner()); } @SuppressWarnings("ConstantConditions") private void setupToolbar() { - int primaryColor = ThemeStore.primaryColor(getContext()); - TintHelper.setTintAuto(container, primaryColor, true); userImage.setOnClickListener(v -> showMainMenu()); + contentContainer.setBackgroundColor(ThemeStore.primaryColor(getMainActivity())); + } - getActivity().setTitle(null); - getMainActivity().setSupportActionBar(toolbar); - toolbar.setNavigationIcon(RetroUtil.getTintedDrawable(getMainActivity(), R.drawable.ic_menu_white_24dp, ThemeStore.textColorPrimary(getMainActivity()))); - toolbar.setOnClickListener(v -> NavigationUtil.goToSearch(getMainActivity())); - toolbar.setNavigationOnClickListener(v -> showMainMenu()); + @OnClick(R.id.searchIcon) + void search() { + NavigationUtil.goToSearch(getMainActivity()); } @Override diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/player/blur/BlurPlayerFragment.java b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/player/blur/BlurPlayerFragment.java index 561030eb..01f6f108 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/player/blur/BlurPlayerFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/player/blur/BlurPlayerFragment.java @@ -146,14 +146,12 @@ public class BlurPlayerFragment extends AbsPlayerFragment implements PlayerAlbum @Override public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - setUpSubFragments(); setUpPlayerToolbar(); } private void setUpSubFragments() { - playbackControlsFragment = (BlurPlaybackControlsFragment) getChildFragmentManager() - .findFragmentById(R.id.playback_controls_fragment); + playbackControlsFragment = (BlurPlaybackControlsFragment) getChildFragmentManager().findFragmentById(R.id.playback_controls_fragment); PlayerAlbumCoverFragment playerAlbumCoverFragment = (PlayerAlbumCoverFragment) getChildFragmentManager() @@ -269,6 +267,5 @@ public class BlurPlayerFragment extends AbsPlayerFragment implements PlayerAlbum recyclerView.stopScroll(); layoutManager.scrollToPositionWithOffset(MusicPlayerRemote.getPosition() + 1, 0); } - } } diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/player/normal/PlayerFragment.java b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/player/normal/PlayerFragment.java index bc2eadc7..2ad2bfc9 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/player/normal/PlayerFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/player/normal/PlayerFragment.java @@ -135,7 +135,6 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_player, container, false); unbinder = ButterKnife.bind(this, view); - return view; } @@ -147,12 +146,8 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove } private void setUpSubFragments() { - playbackControlsFragment = (PlayerPlaybackControlsFragment) getChildFragmentManager() - .findFragmentById(R.id.playback_controls_fragment); - - PlayerAlbumCoverFragment playerAlbumCoverFragment = - (PlayerAlbumCoverFragment) getChildFragmentManager() - .findFragmentById(R.id.player_album_cover_fragment); + playbackControlsFragment = (PlayerPlaybackControlsFragment) getChildFragmentManager().findFragmentById(R.id.playback_controls_fragment); + PlayerAlbumCoverFragment playerAlbumCoverFragment = (PlayerAlbumCoverFragment) getChildFragmentManager().findFragmentById(R.id.player_album_cover_fragment); if (playerAlbumCoverFragment != null) { playerAlbumCoverFragment.setCallbacks(this); } diff --git a/app/src/main/java/code/name/monkey/retromusic/util/NavigationUtil.java b/app/src/main/java/code/name/monkey/retromusic/util/NavigationUtil.java index 790ffbc6..5308b169 100755 --- a/app/src/main/java/code/name/monkey/retromusic/util/NavigationUtil.java +++ b/app/src/main/java/code/name/monkey/retromusic/util/NavigationUtil.java @@ -33,6 +33,7 @@ import code.name.monkey.retromusic.ui.activities.SupportDevelopmentActivity; import code.name.monkey.retromusic.ui.activities.UserInfoActivity; import code.name.monkey.retromusic.ui.activities.WhatsNewActivity; import code.name.monkey.retromusic.ui.activities.AlbumDetailsActivity; +import code.name.monkey.retromusic.ui.activities.base.AbsSlidingMusicPanelActivity; import static code.name.monkey.retromusic.Constants.RATE_ON_GOOGLE_PLAY; import static code.name.monkey.retromusic.ui.activities.GenreDetailsActivity.EXTRA_GENRE_ID; @@ -152,4 +153,8 @@ public class NavigationUtil { ActivityOptionsCompat.makeSceneTransitionAnimation((Activity) context, sharedElements).toBundle()); } + + public static void gotoNowPlaying(Activity activity) { + ActivityCompat.startActivity(activity, new Intent(activity, NowPayingActivity.class),null); + } } diff --git a/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java b/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java index e0ba9e10..2697890e 100644 --- a/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java +++ b/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java @@ -112,6 +112,7 @@ public final class PreferenceUtil { private static final String LAST_KNOWN_LYRICS_TYPE = "LAST_KNOWN_LYRICS_TYPE"; private static final String ALBUM_DETAIL_STYLE = "album_detail_style"; private static final String PAUSE_ON_ZERO_VOLUME = "pause_on_zero_volume"; + private static final String NOW_PLAYING_SCREEN = "now_playing_screen"; private static PreferenceUtil sInstance; private final SharedPreferences mPreferences; @@ -157,7 +158,7 @@ public final class PreferenceUtil { return mPreferences.getString(ARTIST_SONG_SORT_ORDER, SortOrder.ArtistSongSortOrder.SONG_A_Z); } - public final boolean toggleHomeBanner() { + public final boolean isHomeBanner() { return mPreferences.getBoolean(TOGGLE_HOME_BANNER, false); } @@ -807,4 +808,7 @@ public final class PreferenceUtil { return layoutRes; } + public boolean isClickOrSave() { + return mPreferences.getBoolean(NOW_PLAYING_SCREEN, false); + } } diff --git a/app/src/main/java/code/name/monkey/retromusic/views/CollapsingFAB.java b/app/src/main/java/code/name/monkey/retromusic/views/CollapsingFAB.java index bf9951d2..34c52119 100644 --- a/app/src/main/java/code/name/monkey/retromusic/views/CollapsingFAB.java +++ b/app/src/main/java/code/name/monkey/retromusic/views/CollapsingFAB.java @@ -4,6 +4,7 @@ import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.graphics.Color; +import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; @@ -24,6 +25,10 @@ import code.name.monkey.retromusic.R; public class CollapsingFAB extends FrameLayout { @ColorInt int color = Color.WHITE; + + String title; + Drawable icon; + boolean showTitle; ImageView shuffleIcon; @@ -40,13 +45,18 @@ public class CollapsingFAB extends FrameLayout { public CollapsingFAB(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); - TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.CollapsingFAB, 0, 0); + icon = attributes.getDrawable(R.styleable.CollapsingFAB_setIcon); color = attributes.getColor(R.styleable.CollapsingFAB_shuffleBackgroundColor, 0); showTitle = attributes.getBoolean(R.styleable.CollapsingFAB_showTitle, false); + title = attributes.getString(R.styleable.CollapsingFAB_setText); + View view = inflate(context, R.layout.collapsing_floating_action_button, this); shuffleIcon = view.findViewById(R.id.icon); + shuffleIcon.setImageDrawable(icon); + textView = view.findViewById(R.id.shuffle_text); + textView.setText(title); textView.setVisibility(showTitle ? VISIBLE : GONE); cardView = view.findViewById(R.id.container); attributes.recycle(); diff --git a/app/src/main/res/drawable/bg_circular_top_corners.xml b/app/src/main/res/drawable/bg_circular_top_corners.xml index 3fe25d2f..bba9e2a1 100644 --- a/app/src/main/res/drawable/bg_circular_top_corners.xml +++ b/app/src/main/res/drawable/bg_circular_top_corners.xml @@ -1,9 +1,12 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/bottom_corners.xml b/app/src/main/res/drawable/bottom_corners.xml new file mode 100644 index 00000000..19432e34 --- /dev/null +++ b/app/src/main/res/drawable/bottom_corners.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_clear_all_black_24dp.xml b/app/src/main/res/drawable/ic_clear_all_black_24dp.xml new file mode 100644 index 00000000..36952839 --- /dev/null +++ b/app/src/main/res/drawable/ic_clear_all_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout-land/activity_album.xml b/app/src/main/res/layout-land/activity_album.xml index f2040973..f3cefaa8 100644 --- a/app/src/main/res/layout-land/activity_album.xml +++ b/app/src/main/res/layout-land/activity_album.xml @@ -106,6 +106,8 @@ android:layout_gravity="end|bottom" android:layout_margin="10dp" app:showTitle="true" + app:setText="@string/action_shuffle_all" + app:setIcon="@drawable/ic_shuffle_white_24dp" app:shuffleBackgroundColor="@color/md_black_1000" /> diff --git a/app/src/main/res/layout-land/activity_artist_details.xml b/app/src/main/res/layout-land/activity_artist_details.xml index 99510ff9..c06c3a3a 100644 --- a/app/src/main/res/layout-land/activity_artist_details.xml +++ b/app/src/main/res/layout-land/activity_artist_details.xml @@ -112,5 +112,7 @@ android:layout_gravity="end|bottom" android:layout_margin="10dp" app:showTitle="true" + app:setIcon="@drawable/ic_shuffle_white_24dp" + app:setText="@string/action_shuffle_all" app:shuffleBackgroundColor="@color/md_black_1000" /> diff --git a/app/src/main/res/layout-land/fragment_banner_home.xml b/app/src/main/res/layout-land/fragment_banner_home.xml index 2f626813..11ebac07 100644 --- a/app/src/main/res/layout-land/fragment_banner_home.xml +++ b/app/src/main/res/layout-land/fragment_banner_home.xml @@ -1,5 +1,4 @@ - - - - - - + android:layout_height="wrap_content" + android:background="@android:color/transparent" + android:elevation="0dp" + app:elevation="0dp"> - - - - - - + android:background="@android:color/transparent" + app:contentScrim="@android:color/transparent" + app:layout_scrollFlags="scroll|exitUntilCollapsed" + app:statusBarScrim="@color/md_black_1000" + app:titleEnabled="false"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_blur.xml b/app/src/main/res/layout-land/fragment_blur.xml index 0fbd4df9..988456f0 100644 --- a/app/src/main/res/layout-land/fragment_blur.xml +++ b/app/src/main/res/layout-land/fragment_blur.xml @@ -27,62 +27,72 @@ - - - + android:layout_height="match_parent"> + android:orientation="vertical"> - + android:layout_height="wrap_content"> - - + + + android:orientation="horizontal"> - + android:layout_gravity="center_horizontal"> - + + + + android:layout_height="match_parent" + android:orientation="vertical"> - - + + + + + + + - + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_card_blur_player.xml b/app/src/main/res/layout-land/fragment_card_blur_player.xml index 0ac7f732..51e28471 100644 --- a/app/src/main/res/layout-land/fragment_card_blur_player.xml +++ b/app/src/main/res/layout-land/fragment_card_blur_player.xml @@ -21,64 +21,68 @@ - - + android:layout_height="match_parent"> - + + + + + + + + + + + + + + + - - - - - + android:layout_gravity="bottom" + android:layout_marginStart="96dp" + android:layout_marginEnd="96dp"> + android:layout_height="match_parent" + tools:layout="@layout/fragment_card_blur_player_playback_controls" /> - - - - - - - - + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_card_player.xml b/app/src/main/res/layout-land/fragment_card_player.xml index 5c2bd1d8..d2a9600e 100644 --- a/app/src/main/res/layout-land/fragment_card_player.xml +++ b/app/src/main/res/layout-land/fragment_card_player.xml @@ -20,57 +20,67 @@ android:layout_height="match_parent" tools:layout="@layout/fragment_album_cover" /> - - + android:layout_height="match_parent"> - - - - - - - - - - + android:orientation="vertical"> + android:layout_height="wrap_content"> - + - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_color_player.xml b/app/src/main/res/layout-land/fragment_color_player.xml index a4d4d721..d0cb7c67 100644 --- a/app/src/main/res/layout-land/fragment_color_player.xml +++ b/app/src/main/res/layout-land/fragment_color_player.xml @@ -14,109 +14,119 @@ - - - + android:layout_height="match_parent"> + android:orientation="vertical"> - + android:layout_height="wrap_content"> - - - - - - - - - - - - - - - - + + + android:orientation="horizontal"> - + android:layout_height="match_parent"> - - + app:cardCornerRadius="8dp" + app:cardElevation="8dp" + app:cardPreventCornerOverlap="false" + app:cardUseCompatPadding="true"> - + + + + + + + + + + + + + + + + android:layout_height="match_parent" + android:orientation="vertical"> - - + + + + + + + + + + - - + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_flat_player.xml b/app/src/main/res/layout-land/fragment_flat_player.xml index eb1040a6..8e2b67e6 100644 --- a/app/src/main/res/layout-land/fragment_flat_player.xml +++ b/app/src/main/res/layout-land/fragment_flat_player.xml @@ -15,60 +15,70 @@ - - - + android:layout_height="match_parent"> + android:orientation="vertical"> - - - - + android:layout_height="wrap_content"> + + + android:orientation="horizontal"> - + android:layout_height="match_parent"> - - + + - + android:orientation="vertical"> + + + + + + + + - + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_home.xml b/app/src/main/res/layout-land/fragment_home.xml index b629d13a..eaa08ee5 100644 --- a/app/src/main/res/layout-land/fragment_home.xml +++ b/app/src/main/res/layout-land/fragment_home.xml @@ -2,7 +2,6 @@ @@ -17,14 +16,13 @@ - + tools:ignore="UnusedAttribute"> - + - + - - - - + + diff --git a/app/src/main/res/layout-land/fragment_material.xml b/app/src/main/res/layout-land/fragment_material.xml index 0e76525a..c5c0c10f 100644 --- a/app/src/main/res/layout-land/fragment_material.xml +++ b/app/src/main/res/layout-land/fragment_material.xml @@ -9,65 +9,75 @@ - - - + android:layout_height="match_parent"> + android:orientation="vertical"> - + android:layout_height="wrap_content"> - - + + + android:orientation="horizontal"> - + android:layout_height="match_parent"> - + tools:layout="@layout/fragment_album_cover" /> + - + android:layout_height="match_parent" + android:orientation="vertical"> - - + + + + + + + + + + - + diff --git a/app/src/main/res/layout-land/fragment_plain_player.xml b/app/src/main/res/layout-land/fragment_plain_player.xml index 15ed6db0..6a01f762 100644 --- a/app/src/main/res/layout-land/fragment_plain_player.xml +++ b/app/src/main/res/layout-land/fragment_plain_player.xml @@ -10,102 +10,112 @@ - - - + android:layout_height="match_parent"> + android:orientation="vertical"> - + android:layout_height="wrap_content"> - - + + + android:orientation="horizontal"> - - - - - - - - + android:layout_height="match_parent"> - + tools:layout="@layout/fragment_player_album_cover" /> + - + android:layout_height="match_parent" + android:orientation="vertical"> + + + + + + + + + + + + + + + + + + - - - - + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_player.xml b/app/src/main/res/layout-land/fragment_player.xml index f9455a57..fa165fe3 100755 --- a/app/src/main/res/layout-land/fragment_player.xml +++ b/app/src/main/res/layout-land/fragment_player.xml @@ -14,60 +14,71 @@ - - - + android:layout_height="match_parent"> + android:orientation="vertical"> - + android:layout_height="wrap_content"> - - + + + android:orientation="horizontal"> - + android:layout_height="match_parent"> - - + + - + android:orientation="vertical"> + + + + + + + + - + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_simple_player.xml b/app/src/main/res/layout-land/fragment_simple_player.xml index bcf97f8e..0c90a1f8 100644 --- a/app/src/main/res/layout-land/fragment_simple_player.xml +++ b/app/src/main/res/layout-land/fragment_simple_player.xml @@ -16,61 +16,70 @@ - - - + android:layout_height="match_parent"> + android:orientation="vertical"> - - - - + android:layout_height="wrap_content"> + + + android:orientation="horizontal"> - + + + + + + + android:orientation="vertical" + android:paddingTop="8dp"> - + - - + + + + + - + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge-land/activity_album.xml b/app/src/main/res/layout-xlarge-land/activity_album.xml index 3692c64e..b2bee0aa 100644 --- a/app/src/main/res/layout-xlarge-land/activity_album.xml +++ b/app/src/main/res/layout-xlarge-land/activity_album.xml @@ -128,6 +128,8 @@ android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="10dp" + app:setIcon="@drawable/ic_shuffle_white_24dp" + app:setText="@string/action_shuffle_all" app:showTitle="false" app:shuffleBackgroundColor="@color/md_black_1000" /> diff --git a/app/src/main/res/layout-xlarge-land/activity_artist_details.xml b/app/src/main/res/layout-xlarge-land/activity_artist_details.xml index 34f4f392..a0aef54c 100644 --- a/app/src/main/res/layout-xlarge-land/activity_artist_details.xml +++ b/app/src/main/res/layout-xlarge-land/activity_artist_details.xml @@ -102,6 +102,8 @@ android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="10dp" + app:setIcon="@drawable/ic_shuffle_white_24dp" + app:setText="@string/action_shuffle_all" app:showTitle="false" app:shuffleBackgroundColor="@color/md_black_1000" /> diff --git a/app/src/main/res/layout-xlarge-land/fragment_blur.xml b/app/src/main/res/layout-xlarge-land/fragment_blur.xml index e0067f12..c4c1dac7 100644 --- a/app/src/main/res/layout-xlarge-land/fragment_blur.xml +++ b/app/src/main/res/layout-xlarge-land/fragment_blur.xml @@ -35,13 +35,10 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - + - - - - + android:layout_height="match_parent"> - - - - - - - - - - + android:orientation="vertical"> - + + + + + + + + + + - - + android:layout_height="wrap_content" + android:layout_weight="0"> + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/activity_album.xml b/app/src/main/res/layout-xlarge/activity_album.xml index c7699b97..0d10433a 100644 --- a/app/src/main/res/layout-xlarge/activity_album.xml +++ b/app/src/main/res/layout-xlarge/activity_album.xml @@ -136,6 +136,8 @@ android:layout_gravity="end|bottom" android:layout_margin="10dp" app:showTitle="false" + app:setIcon="@drawable/ic_shuffle_white_24dp" + app:setText="@string/action_shuffle_all" app:shuffleBackgroundColor="@color/md_black_1000" /> \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/activity_artist_details.xml b/app/src/main/res/layout-xlarge/activity_artist_details.xml index 25514e19..d16bc99b 100644 --- a/app/src/main/res/layout-xlarge/activity_artist_details.xml +++ b/app/src/main/res/layout-xlarge/activity_artist_details.xml @@ -107,5 +107,7 @@ android:layout_gravity="end|bottom" android:layout_margin="10dp" app:showTitle="false" + app:setIcon="@drawable/ic_shuffle_white_24dp" + app:setText="@string/action_shuffle_all" app:shuffleBackgroundColor="@color/md_black_1000" /> diff --git a/app/src/main/res/layout-xlarge/fragment_blur.xml b/app/src/main/res/layout-xlarge/fragment_blur.xml index 7ee0867b..8a8b4517 100644 --- a/app/src/main/res/layout-xlarge/fragment_blur.xml +++ b/app/src/main/res/layout-xlarge/fragment_blur.xml @@ -25,58 +25,60 @@ android:layout_height="match_parent" android:background="@drawable/shadow_up" /> - - + android:layout_height="match_parent"> - - - - - - - - + android:layout_gravity="center_horizontal" + android:layout_marginStart="64dp" + android:layout_marginEnd="64dp" + android:orientation="vertical"> - + + + + + - + android:layout_weight="1" + tools:background="@color/md_white_1000"> - + + - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/fragment_player.xml b/app/src/main/res/layout-xlarge/fragment_player.xml index 4afc29c7..3f556ce8 100644 --- a/app/src/main/res/layout-xlarge/fragment_player.xml +++ b/app/src/main/res/layout-xlarge/fragment_player.xml @@ -14,53 +14,58 @@ - + android:layout_height="match_parent"> - + - - + + + + + + + + + + - + android:layout_weight="0"> - - - - - - - - - - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/abs_playlists.xml b/app/src/main/res/layout/abs_playlists.xml index 54545b0c..295d5291 100644 --- a/app/src/main/res/layout/abs_playlists.xml +++ b/app/src/main/res/layout/abs_playlists.xml @@ -5,7 +5,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - @@ -121,10 +121,9 @@ - - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_album.xml b/app/src/main/res/layout/activity_album.xml index bdae7254..70f1137b 100755 --- a/app/src/main/res/layout/activity_album.xml +++ b/app/src/main/res/layout/activity_album.xml @@ -123,6 +123,8 @@ android:layout_gravity="end|bottom" android:layout_margin="10dp" app:showTitle="true" + app:setIcon="@drawable/ic_shuffle_white_24dp" + app:setText="@string/action_shuffle_all" app:shuffleBackgroundColor="@color/md_black_1000" /> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_artist_details.xml b/app/src/main/res/layout/activity_artist_details.xml index 69b69e29..fd837a3a 100755 --- a/app/src/main/res/layout/activity_artist_details.xml +++ b/app/src/main/res/layout/activity_artist_details.xml @@ -106,5 +106,7 @@ android:layout_gravity="end|bottom" android:layout_margin="10dp" app:showTitle="true" + app:setIcon="@drawable/ic_shuffle_white_24dp" + app:setText="@string/action_shuffle_all" app:shuffleBackgroundColor="@color/md_black_1000" /> diff --git a/app/src/main/res/layout/activity_donation.xml b/app/src/main/res/layout/activity_donation.xml index 216de1ed..3582bcfe 100644 --- a/app/src/main/res/layout/activity_donation.xml +++ b/app/src/main/res/layout/activity_donation.xml @@ -131,4 +131,12 @@ + +