From 14a113e73fe7a415f95fe3416556b5b331a14b63 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Sun, 23 Jun 2019 20:17:49 +0530 Subject: [PATCH] Added music note off for empty view --- app/src/main/assets/retro-changelog.html | 2 +- .../fragments/mainactivity/AlbumsFragment.kt | 12 ++++++------ .../fragments/mainactivity/ArtistsFragment.kt | 10 +++++----- .../fragments/mainactivity/PlaylistsFragment.kt | 8 ++++---- .../fragments/mainactivity/SongsFragment.kt | 4 ++-- .../mainactivity/home/BannerHomeFragment.kt | 10 +++++----- .../monkey/retromusic/mvp/contract/HomeContract.kt | 7 ++----- .../monkey/retromusic/mvp/presenter/HomePresenter.kt | 12 ++++++------ .../layout/fragment_main_activity_recycler_view.xml | 2 +- app/src/main/res/layout/home_content.xml | 6 ++++-- 10 files changed, 36 insertions(+), 37 deletions(-) diff --git a/app/src/main/assets/retro-changelog.html b/app/src/main/assets/retro-changelog.html index f608e39b..a416183e 100644 --- a/app/src/main/assets/retro-changelog.html +++ b/app/src/main/assets/retro-changelog.html @@ -1 +1 @@ -

We're really sorry for Announcing this Retro Music is driving towards pure Android Material Design guidelines we don't want any unnecessary UI elements that don't need for Music player.

v3.2.100

v3.2.000

v3.1.900

v3.1.850

v3.1.800

v3.1.700

v3.1.400

v3.1.300

v3.1.240

v3.1.200

v3.0.570

If you see entire app white or dark or black select same theme in settings to fix

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 +

We're really sorry for Announcing this Retro Music is driving towards pure Android Material Design guidelines we don't want any unnecessary UI elements that don't need for Music player.

v3.2.100

v3.2.000

v3.1.900

v3.1.850

v3.1.800

v3.1.700

v3.1.400

v3.1.300

v3.1.240

v3.1.200

v3.0.570

If you see entire app white or dark or black select same theme in settings to fix

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/fragments/mainactivity/AlbumsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/AlbumsFragment.kt index e8bb33ff..2cf5c322 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/AlbumsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/AlbumsFragment.kt @@ -12,7 +12,7 @@ import code.name.monkey.retromusic.util.PreferenceUtil open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment(), AlbumContract.AlbumView { - private var presenter: AlbumPresenter? = null + private lateinit var presenter: AlbumPresenter override val emptyMessage: Int @@ -48,7 +48,7 @@ open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment(), ArtistContract.ArtistView { - private var presenter: ArtistPresenter? = null + private lateinit var presenter: ArtistPresenter override val emptyMessage: Int get() = R.string.no_artists @@ -37,7 +37,7 @@ class ArtistsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment(), PlaylistContract.PlaylistView { - private var presenter: PlaylistPresenter? = null + private lateinit var presenter: PlaylistPresenter override val emptyMessage: Int get() = R.string.no_playlists @@ -47,18 +47,18 @@ class PlaylistsFragment : AbsLibraryPagerRecyclerViewFragment) { + if (list.isEmpty()){ + showEmptyView() + return + } val finalList = list.sortedWith(compareBy { it.priority }) homeAdapter.swapData(finalList) recyclerView.apply { diff --git a/app/src/main/java/code/name/monkey/retromusic/mvp/contract/HomeContract.kt b/app/src/main/java/code/name/monkey/retromusic/mvp/contract/HomeContract.kt index 34e84795..73e45e44 100644 --- a/app/src/main/java/code/name/monkey/retromusic/mvp/contract/HomeContract.kt +++ b/app/src/main/java/code/name/monkey/retromusic/mvp/contract/HomeContract.kt @@ -20,12 +20,9 @@ import code.name.monkey.retromusic.mvp.BaseView interface HomeContract { - interface HomeView : BaseView> { - fun showEmpty() - } + interface HomeView : BaseView> interface HomePresenter : BasePresenter { - - fun homeSections(); + fun homeSections() } } \ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/mvp/presenter/HomePresenter.kt b/app/src/main/java/code/name/monkey/retromusic/mvp/presenter/HomePresenter.kt index c8020fdd..83cb6f54 100644 --- a/app/src/main/java/code/name/monkey/retromusic/mvp/presenter/HomePresenter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/mvp/presenter/HomePresenter.kt @@ -59,7 +59,7 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home if (it.isNotEmpty()) hashSet.add(Home(0, R.string.recent_artists, 0, it, RECENT_ARTISTS, R.drawable.ic_artist_white_24dp)) view.showData(ArrayList(hashSet)) }, { - view.showEmpty() + view.showEmptyView() }) } @@ -69,7 +69,7 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home if (it.isNotEmpty()) hashSet.add(Home(1, R.string.recent_albums, 0, it, RECENT_ALBUMS, R.drawable.ic_album_white_24dp)) view.showData(ArrayList(hashSet)) }, { - view.showEmpty() + view.showEmptyView() }) } @@ -79,7 +79,7 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home if (it.isNotEmpty()) hashSet.add(Home(3, R.string.top_albums, 0, it, TOP_ALBUMS, R.drawable.ic_album_white_24dp)) view.showData(ArrayList(hashSet)) }, { - view.showEmpty() + view.showEmptyView() }) } @@ -89,7 +89,7 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home if (it.isNotEmpty()) hashSet.add(Home(2, R.string.top_artists, 0, it, TOP_ARTISTS, R.drawable.ic_artist_white_24dp)) view.showData(ArrayList(hashSet)) }, { - view.showEmpty() + view.showEmptyView() }) } @@ -99,7 +99,7 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home if (it.isNotEmpty()) hashSet.add(Home(4, R.string.favorites, 0, it, PLAYLISTS, R.drawable.ic_favorite_white_24dp)) view.showData(ArrayList(hashSet)) }, { - view.showEmpty() + view.showEmptyView() }) } @@ -109,7 +109,7 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home if (it.isNotEmpty()) hashSet.add(Home(6, R.string.genres, 0, it, GENRES, R.drawable.ic_guitar_acoustic_white_24dp)) view.showData(ArrayList(hashSet)) }, { - view.showEmpty() + view.showEmptyView() }) } } diff --git a/app/src/main/res/layout/fragment_main_activity_recycler_view.xml b/app/src/main/res/layout/fragment_main_activity_recycler_view.xml index 5e389b02..11ce06a0 100644 --- a/app/src/main/res/layout/fragment_main_activity_recycler_view.xml +++ b/app/src/main/res/layout/fragment_main_activity_recycler_view.xml @@ -26,7 +26,7 @@ + app:srcCompat="@drawable/ic_music_note_off_white_24dp" /> + app:srcCompat="@drawable/ic_music_note_off_white_24dp" /> \ No newline at end of file