Code refactor
parent
0f8b64534f
commit
5f3434715b
|
@ -12,6 +12,7 @@ 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.adapter.song.ShuffleButtonSongAdapter
|
import code.name.monkey.retromusic.adapter.song.ShuffleButtonSongAdapter
|
||||||
import code.name.monkey.retromusic.extensions.applyToolbar
|
import code.name.monkey.retromusic.extensions.applyToolbar
|
||||||
|
import code.name.monkey.retromusic.extensions.extraNotNull
|
||||||
import code.name.monkey.retromusic.helper.menu.GenreMenuHelper
|
import code.name.monkey.retromusic.helper.menu.GenreMenuHelper
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder
|
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||||
import code.name.monkey.retromusic.model.Genre
|
import code.name.monkey.retromusic.model.Genre
|
||||||
|
@ -61,11 +62,8 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), CabHolder, GenreDet
|
||||||
setTaskDescriptionColorAuto()
|
setTaskDescriptionColorAuto()
|
||||||
setLightNavigationBar(true)
|
setLightNavigationBar(true)
|
||||||
setBottomBarVisibility(View.GONE)
|
setBottomBarVisibility(View.GONE)
|
||||||
if (intent.extras != null) {
|
|
||||||
genre = intent?.extras?.getParcelable(EXTRA_GENRE_ID)!!
|
genre = extraNotNull<Genre>(EXTRA_GENRE_ID).value
|
||||||
} else {
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
|
|
||||||
setUpToolBar()
|
setUpToolBar()
|
||||||
setupRecyclerView()
|
setupRecyclerView()
|
||||||
|
|
|
@ -13,6 +13,7 @@ import code.name.monkey.retromusic.adapter.song.OrderablePlaylistSongAdapter
|
||||||
import code.name.monkey.retromusic.adapter.song.PlaylistSongAdapter
|
import code.name.monkey.retromusic.adapter.song.PlaylistSongAdapter
|
||||||
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
import code.name.monkey.retromusic.adapter.song.SongAdapter
|
||||||
import code.name.monkey.retromusic.extensions.applyToolbar
|
import code.name.monkey.retromusic.extensions.applyToolbar
|
||||||
|
import code.name.monkey.retromusic.extensions.extraNotNull
|
||||||
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
|
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder
|
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||||
import code.name.monkey.retromusic.loaders.PlaylistLoader
|
import code.name.monkey.retromusic.loaders.PlaylistLoader
|
||||||
|
@ -54,11 +55,7 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
|
||||||
presenter = PlaylistSongsPresenterImpl(RepositoryImpl(this))
|
presenter = PlaylistSongsPresenterImpl(RepositoryImpl(this))
|
||||||
presenter.attachView(this)
|
presenter.attachView(this)
|
||||||
|
|
||||||
if (intent.extras != null) {
|
playlist = extraNotNull<Playlist>(EXTRA_PLAYLIST).value
|
||||||
playlist = intent.extras!!.getParcelable(EXTRA_PLAYLIST)!!
|
|
||||||
} else {
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
|
|
||||||
setUpToolBar()
|
setUpToolBar()
|
||||||
setUpRecyclerView()
|
setUpRecyclerView()
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
android:initialLayout="@layout/app_widget_classic"
|
android:initialLayout="@layout/app_widget_classic"
|
||||||
android:minWidth="@dimen/app_widget_classic_min_width"
|
android:minWidth="@dimen/app_widget_classic_min_width"
|
||||||
android:minHeight="@dimen/app_widget_classic_min_height"
|
android:minHeight="@dimen/app_widget_classic_min_height"
|
||||||
|
android:previewImage="@drawable/widget_classic"
|
||||||
android:resizeMode="horizontal|vertical"
|
android:resizeMode="horizontal|vertical"
|
||||||
android:updatePeriodMillis="0"
|
android:updatePeriodMillis="0"
|
||||||
android:previewImage="@drawable/widget_classic"
|
|
||||||
android:widgetCategory="keyguard|home_screen"
|
android:widgetCategory="keyguard|home_screen"
|
||||||
tools:ignore="UnusedAttribute" />
|
tools:ignore="UnusedAttribute" />
|
Loading…
Reference in New Issue