Code refactor
This commit is contained in:
parent
87954b43f2
commit
dac7bd16b7
20 changed files with 91 additions and 74 deletions
|
@ -22,8 +22,8 @@ android {
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
applicationId "code.name.monkey.retromusic"
|
applicationId "code.name.monkey.retromusic"
|
||||||
versionCode 405
|
versionCode 409
|
||||||
versionName '3.4.900'
|
versionName '3.5.000'
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ import android.view.ViewGroup
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.activities.MainActivity
|
import code.name.monkey.retromusic.activities.MainActivity
|
||||||
|
import code.name.monkey.retromusic.extensions.hide
|
||||||
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
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.views.OptionMenuItemView
|
import code.name.monkey.retromusic.views.OptionMenuItemView
|
||||||
|
@ -72,6 +74,10 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
||||||
actionFolders.setOnClickListener(this)
|
actionFolders.setOnClickListener(this)
|
||||||
actionDriveMode.setOnClickListener(this)
|
actionDriveMode.setOnClickListener(this)
|
||||||
|
|
||||||
|
if (MusicPlayerRemote.playingQueue.isEmpty()) {
|
||||||
|
actionDriveMode.hide()
|
||||||
|
}
|
||||||
|
|
||||||
materialDialog = MaterialDialog(requireActivity(), BottomSheet(LayoutMode.WRAP_CONTENT))
|
materialDialog = MaterialDialog(requireActivity(), BottomSheet(LayoutMode.WRAP_CONTENT))
|
||||||
.show {
|
.show {
|
||||||
icon(R.mipmap.ic_launcher_round)
|
icon(R.mipmap.ic_launcher_round)
|
||||||
|
|
|
@ -34,6 +34,7 @@ abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerVie
|
||||||
fun setAndSaveLayoutRes(layoutRes: Int) {
|
fun setAndSaveLayoutRes(layoutRes: Int) {
|
||||||
setLayoutRes(layoutRes)
|
setLayoutRes(layoutRes)
|
||||||
saveLayoutRes(layoutRes)
|
saveLayoutRes(layoutRes)
|
||||||
|
invalidateAdapter()
|
||||||
}
|
}
|
||||||
|
|
||||||
private val maxGridSizeForList: Int
|
private val maxGridSizeForList: Int
|
||||||
|
|
|
@ -31,7 +31,7 @@ class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<AlbumAd
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (adapter!!.dataSet.isEmpty()) {
|
if (adapter!!.dataSet.isNullOrEmpty()) {
|
||||||
albumsPresenter.loadAlbums()
|
albumsPresenter.loadAlbums()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ class ArtistsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Artist
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (adapter!!.dataSet.isEmpty()) {
|
if (adapter!!.dataSet.isNullOrEmpty()) {
|
||||||
artistsPresenter.loadArtists()
|
artistsPresenter.loadArtists()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearL
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (adapter!!.dataSet.isEmpty()) {
|
if (adapter!!.dataSet.isNullOrEmpty()) {
|
||||||
genresPresenter.loadGenres()
|
genresPresenter.loadGenres()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,9 @@ import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog;
|
||||||
import code.name.monkey.retromusic.dialogs.OptionsSheetDialogFragment;
|
import code.name.monkey.retromusic.dialogs.OptionsSheetDialogFragment;
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
import code.name.monkey.retromusic.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment;
|
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment;
|
||||||
import code.name.monkey.retromusic.helper.SortOrder;
|
import code.name.monkey.retromusic.helper.SortOrder.AlbumSortOrder;
|
||||||
|
import code.name.monkey.retromusic.helper.SortOrder.ArtistSortOrder;
|
||||||
|
import code.name.monkey.retromusic.helper.SortOrder.SongSortOrder;
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder;
|
import code.name.monkey.retromusic.interfaces.CabHolder;
|
||||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks;
|
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks;
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
import code.name.monkey.retromusic.util.NavigationUtil;
|
||||||
|
@ -301,49 +303,49 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
if (fragment instanceof AlbumsFragment) {
|
if (fragment instanceof AlbumsFragment) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.action_album_sort_order_asc:
|
case R.id.action_album_sort_order_asc:
|
||||||
sortOrder = SortOrder.AlbumSortOrder.ALBUM_A_Z;
|
sortOrder = AlbumSortOrder.ALBUM_A_Z;
|
||||||
break;
|
break;
|
||||||
case R.id.action_album_sort_order_desc:
|
case R.id.action_album_sort_order_desc:
|
||||||
sortOrder = SortOrder.AlbumSortOrder.ALBUM_Z_A;
|
sortOrder = AlbumSortOrder.ALBUM_Z_A;
|
||||||
break;
|
break;
|
||||||
case R.id.action_album_sort_order_artist:
|
case R.id.action_album_sort_order_artist:
|
||||||
sortOrder = SortOrder.AlbumSortOrder.ALBUM_ARTIST;
|
sortOrder = AlbumSortOrder.ALBUM_ARTIST;
|
||||||
break;
|
break;
|
||||||
case R.id.action_album_sort_order_year:
|
case R.id.action_album_sort_order_year:
|
||||||
sortOrder = SortOrder.AlbumSortOrder.ALBUM_YEAR;
|
sortOrder = AlbumSortOrder.ALBUM_YEAR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (fragment instanceof ArtistsFragment) {
|
} else if (fragment instanceof ArtistsFragment) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.action_artist_sort_order_asc:
|
case R.id.action_artist_sort_order_asc:
|
||||||
sortOrder = SortOrder.ArtistSortOrder.ARTIST_A_Z;
|
sortOrder = ArtistSortOrder.ARTIST_A_Z;
|
||||||
break;
|
break;
|
||||||
case R.id.action_artist_sort_order_desc:
|
case R.id.action_artist_sort_order_desc:
|
||||||
sortOrder = SortOrder.ArtistSortOrder.ARTIST_Z_A;
|
sortOrder = ArtistSortOrder.ARTIST_Z_A;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (fragment instanceof SongsFragment) {
|
} else if (fragment instanceof SongsFragment) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.action_song_sort_order_asc:
|
case R.id.action_song_sort_order_asc:
|
||||||
sortOrder = SortOrder.SongSortOrder.SONG_A_Z;
|
sortOrder = SongSortOrder.SONG_A_Z;
|
||||||
break;
|
break;
|
||||||
case R.id.action_song_sort_order_desc:
|
case R.id.action_song_sort_order_desc:
|
||||||
sortOrder = SortOrder.SongSortOrder.SONG_Z_A;
|
sortOrder = SongSortOrder.SONG_Z_A;
|
||||||
break;
|
break;
|
||||||
case R.id.action_song_sort_order_artist:
|
case R.id.action_song_sort_order_artist:
|
||||||
sortOrder = SortOrder.SongSortOrder.SONG_ARTIST;
|
sortOrder = SongSortOrder.SONG_ARTIST;
|
||||||
break;
|
break;
|
||||||
case R.id.action_song_sort_order_album:
|
case R.id.action_song_sort_order_album:
|
||||||
sortOrder = SortOrder.SongSortOrder.SONG_ALBUM;
|
sortOrder = SongSortOrder.SONG_ALBUM;
|
||||||
break;
|
break;
|
||||||
case R.id.action_song_sort_order_year:
|
case R.id.action_song_sort_order_year:
|
||||||
sortOrder = SortOrder.SongSortOrder.SONG_YEAR;
|
sortOrder = SongSortOrder.SONG_YEAR;
|
||||||
break;
|
break;
|
||||||
case R.id.action_song_sort_order_date:
|
case R.id.action_song_sort_order_date:
|
||||||
sortOrder = SortOrder.SongSortOrder.SONG_DATE;
|
sortOrder = SongSortOrder.SONG_DATE;
|
||||||
break;
|
break;
|
||||||
case R.id.action_song_sort_order_composer:
|
case R.id.action_song_sort_order_composer:
|
||||||
sortOrder = SortOrder.SongSortOrder.COMPOSER;
|
sortOrder = SongSortOrder.COMPOSER;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -452,33 +454,33 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
|
|
||||||
if (fragment instanceof AlbumsFragment) {
|
if (fragment instanceof AlbumsFragment) {
|
||||||
sortOrderMenu.add(0, R.id.action_album_sort_order_asc, 0, R.string.sort_order_a_z)
|
sortOrderMenu.add(0, R.id.action_album_sort_order_asc, 0, R.string.sort_order_a_z)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.AlbumSortOrder.ALBUM_A_Z));
|
.setChecked(currentSortOrder.equals(AlbumSortOrder.ALBUM_A_Z));
|
||||||
sortOrderMenu.add(0, R.id.action_album_sort_order_desc, 1, R.string.sort_order_z_a)
|
sortOrderMenu.add(0, R.id.action_album_sort_order_desc, 1, R.string.sort_order_z_a)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.AlbumSortOrder.ALBUM_Z_A));
|
.setChecked(currentSortOrder.equals(AlbumSortOrder.ALBUM_Z_A));
|
||||||
sortOrderMenu.add(0, R.id.action_album_sort_order_artist, 2, R.string.sort_order_artist)
|
sortOrderMenu.add(0, R.id.action_album_sort_order_artist, 2, R.string.sort_order_artist)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.AlbumSortOrder.ALBUM_ARTIST));
|
.setChecked(currentSortOrder.equals(AlbumSortOrder.ALBUM_ARTIST));
|
||||||
sortOrderMenu.add(0, R.id.action_album_sort_order_year, 3, R.string.sort_order_year)
|
sortOrderMenu.add(0, R.id.action_album_sort_order_year, 3, R.string.sort_order_year)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.AlbumSortOrder.ALBUM_YEAR));
|
.setChecked(currentSortOrder.equals(AlbumSortOrder.ALBUM_YEAR));
|
||||||
} else if (fragment instanceof ArtistsFragment) {
|
} else if (fragment instanceof ArtistsFragment) {
|
||||||
sortOrderMenu.add(0, R.id.action_artist_sort_order_asc, 0, R.string.sort_order_a_z)
|
sortOrderMenu.add(0, R.id.action_artist_sort_order_asc, 0, R.string.sort_order_a_z)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.ArtistSortOrder.ARTIST_A_Z));
|
.setChecked(currentSortOrder.equals(ArtistSortOrder.ARTIST_A_Z));
|
||||||
sortOrderMenu.add(0, R.id.action_artist_sort_order_desc, 1, R.string.sort_order_z_a)
|
sortOrderMenu.add(0, R.id.action_artist_sort_order_desc, 1, R.string.sort_order_z_a)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.ArtistSortOrder.ARTIST_Z_A));
|
.setChecked(currentSortOrder.equals(ArtistSortOrder.ARTIST_Z_A));
|
||||||
} else if (fragment instanceof SongsFragment) {
|
} else if (fragment instanceof SongsFragment) {
|
||||||
sortOrderMenu.add(0, R.id.action_song_sort_order_asc, 0, R.string.sort_order_a_z)
|
sortOrderMenu.add(0, R.id.action_song_sort_order_asc, 0, R.string.sort_order_a_z)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_A_Z));
|
.setChecked(currentSortOrder.equals(SongSortOrder.SONG_A_Z));
|
||||||
sortOrderMenu.add(0, R.id.action_song_sort_order_desc, 1, R.string.sort_order_z_a)
|
sortOrderMenu.add(0, R.id.action_song_sort_order_desc, 1, R.string.sort_order_z_a)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_Z_A));
|
.setChecked(currentSortOrder.equals(SongSortOrder.SONG_Z_A));
|
||||||
sortOrderMenu.add(0, R.id.action_song_sort_order_artist, 2, R.string.sort_order_artist)
|
sortOrderMenu.add(0, R.id.action_song_sort_order_artist, 2, R.string.sort_order_artist)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_ARTIST));
|
.setChecked(currentSortOrder.equals(SongSortOrder.SONG_ARTIST));
|
||||||
sortOrderMenu.add(0, R.id.action_song_sort_order_album, 3, R.string.sort_order_album)
|
sortOrderMenu.add(0, R.id.action_song_sort_order_album, 3, R.string.sort_order_album)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_ALBUM));
|
.setChecked(currentSortOrder.equals(SongSortOrder.SONG_ALBUM));
|
||||||
sortOrderMenu.add(0, R.id.action_song_sort_order_year, 4, R.string.sort_order_year)
|
sortOrderMenu.add(0, R.id.action_song_sort_order_year, 4, R.string.sort_order_year)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_YEAR));
|
.setChecked(currentSortOrder.equals(SongSortOrder.SONG_YEAR));
|
||||||
sortOrderMenu.add(0, R.id.action_song_sort_order_date, 5, R.string.sort_order_date)
|
sortOrderMenu.add(0, R.id.action_song_sort_order_date, 5, R.string.sort_order_date)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_DATE));
|
.setChecked(currentSortOrder.equals(SongSortOrder.SONG_DATE));
|
||||||
sortOrderMenu.add(0, R.id.action_song_sort_order_composer, 6, R.string.sort_order_composer)
|
sortOrderMenu.add(0, R.id.action_song_sort_order_composer, 6, R.string.sort_order_composer)
|
||||||
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.COMPOSER));
|
.setChecked(currentSortOrder.equals(SongSortOrder.COMPOSER));
|
||||||
}
|
}
|
||||||
|
|
||||||
sortOrderMenu.setGroupCheckable(0, true, true);
|
sortOrderMenu.setGroupCheckable(0, true, true);
|
||||||
|
|
|
@ -14,7 +14,6 @@ import code.name.monkey.retromusic.mvp.presenter.PlaylistView
|
||||||
import code.name.monkey.retromusic.mvp.presenter.PlaylistsPresenter
|
import code.name.monkey.retromusic.mvp.presenter.PlaylistsPresenter
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
|
||||||
class PlaylistsFragment : AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, LinearLayoutManager>(), PlaylistView {
|
class PlaylistsFragment : AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, LinearLayoutManager>(), PlaylistView {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -38,13 +37,15 @@ class PlaylistsFragment : AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, L
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun createAdapter(): PlaylistAdapter {
|
override fun createAdapter(): PlaylistAdapter {
|
||||||
return PlaylistAdapter(libraryFragment.mainActivity, ArrayList(),
|
return PlaylistAdapter(
|
||||||
R.layout.item_list, libraryFragment)
|
libraryFragment.mainActivity, ArrayList(),
|
||||||
|
R.layout.item_list, libraryFragment
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (adapter!!.dataSet.isEmpty()) {
|
if (adapter!!.dataSet.isNullOrEmpty()) {
|
||||||
playlistsPresenter.playlists()
|
playlistsPresenter.playlists()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ class SongsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdap
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (adapter?.itemCount != 0)
|
if (adapter?.dataSet.isNullOrEmpty())
|
||||||
songPresenter.loadSongs()
|
songPresenter.loadSongs()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||||
import code.name.monkey.retromusic.service.MusicService
|
import code.name.monkey.retromusic.service.MusicService
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.MusicUtil
|
||||||
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.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
import kotlinx.android.synthetic.main.fragment_player_playback_controls.nextButton
|
import kotlinx.android.synthetic.main.fragment_player_playback_controls.nextButton
|
||||||
import kotlinx.android.synthetic.main.fragment_player_playback_controls.playPauseButton
|
import kotlinx.android.synthetic.main.fragment_player_playback_controls.playPauseButton
|
||||||
|
@ -158,10 +159,20 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment(), OnSharedPref
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updatePlayPauseDrawableState() {
|
private fun updatePlayPauseDrawableState() {
|
||||||
if (MusicPlayerRemote.isPlaying) {
|
val playResIcon = if (RetroUtil.isTablet()) {
|
||||||
playPauseButton.setImageResource(R.drawable.ic_pause_white_24dp)
|
R.drawable.ic_play_arrow_white_64dp
|
||||||
} else {
|
} else {
|
||||||
playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_24dp)
|
R.drawable.ic_play_arrow_white_24dp
|
||||||
|
}
|
||||||
|
val pauseResIcon = if (RetroUtil.isTablet()) {
|
||||||
|
R.drawable.ic_pause_white_64dp
|
||||||
|
} else {
|
||||||
|
R.drawable.ic_pause_white_64dp
|
||||||
|
}
|
||||||
|
if (MusicPlayerRemote.isPlaying) {
|
||||||
|
playPauseButton.setImageResource(playResIcon)
|
||||||
|
} else {
|
||||||
|
playPauseButton.setImageResource(pauseResIcon)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textAppearance="@style/TextViewHeadline4"
|
android:textAppearance="@style/TextViewHeadline5"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:text="Album name" />
|
tools:text="Album name" />
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textAppearance="@style/TextViewHeadline4"
|
android:textAppearance="@style/TextViewHeadline5"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:text="Title" />
|
tools:text="Title" />
|
||||||
|
|
|
@ -71,7 +71,6 @@
|
||||||
android:id="@+id/previousButton"
|
android:id="@+id/previousButton"
|
||||||
android:layout_width="72dp"
|
android:layout_width="72dp"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:background="?attr/roundSelector"
|
android:background="?attr/roundSelector"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
|
@ -85,14 +84,13 @@
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/playPauseButton"
|
android:id="@+id/playPauseButton"
|
||||||
android:layout_width="96dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
app:fabCustomSize="96dp"
|
||||||
|
app:maxImageSize="52dp"
|
||||||
android:background="@drawable/color_circle_gradient"
|
android:background="@drawable/color_circle_gradient"
|
||||||
android:elevation="4dp"
|
|
||||||
android:padding="12dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
|
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
|
||||||
app:layout_constraintStart_toEndOf="@id/previousButton"
|
app:layout_constraintStart_toEndOf="@id/previousButton"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/songInfo"
|
app:layout_constraintTop_toBottomOf="@+id/songInfo"
|
||||||
|
@ -103,7 +101,6 @@
|
||||||
android:id="@+id/nextButton"
|
android:id="@+id/nextButton"
|
||||||
android:layout_width="72dp"
|
android:layout_width="72dp"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:background="?attr/roundSelector"
|
android:background="?attr/roundSelector"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textAppearance="@style/TextViewHeadline4"
|
android:textAppearance="@style/TextViewHeadline5"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constrainedWidth="true"
|
app:layout_constrainedWidth="true"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:text="@string/songs"
|
android:text="@string/songs"
|
||||||
android:textAppearance="@style/TextViewHeadline5"
|
android:textAppearance="@style/TextViewHeadline6"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:text="@string/songs"
|
android:text="@string/songs"
|
||||||
android:textAppearance="@style/TextViewHeadline5"
|
android:textAppearance="@style/TextViewHeadline6"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:text="@string/songs"
|
android:text="@string/songs"
|
||||||
android:textAppearance="@style/TextViewHeadline5"
|
android:textAppearance="@style/TextViewHeadline6"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:text="@string/albums"
|
android:text="@string/albums"
|
||||||
android:textAppearance="@style/TextViewHeadline5"
|
android:textAppearance="@style/TextViewHeadline6"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constrainedWidth="true"
|
app:layout_constrainedWidth="true"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:text="@string/songs"
|
android:text="@string/songs"
|
||||||
android:textAppearance="@style/TextViewHeadline5"
|
android:textAppearance="@style/TextViewHeadline6"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constrainedWidth="true"
|
app:layout_constrainedWidth="true"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -83,8 +83,7 @@
|
||||||
android:nestedScrollingEnabled="false"
|
android:nestedScrollingEnabled="false"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/songTitle"
|
app:layout_constraintTop_toBottomOf="@id/songTitle"
|
||||||
tools:listitem="@layout/item_song"
|
tools:listitem="@layout/item_song" />
|
||||||
tools:visibility="gone" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/biographyTitle"
|
android:id="@+id/biographyTitle"
|
||||||
|
@ -92,7 +91,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:text="@string/biography"
|
android:text="@string/biography"
|
||||||
android:textAppearance="@style/TextViewHeadline5"
|
android:textAppearance="@style/TextViewHeadline6"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constrainedWidth="true"
|
app:layout_constrainedWidth="true"
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textAppearance="@style/TextViewHeadline4"
|
android:textAppearance="@style/TextViewHeadline5"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
|
@ -26,19 +26,6 @@
|
||||||
<include layout="@layout/status_bar" />
|
<include layout="@layout/status_bar" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="0">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
|
||||||
android:id="@+id/playerToolbar"
|
|
||||||
style="@style/Toolbar"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
|
||||||
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
@ -63,5 +50,18 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:layout="@layout/fragment_material_playback_controls" />
|
tools:layout="@layout/fragment_material_playback_controls" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/playerToolbar"
|
||||||
|
style="@style/Toolbar"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||||
|
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
|
||||||
|
</FrameLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toEndOf="@+id/previousButton"
|
app:layout_constraintStart_toEndOf="@+id/previousButton"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/songInfo"
|
app:layout_constraintTop_toBottomOf="@+id/songInfo"
|
||||||
app:srcCompat="@drawable/ic_pause_white_64dp"
|
app:srcCompat="@drawable/ic_pause_white_24dp"
|
||||||
tools:tint="@color/md_black_1000" />
|
tools:tint="@color/md_black_1000" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
|
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
|
||||||
app:strokeWidth="0dp">
|
app:strokeWidth="0dp">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/playerFragmentContainer"
|
android:id="@+id/playerFragmentContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue