Improved album and artist grid style change
This commit is contained in:
parent
6b959ec24a
commit
eee663f717
17 changed files with 31 additions and 169 deletions
|
@ -208,7 +208,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
moreRecyclerView.show()
|
||||
moreTitle.text = String.format(getString(R.string.label_more_from), album.artist)
|
||||
|
||||
val albumAdapter = HorizontalAlbumAdapter(this, albums, false, null)
|
||||
val albumAdapter = HorizontalAlbumAdapter(this, albums, null)
|
||||
moreRecyclerView.layoutManager = GridLayoutManager(
|
||||
this,
|
||||
1,
|
||||
|
|
|
@ -22,10 +22,12 @@ import code.name.monkey.retromusic.R
|
|||
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
||||
import code.name.monkey.retromusic.adapter.album.HorizontalAlbumAdapter
|
||||
import code.name.monkey.retromusic.adapter.song.SimpleSongAdapter
|
||||
import code.name.monkey.retromusic.dialogs.AddToPlaylistDialog
|
||||
import code.name.monkey.retromusic.extensions.ripAlpha
|
||||
import code.name.monkey.retromusic.extensions.show
|
||||
import code.name.monkey.retromusic.glide.ArtistGlideRequest
|
||||
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.interfaces.CabHolder
|
||||
import code.name.monkey.retromusic.model.Album
|
||||
import code.name.monkey.retromusic.model.Artist
|
||||
|
@ -57,7 +59,6 @@ import kotlinx.android.synthetic.main.activity_artist_details.artistTitle
|
|||
import kotlinx.android.synthetic.main.activity_artist_details.image
|
||||
import kotlinx.android.synthetic.main.activity_artist_details.text
|
||||
import kotlinx.android.synthetic.main.activity_artist_details.toolbar
|
||||
import java.text.DecimalFormat
|
||||
import java.util.Locale
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -84,6 +85,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
private var cab: MaterialCab? = null
|
||||
private var biography: Spanned? = null
|
||||
private lateinit var artist: Artist
|
||||
private lateinit var songs: List<Song>
|
||||
private lateinit var songAdapter: SimpleSongAdapter
|
||||
private lateinit var albumAdapter: HorizontalAlbumAdapter
|
||||
private var forceDownload: Boolean = false
|
||||
|
@ -133,10 +135,10 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
setupRecyclerView()
|
||||
|
||||
playAction.apply {
|
||||
//setOnClickListener { MusicPlayerRemote.openQueue(artist.songs, 0, true) }
|
||||
setOnClickListener { MusicPlayerRemote.openQueue(songs, 0, true) }
|
||||
}
|
||||
shuffleAction.apply {
|
||||
//setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(artist.songs, true) }
|
||||
setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(songs, true) }
|
||||
}
|
||||
|
||||
biographyText.setOnClickListener {
|
||||
|
@ -154,7 +156,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
albumAdapter = HorizontalAlbumAdapter(this, ArrayList(), false, null)
|
||||
albumAdapter = HorizontalAlbumAdapter(this, ArrayList(), null)
|
||||
albumRecyclerView.apply {
|
||||
itemAnimator = DefaultItemAnimator()
|
||||
layoutManager = GridLayoutManager(this.context, 1, GridLayoutManager.HORIZONTAL, false)
|
||||
|
@ -190,6 +192,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
}
|
||||
|
||||
override fun songs(songs: List<Song>) {
|
||||
this.songs = songs
|
||||
songAdapter.swapDataSet(songs)
|
||||
}
|
||||
|
||||
|
@ -287,45 +290,32 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
MaterialUtil.setTint(button = playAction, color = buttonColor)
|
||||
|
||||
val toolbarColor = ATHUtil.resolveColor(this, R.attr.colorSurface)
|
||||
//status_bar.setBackgroundColor(toolbarColor)
|
||||
|
||||
toolbar.setBackgroundColor(toolbarColor)
|
||||
setSupportActionBar(toolbar)
|
||||
supportActionBar?.title = null
|
||||
}
|
||||
|
||||
private fun numberFormat(count: Float): String {
|
||||
val prefixes = arrayOf("", "K", "M", "B", "T", "P", "E")
|
||||
var index = 0
|
||||
var finalCount = count
|
||||
while (finalCount / 1000 >= 1) {
|
||||
finalCount /= 1000
|
||||
index++
|
||||
}
|
||||
val decimal = DecimalFormat("#.##")
|
||||
return String.format("%s %s", decimal.format(finalCount), prefixes[index])
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return handleSortOrderMenuItem(item)
|
||||
}
|
||||
|
||||
private fun handleSortOrderMenuItem(item: MenuItem): Boolean {
|
||||
//val songs = artist.songs
|
||||
when (item.itemId) {
|
||||
android.R.id.home -> {
|
||||
super.onBackPressed()
|
||||
return true
|
||||
}
|
||||
R.id.action_play_next -> {
|
||||
//MusicPlayerRemote.playNext(songs)
|
||||
MusicPlayerRemote.playNext(songs)
|
||||
return true
|
||||
}
|
||||
R.id.action_add_to_current_playing -> {
|
||||
//MusicPlayerRemote.enqueue(songs)
|
||||
MusicPlayerRemote.enqueue(songs)
|
||||
return true
|
||||
}
|
||||
R.id.action_add_to_playlist -> {
|
||||
//AddToPlaylistDialog.create(songs).show(supportFragmentManager, "ADD_PLAYLIST")
|
||||
AddToPlaylistDialog.create(songs).show(supportFragmentManager, "ADD_PLAYLIST")
|
||||
return true
|
||||
}
|
||||
R.id.action_set_artist_image -> {
|
||||
|
|
|
@ -218,7 +218,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
|||
}
|
||||
|
||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
|
||||
if (key == PreferenceUtil.GENERAL_THEME || key == PreferenceUtil.BLACK_THEME || key == PreferenceUtil.ADAPTIVE_COLOR_APP || key == PreferenceUtil.DOMINANT_COLOR || key == PreferenceUtil.USER_NAME || key == PreferenceUtil.TOGGLE_FULL_SCREEN || key == PreferenceUtil.TOGGLE_VOLUME || key == PreferenceUtil.ROUND_CORNERS || key == PreferenceUtil.CAROUSEL_EFFECT || key == PreferenceUtil.NOW_PLAYING_SCREEN_ID || key == PreferenceUtil.TOGGLE_GENRE || key == PreferenceUtil.BANNER_IMAGE_PATH || key == PreferenceUtil.PROFILE_IMAGE_PATH || key == PreferenceUtil.CIRCULAR_ALBUM_ART || key == PreferenceUtil.KEEP_SCREEN_ON || key == PreferenceUtil.TOGGLE_SEPARATE_LINE || key == PreferenceUtil.ALBUM_GRID_STYLE || key == PreferenceUtil.ARTIST_GRID_STYLE || key == PreferenceUtil.TOGGLE_HOME_BANNER || key == PreferenceUtil.TOGGLE_ADD_CONTROLS || key == PreferenceUtil.ALBUM_COVER_STYLE || key == PreferenceUtil.HOME_ARTIST_GRID_STYLE || key == PreferenceUtil.ALBUM_COVER_TRANSFORM || key == PreferenceUtil.DESATURATED_COLOR || key == PreferenceUtil.TAB_TEXT_MODE || key == PreferenceUtil.LIBRARY_CATEGORIES
|
||||
if (key == PreferenceUtil.GENERAL_THEME || key == PreferenceUtil.BLACK_THEME || key == PreferenceUtil.ADAPTIVE_COLOR_APP || key == PreferenceUtil.DOMINANT_COLOR || key == PreferenceUtil.USER_NAME || key == PreferenceUtil.TOGGLE_FULL_SCREEN || key == PreferenceUtil.TOGGLE_VOLUME || key == PreferenceUtil.ROUND_CORNERS || key == PreferenceUtil.CAROUSEL_EFFECT || key == PreferenceUtil.NOW_PLAYING_SCREEN_ID || key == PreferenceUtil.TOGGLE_GENRE || key == PreferenceUtil.BANNER_IMAGE_PATH || key == PreferenceUtil.PROFILE_IMAGE_PATH || key == PreferenceUtil.CIRCULAR_ALBUM_ART || key == PreferenceUtil.KEEP_SCREEN_ON || key == PreferenceUtil.TOGGLE_SEPARATE_LINE || key == PreferenceUtil.TOGGLE_HOME_BANNER || key == PreferenceUtil.TOGGLE_ADD_CONTROLS || key == PreferenceUtil.ALBUM_COVER_STYLE || key == PreferenceUtil.HOME_ARTIST_GRID_STYLE || key == PreferenceUtil.ALBUM_COVER_TRANSFORM || key == PreferenceUtil.DESATURATED_COLOR || key == PreferenceUtil.TAB_TEXT_MODE || key == PreferenceUtil.LIBRARY_CATEGORIES
|
||||
) postRecreate()
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,6 @@ class HomeAdapter(
|
|||
activity,
|
||||
list,
|
||||
PreferenceUtil.getInstance(activity).getHomeGridStyle(activity),
|
||||
false,
|
||||
null
|
||||
)
|
||||
adapter = artistAdapter
|
||||
|
|
|
@ -29,7 +29,6 @@ open class AlbumAdapter(
|
|||
protected val activity: AppCompatActivity,
|
||||
dataSet: List<Album>,
|
||||
protected var itemLayoutRes: Int,
|
||||
usePalette: Boolean,
|
||||
cabHolder: CabHolder?
|
||||
) : AbsMultiSelectAdapter<AlbumAdapter.ViewHolder, Album>(
|
||||
activity,
|
||||
|
@ -40,24 +39,11 @@ open class AlbumAdapter(
|
|||
var dataSet: List<Album>
|
||||
protected set
|
||||
|
||||
protected var usePalette = false
|
||||
|
||||
init {
|
||||
this.dataSet = dataSet
|
||||
this.usePalette = usePalette
|
||||
this.setHasStableIds(true)
|
||||
}
|
||||
|
||||
fun useItemLayout(itemLayoutRes: Int) {
|
||||
this.itemLayoutRes = itemLayoutRes
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun usePalette(usePalette: Boolean) {
|
||||
this.usePalette = usePalette
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun swapDataSet(dataSet: List<Album>) {
|
||||
this.dataSet = dataSet
|
||||
notifyDataSetChanged()
|
||||
|
@ -86,15 +72,6 @@ open class AlbumAdapter(
|
|||
holder.itemView.isActivated = isChecked
|
||||
holder.title?.text = getAlbumTitle(album)
|
||||
holder.text?.text = getAlbumText(album)
|
||||
holder.playSongs?.setOnClickListener {
|
||||
/*album.songs?.let { songs ->
|
||||
MusicPlayerRemote.openQueue(
|
||||
songs,
|
||||
0,
|
||||
true
|
||||
)
|
||||
}*/
|
||||
}
|
||||
loadAlbumCover(album, holder)
|
||||
}
|
||||
|
||||
|
|
|
@ -45,15 +45,6 @@ class AlbumFullWidthAdapter(
|
|||
val album = dataSet[position]
|
||||
holder.title?.text = getAlbumTitle(album)
|
||||
holder.text?.text = getAlbumText(album)
|
||||
holder.playSongs?.setOnClickListener {
|
||||
/*album.songs?.let { songs ->
|
||||
MusicPlayerRemote.openQueue(
|
||||
songs,
|
||||
0,
|
||||
true
|
||||
)
|
||||
}*/
|
||||
}
|
||||
loadAlbumCover(album, holder)
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,9 @@ import java.util.ArrayList
|
|||
class HorizontalAlbumAdapter(
|
||||
activity: AppCompatActivity,
|
||||
dataSet: ArrayList<Album>,
|
||||
usePalette: Boolean,
|
||||
cabHolder: CabHolder?
|
||||
) : AlbumAdapter(
|
||||
activity, dataSet, HorizontalAdapterHelper.LAYOUT_RES, usePalette, cabHolder
|
||||
activity, dataSet, HorizontalAdapterHelper.LAYOUT_RES, cabHolder
|
||||
) {
|
||||
|
||||
override fun createViewHolder(view: View, viewType: Int): ViewHolder {
|
||||
|
|
|
@ -30,7 +30,7 @@ class ArtistAdapter(
|
|||
val activity: AppCompatActivity,
|
||||
var dataSet: ArrayList<Artist>,
|
||||
var itemLayoutRes: Int,
|
||||
var usePalette: Boolean,
|
||||
|
||||
cabHolder: CabHolder?
|
||||
) : AbsMultiSelectAdapter<ArtistAdapter.ViewHolder, Artist>(
|
||||
activity, cabHolder, R.menu.menu_media_selection
|
||||
|
@ -41,13 +41,8 @@ class ArtistAdapter(
|
|||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun usePalette(usePalette: Boolean) {
|
||||
this.usePalette = usePalette
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun getItemId(position: Int): Long {
|
||||
return dataSet[position].id.toLong()
|
||||
return dataSet[position].id
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
|
|
|
@ -17,7 +17,6 @@ package code.name.monkey.retromusic.adapter.base;
|
|||
import android.graphics.Color;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -60,8 +59,6 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold
|
|||
@Nullable
|
||||
public View paletteColorContainer;
|
||||
|
||||
@Nullable
|
||||
public ImageButton playSongs;
|
||||
|
||||
@Nullable
|
||||
public RecyclerView recyclerView;
|
||||
|
@ -93,7 +90,6 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold
|
|||
paletteColorContainer = itemView.findViewById(R.id.paletteColorContainer);
|
||||
recyclerView = itemView.findViewById(R.id.recycler_view);
|
||||
mask = itemView.findViewById(R.id.mask);
|
||||
playSongs = itemView.findViewById(R.id.playSongs);
|
||||
dummyContainer = itemView.findViewById(R.id.dummy_view);
|
||||
|
||||
if (imageContainerCard != null) {
|
||||
|
|
|
@ -34,6 +34,7 @@ abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerVie
|
|||
fun setAndSaveLayoutRes(layoutRes: Int) {
|
||||
setLayoutRes(layoutRes)
|
||||
saveLayoutRes(layoutRes)
|
||||
invalidateAdapter()
|
||||
}
|
||||
|
||||
private val maxGridSizeForList: Int
|
||||
|
@ -118,12 +119,6 @@ abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerVie
|
|||
|
||||
protected abstract fun saveGridSizeLand(gridColumns: Int)
|
||||
|
||||
protected abstract fun saveUsePalette(usePalette: Boolean)
|
||||
|
||||
protected abstract fun loadUsePalette(): Boolean
|
||||
|
||||
protected abstract fun setUsePalette(usePalette: Boolean)
|
||||
|
||||
protected abstract fun loadLayoutRes(): Int
|
||||
|
||||
protected abstract fun saveLayoutRes(layoutRes: Int)
|
||||
|
|
|
@ -41,7 +41,7 @@ open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Al
|
|||
albumsPresenter.detachView()
|
||||
}
|
||||
|
||||
override fun albums(albums: List<Album>) {
|
||||
override fun albums(albums: List<Album>) {
|
||||
adapter?.swapDataSet(albums)
|
||||
}
|
||||
|
||||
|
@ -53,21 +53,13 @@ open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Al
|
|||
}
|
||||
|
||||
override fun createAdapter(): AlbumAdapter {
|
||||
/* var itemLayoutRes = itemLayoutRes
|
||||
notifyLayoutResChanged(itemLayoutRes)
|
||||
if (itemLayoutRes != R.layout.item_list) {
|
||||
itemLayoutRes = PreferenceUtil.getInstance(requireContext()).getAlbumGridStyle(requireContext())
|
||||
}*/
|
||||
val dataSet = if (adapter == null) ArrayList() else adapter!!.dataSet
|
||||
return AlbumAdapter(libraryFragment.mainActivity, dataSet, itemLayoutRes(), loadUsePalette(), libraryFragment)
|
||||
}
|
||||
|
||||
public override fun loadUsePalette(): Boolean {
|
||||
return PreferenceUtil.getInstance(requireContext()).albumColoredFooters()
|
||||
}
|
||||
|
||||
override fun setUsePalette(usePalette: Boolean) {
|
||||
adapter?.usePalette(usePalette)
|
||||
return AlbumAdapter(
|
||||
libraryFragment.mainActivity,
|
||||
dataSet,
|
||||
itemLayoutRes(),
|
||||
libraryFragment
|
||||
)
|
||||
}
|
||||
|
||||
override fun setGridSize(gridSize: Int) {
|
||||
|
@ -99,10 +91,6 @@ open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Al
|
|||
PreferenceUtil.getInstance(requireContext()).setAlbumGridSizeLand(gridColumns)
|
||||
}
|
||||
|
||||
override fun saveUsePalette(usePalette: Boolean) {
|
||||
PreferenceUtil.getInstance(requireContext()).setAlbumColoredFooters(usePalette)
|
||||
}
|
||||
|
||||
override fun onMediaStoreChanged() {
|
||||
albumsPresenter.loadAlbums()
|
||||
}
|
||||
|
@ -116,7 +104,6 @@ open class AlbumsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Al
|
|||
}
|
||||
|
||||
override fun setLayoutRes(layoutRes: Int) {
|
||||
//adapter?.itemCount?.let { adapter?.notifyItemRangeChanged(0, it) }
|
||||
}
|
||||
|
||||
override fun loadLayoutRes(): Int {
|
||||
|
|
|
@ -66,7 +66,6 @@ class ArtistsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Artist
|
|||
libraryFragment.mainActivity,
|
||||
dataSet,
|
||||
itemLayoutRes(),
|
||||
loadUsePalette(),
|
||||
libraryFragment
|
||||
)
|
||||
}
|
||||
|
@ -87,18 +86,6 @@ class ArtistsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Artist
|
|||
PreferenceUtil.getInstance(requireContext()).setArtistGridSizeLand(gridColumns)
|
||||
}
|
||||
|
||||
override fun saveUsePalette(usePalette: Boolean) {
|
||||
PreferenceUtil.getInstance(requireContext()).setArtistColoredFooters(usePalette)
|
||||
}
|
||||
|
||||
public override fun loadUsePalette(): Boolean {
|
||||
return PreferenceUtil.getInstance(requireContext()).artistColoredFooters()
|
||||
}
|
||||
|
||||
override fun setUsePalette(usePalette: Boolean) {
|
||||
adapter?.usePalette(usePalette)
|
||||
}
|
||||
|
||||
override fun setGridSize(gridSize: Int) {
|
||||
layoutManager?.spanCount = gridSize
|
||||
adapter?.notifyDataSetChanged()
|
||||
|
@ -121,9 +108,7 @@ class ArtistsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Artist
|
|||
val TAG: String = ArtistsFragment::class.java.simpleName
|
||||
|
||||
fun newInstance(): ArtistsFragment {
|
||||
|
||||
val args = Bundle()
|
||||
|
||||
val fragment = ArtistsFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
|
|
|
@ -73,17 +73,6 @@ class SongsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdap
|
|||
PreferenceUtil.getInstance(requireContext()).setSongGridSizeLand(gridColumns)
|
||||
}
|
||||
|
||||
public override fun saveUsePalette(usePalette: Boolean) {
|
||||
PreferenceUtil.getInstance(requireContext()).setSongColoredFooters(usePalette)
|
||||
}
|
||||
|
||||
public override fun loadUsePalette(): Boolean {
|
||||
return PreferenceUtil.getInstance(requireContext()).songColoredFooters()
|
||||
}
|
||||
|
||||
public override fun setUsePalette(usePalette: Boolean) {
|
||||
}
|
||||
|
||||
override fun setGridSize(gridSize: Int) {
|
||||
adapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
android:id="@+id/imageContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="156dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
|
@ -21,17 +21,6 @@
|
|||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playSongs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/color_circle_gradient"
|
||||
android:backgroundTint="@color/eighty_percent_black_overlay"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
android:id="@+id/imageContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="256dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
|
@ -21,17 +21,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playSongs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/color_circle_gradient"
|
||||
android:backgroundTint="@color/eighty_percent_black_overlay"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
android:id="@+id/imageContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="196dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
|
@ -22,16 +22,6 @@
|
|||
android:scaleType="centerCrop"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playSongs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/color_circle_gradient"
|
||||
android:backgroundTint="@color/eighty_percent_black_overlay"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
|
|
@ -22,16 +22,6 @@
|
|||
android:scaleType="centerCrop"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playSongs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/color_circle_gradient"
|
||||
android:backgroundTint="@color/eighty_percent_black_overlay"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue