Layoit fixes
This commit is contained in:
parent
636da3daa8
commit
fdb2ab300e
46 changed files with 594 additions and 1346 deletions
|
@ -116,7 +116,6 @@ static def getDate() {
|
|||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation project(':appthemehelper')
|
||||
implementation project(':liboverscroll')
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
|
||||
implementation "androidx.gridlayout:gridlayout:1.0.0"
|
||||
|
@ -152,6 +151,7 @@ dependencies {
|
|||
|
||||
implementation 'com.github.bumptech.glide:glide:3.8.0'
|
||||
implementation 'com.github.bumptech.glide:okhttp3-integration:1.5.0'
|
||||
debugImplementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
|
||||
|
||||
implementation('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar') {
|
||||
transitive = true
|
||||
|
|
|
@ -13,7 +13,6 @@ import androidx.core.app.ActivityCompat
|
|||
import androidx.recyclerview.widget.DefaultItemAnimator
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.MaterialUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
|
@ -38,25 +37,31 @@ import code.name.monkey.retromusic.model.Album
|
|||
import code.name.monkey.retromusic.model.Artist
|
||||
import code.name.monkey.retromusic.mvp.presenter.AlbumDetailsPresenter
|
||||
import code.name.monkey.retromusic.mvp.presenter.AlbumDetailsView
|
||||
import code.name.monkey.retromusic.rest.model.LastFmAlbum
|
||||
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.RetroColorUtil
|
||||
import code.name.monkey.retromusic.util.RetroUtil
|
||||
import com.afollestad.materialcab.MaterialCab
|
||||
import com.bumptech.glide.Glide
|
||||
import kotlinx.android.synthetic.main.activity_album.albumCoverContainer
|
||||
import kotlinx.android.synthetic.main.activity_album.albumText
|
||||
import kotlinx.android.synthetic.main.activity_album.albumTitle
|
||||
import kotlinx.android.synthetic.main.activity_album.container
|
||||
import kotlinx.android.synthetic.main.activity_album.image
|
||||
import kotlinx.android.synthetic.main.activity_album.toolbar
|
||||
import kotlinx.android.synthetic.main.activity_album_content.aboutAlbumText
|
||||
import kotlinx.android.synthetic.main.activity_album_content.aboutAlbumTitle
|
||||
import kotlinx.android.synthetic.main.activity_album_content.listeners
|
||||
import kotlinx.android.synthetic.main.activity_album_content.listenersLabel
|
||||
import kotlinx.android.synthetic.main.activity_album_content.moreRecyclerView
|
||||
import kotlinx.android.synthetic.main.activity_album_content.moreTitle
|
||||
import kotlinx.android.synthetic.main.activity_album_content.playAction
|
||||
import kotlinx.android.synthetic.main.activity_album_content.recyclerView
|
||||
import kotlinx.android.synthetic.main.activity_album_content.scrobbles
|
||||
import kotlinx.android.synthetic.main.activity_album_content.scrobblesLabel
|
||||
import kotlinx.android.synthetic.main.activity_album_content.shuffleAction
|
||||
import kotlinx.android.synthetic.main.activity_album_content.songTitle
|
||||
import me.everything.android.ui.overscroll.OverScrollDecoratorHelper
|
||||
import java.util.ArrayList
|
||||
import javax.inject.Inject
|
||||
import android.util.Pair as UtilPair
|
||||
|
@ -151,6 +156,14 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
shuffleAction.apply {
|
||||
setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(album.songs!!, true) }
|
||||
}
|
||||
|
||||
aboutAlbumText.setOnClickListener {
|
||||
if (aboutAlbumText.maxLines == 4) {
|
||||
aboutAlbumText.maxLines = Integer.MAX_VALUE
|
||||
} else {
|
||||
aboutAlbumText.maxLines = 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
|
@ -161,8 +174,6 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
isNestedScrollingEnabled = false
|
||||
adapter = simpleSongAdapter
|
||||
}
|
||||
|
||||
OverScrollDecoratorHelper.setUpOverScroll(container)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@ -200,6 +211,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
loadAlbumCover()
|
||||
simpleSongAdapter.swapDataSet(album.songs)
|
||||
albumDetailsPresenter.loadMore(album.artistId)
|
||||
albumDetailsPresenter.aboutAlbum(album.artistName!!, album.title!!)
|
||||
}
|
||||
|
||||
override fun moreAlbums(albums: ArrayList<Album>) {
|
||||
|
@ -217,6 +229,24 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
moreRecyclerView.adapter = albumAdapter
|
||||
}
|
||||
|
||||
override fun aboutAlbum(lastFmAlbum: LastFmAlbum) {
|
||||
if (lastFmAlbum.album.wiki != null) {
|
||||
aboutAlbumText.show()
|
||||
aboutAlbumTitle.show()
|
||||
aboutAlbumTitle.text = String.format("About %s", lastFmAlbum.album.name)
|
||||
aboutAlbumText.text = lastFmAlbum.album.wiki.content
|
||||
}
|
||||
if (lastFmAlbum.album.listeners.isNotEmpty()) {
|
||||
listeners.show()
|
||||
listenersLabel.show()
|
||||
scrobbles.show()
|
||||
scrobblesLabel.show()
|
||||
|
||||
listeners.text = RetroUtil.formatValue(lastFmAlbum.album.listeners.toFloat())
|
||||
scrobbles.text = RetroUtil.formatValue(lastFmAlbum.album.playcount.toFloat())
|
||||
}
|
||||
}
|
||||
|
||||
override fun loadArtistImage(artist: Artist) {
|
||||
ArtistGlideRequest.Builder.from(Glide.with(this), artist).generatePalette(this).build()
|
||||
.dontAnimate().dontTransform().into(object : RetroMusicColoredTarget(artistImage) {
|
||||
|
@ -239,11 +269,14 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
}
|
||||
|
||||
private fun setColors(color: Int) {
|
||||
val themeColor = if (PreferenceUtil.getInstance(this).adaptiveColor) color.ripAlpha()
|
||||
else ThemeStore.accentColor(this)
|
||||
val textColor = if (PreferenceUtil.getInstance(this).adaptiveColor)
|
||||
color.ripAlpha()
|
||||
else
|
||||
ATHUtil.resolveColor(this, android.R.attr.textColorPrimary)
|
||||
|
||||
songTitle.setTextColor(themeColor)
|
||||
moreTitle.setTextColor(themeColor)
|
||||
songTitle.setTextColor(textColor)
|
||||
moreTitle.setTextColor(textColor)
|
||||
aboutAlbumTitle.setTextColor(textColor)
|
||||
|
||||
val buttonColor = if (PreferenceUtil.getInstance(this).adaptiveColor)
|
||||
color.ripAlpha()
|
||||
|
|
|
@ -15,17 +15,16 @@ import androidx.core.app.ActivityCompat
|
|||
import androidx.recyclerview.widget.DefaultItemAnimator
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.MaterialUtil
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
|
||||
import code.name.monkey.retromusic.adapter.album.AlbumAdapter
|
||||
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
|
||||
|
@ -35,29 +34,30 @@ import code.name.monkey.retromusic.mvp.presenter.ArtistDetailsPresenter
|
|||
import code.name.monkey.retromusic.mvp.presenter.ArtistDetailsView
|
||||
import code.name.monkey.retromusic.rest.model.LastFmArtist
|
||||
import code.name.monkey.retromusic.util.CustomArtistImageUtil
|
||||
import code.name.monkey.retromusic.util.DensityUtil
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.RetroColorUtil
|
||||
import code.name.monkey.retromusic.util.RetroUtil
|
||||
import com.afollestad.materialcab.MaterialCab
|
||||
import com.bumptech.glide.Glide
|
||||
import kotlinx.android.synthetic.main.activity_album.container
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.albumRecyclerView
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.albumTitle
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.biographyText
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.biographyTitle
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.listeners
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.listenersLabel
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.playAction
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.recyclerView
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.scrobbles
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.scrobblesLabel
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.shuffleAction
|
||||
import kotlinx.android.synthetic.main.activity_artist_content.songTitle
|
||||
import kotlinx.android.synthetic.main.activity_artist_details.artistCoverContainer
|
||||
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.imageContainer
|
||||
import kotlinx.android.synthetic.main.activity_artist_details.text
|
||||
import kotlinx.android.synthetic.main.activity_artist_details.toolbar
|
||||
import me.everything.android.ui.overscroll.OverScrollDecoratorHelper
|
||||
import java.text.DecimalFormat
|
||||
import java.util.Locale
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -85,7 +85,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
private var biography: Spanned? = null
|
||||
private lateinit var artist: Artist
|
||||
private lateinit var songAdapter: SimpleSongAdapter
|
||||
private lateinit var albumAdapter: AlbumAdapter
|
||||
private lateinit var albumAdapter: HorizontalAlbumAdapter
|
||||
private var forceDownload: Boolean = false
|
||||
|
||||
override fun createContentView(): View {
|
||||
|
@ -101,7 +101,6 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
slide.excludeTarget(R.id.status_bar, true)
|
||||
slide.excludeTarget(android.R.id.statusBarBackground, true)
|
||||
slide.excludeTarget(android.R.id.navigationBarBackground, true)
|
||||
|
||||
window.enterTransition = slide
|
||||
}
|
||||
|
||||
|
@ -131,7 +130,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
windowEnterTransition()
|
||||
ActivityCompat.postponeEnterTransition(this)
|
||||
|
||||
setUpViews()
|
||||
setupRecyclerView()
|
||||
|
||||
playAction.apply {
|
||||
setOnClickListener { MusicPlayerRemote.openQueue(artist.songs, 0, true) }
|
||||
|
@ -154,19 +153,6 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
artistDetailsPresenter.detachView()
|
||||
}
|
||||
|
||||
private fun setUpViews() {
|
||||
setupRecyclerView()
|
||||
setupContainerHeight()
|
||||
}
|
||||
|
||||
private fun setupContainerHeight() {
|
||||
imageContainer?.let {
|
||||
val params = it.layoutParams
|
||||
params.width = DensityUtil.getScreenHeight(this) / 2
|
||||
it.layoutParams = params
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
albumAdapter = HorizontalAlbumAdapter(this, ArrayList(), false, null)
|
||||
albumRecyclerView.apply {
|
||||
|
@ -180,7 +166,6 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
layoutManager = LinearLayoutManager(this.context)
|
||||
adapter = songAdapter
|
||||
}
|
||||
OverScrollDecoratorHelper.setUpOverScroll(container)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
|
@ -247,6 +232,16 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
Html.fromHtml(bioContent)
|
||||
}
|
||||
biographyText.text = biography
|
||||
|
||||
if (lastFmArtist.artist.stats.listeners.isNotEmpty()) {
|
||||
listeners.show()
|
||||
listenersLabel.show()
|
||||
scrobbles.show()
|
||||
scrobblesLabel.show()
|
||||
|
||||
listeners.text = RetroUtil.formatValue(lastFmArtist.artist.stats.listeners.toFloat())
|
||||
scrobbles.text = RetroUtil.formatValue(lastFmArtist.artist.stats.playcount.toFloat())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,7 +266,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
val textColor = if (PreferenceUtil.getInstance(this).adaptiveColor)
|
||||
color.ripAlpha()
|
||||
else
|
||||
ThemeStore.accentColor(this)
|
||||
ATHUtil.resolveColor(this, android.R.attr.textColorPrimary)
|
||||
|
||||
albumTitle.setTextColor(textColor)
|
||||
songTitle.setTextColor(textColor)
|
||||
|
@ -292,6 +287,18 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView,
|
|||
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)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.io.BufferedReader;
|
|||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import me.everything.android.ui.overscroll.OverScrollDecoratorHelper;
|
||||
|
||||
public class WhatsNewActivity extends AbsBaseActivity {
|
||||
|
||||
|
@ -52,7 +51,6 @@ public class WhatsNewActivity extends AbsBaseActivity {
|
|||
toolbar.setNavigationOnClickListener(v -> onBackPressed());
|
||||
ToolbarContentTintHelper.colorBackButton(toolbar);
|
||||
NestedScrollView nestedScrollView = findViewById(R.id.container);
|
||||
OverScrollDecoratorHelper.setUpOverScroll(nestedScrollView);
|
||||
|
||||
try {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
|
|
@ -4,8 +4,7 @@ import android.graphics.drawable.Drawable
|
|||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
|
||||
import code.name.monkey.retromusic.glide.SongGlideRequest
|
||||
import code.name.monkey.retromusic.helper.HorizontalAdapterHelper
|
||||
|
@ -31,13 +30,12 @@ class HorizontalAlbumAdapter(
|
|||
}
|
||||
|
||||
override fun setColors(color: Int, holder: ViewHolder) {
|
||||
holder.title?.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color)))
|
||||
holder.text?.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color)))
|
||||
holder.title?.setTextColor(ATHUtil.resolveColor(activity, android.R.attr.textColorPrimary))
|
||||
holder.text?.setTextColor(ATHUtil.resolveColor(activity, android.R.attr.textColorSecondary))
|
||||
}
|
||||
|
||||
override fun loadAlbumCover(album: Album, holder: ViewHolder) {
|
||||
if (holder.image == null) return
|
||||
|
||||
SongGlideRequest.Builder.from(Glide.with(activity), album.safeGetFirstSong())
|
||||
.checkIgnoreMediaStore(activity).generatePalette(activity).build()
|
||||
.into(object : RetroMusicColoredTarget(holder.image!!) {
|
||||
|
|
|
@ -44,10 +44,8 @@ import kotlinx.android.synthetic.main.fragment_banner_home.bannerImage
|
|||
import kotlinx.android.synthetic.main.fragment_banner_home.titleWelcome
|
||||
import kotlinx.android.synthetic.main.fragment_banner_home.toolbarContainer
|
||||
import kotlinx.android.synthetic.main.fragment_banner_home.userImage
|
||||
import kotlinx.android.synthetic.main.fragment_home.container
|
||||
import kotlinx.android.synthetic.main.home_content.emptyContainer
|
||||
import kotlinx.android.synthetic.main.home_content.recyclerView
|
||||
import me.everything.android.ui.overscroll.OverScrollDecoratorHelper
|
||||
import java.io.File
|
||||
import java.util.ArrayList
|
||||
import java.util.Calendar
|
||||
|
@ -144,8 +142,6 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
}
|
||||
homePresenter.attachView(this)
|
||||
homePresenter.loadSections()
|
||||
|
||||
OverScrollDecoratorHelper.setUpOverScroll(container)
|
||||
}
|
||||
|
||||
private fun setupToolbar() {
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
|
||||
package code.name.monkey.retromusic.mvp.presenter
|
||||
|
||||
import code.name.monkey.retromusic.Result
|
||||
import code.name.monkey.retromusic.Result.Success
|
||||
import code.name.monkey.retromusic.model.Album
|
||||
import code.name.monkey.retromusic.model.Artist
|
||||
import code.name.monkey.retromusic.mvp.Presenter
|
||||
import code.name.monkey.retromusic.mvp.PresenterImpl
|
||||
import code.name.monkey.retromusic.providers.interfaces.Repository
|
||||
import code.name.monkey.retromusic.rest.model.LastFmAlbum
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
|
@ -40,13 +40,18 @@ interface AlbumDetailsView {
|
|||
|
||||
fun loadArtistImage(artist: Artist)
|
||||
|
||||
fun moreAlbums(albums: ArrayList<Album>)
|
||||
fun moreAlbums(
|
||||
albums: ArrayList<Album>
|
||||
)
|
||||
|
||||
fun aboutAlbum(lastFmAlbum: LastFmAlbum)
|
||||
}
|
||||
|
||||
interface AlbumDetailsPresenter : Presenter<AlbumDetailsView> {
|
||||
fun loadAlbum(albumId: Int)
|
||||
|
||||
fun loadMore(artistId: Int)
|
||||
fun aboutAlbum(artist: String, album: String)
|
||||
|
||||
class AlbumDetailsPresenterImpl @Inject constructor(
|
||||
private val repository: Repository
|
||||
|
@ -59,7 +64,16 @@ interface AlbumDetailsPresenter : Presenter<AlbumDetailsView> {
|
|||
launch {
|
||||
when (val result = repository.artistById(artistId)) {
|
||||
is Success -> withContext(Dispatchers.Main) { showArtistImage(result.data) }
|
||||
is Result.Error -> withContext(Dispatchers.Main) {}
|
||||
is Error -> withContext(Dispatchers.Main) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun aboutAlbum(artist: String, album: String) {
|
||||
launch {
|
||||
when (val result = repository.albumInfo(artist, album)) {
|
||||
is Success -> withContext(Dispatchers.Main) { view.aboutAlbum(result.data) }
|
||||
is Error -> withContext(Dispatchers.Main) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import kotlin.coroutines.CoroutineContext
|
|||
* Created by hemanths on 20/08/17.
|
||||
*/
|
||||
interface ArtistDetailsView : BaseView {
|
||||
|
||||
fun artist(artist: Artist)
|
||||
fun artistInfo(lastFmArtist: LastFmArtist?)
|
||||
fun complete()
|
||||
|
@ -44,12 +45,15 @@ interface ArtistDetailsPresenter : Presenter<ArtistDetailsView> {
|
|||
fun loadArtist(artistId: Int)
|
||||
|
||||
fun loadBiography(
|
||||
name: String, lang: String? = Locale.getDefault().language, cache: String?
|
||||
name: String,
|
||||
lang: String? = Locale.getDefault().language,
|
||||
cache: String?
|
||||
)
|
||||
|
||||
class ArtistDetailsPresenterImpl @Inject constructor(
|
||||
private val repository: Repository
|
||||
) : PresenterImpl<ArtistDetailsView>(), ArtistDetailsPresenter, CoroutineScope {
|
||||
|
||||
override val coroutineContext: CoroutineContext
|
||||
get() = Dispatchers.IO + job
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import code.name.monkey.retromusic.model.Playlist
|
|||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.providers.interfaces.Repository
|
||||
import code.name.monkey.retromusic.rest.LastFMRestClient
|
||||
import code.name.monkey.retromusic.rest.model.LastFmAlbum
|
||||
import code.name.monkey.retromusic.rest.model.LastFmArtist
|
||||
import java.io.IOException
|
||||
import javax.inject.Inject
|
||||
|
@ -278,6 +279,16 @@ class RepositoryImpl @Inject constructor(private val context: Context) : Reposit
|
|||
|
||||
)
|
||||
|
||||
override suspend fun albumInfo(
|
||||
artist: String,
|
||||
album: String
|
||||
): Result<LastFmAlbum> = safeApiCall(
|
||||
call = {
|
||||
Success(LastFMRestClient(context).apiService.albumInfo(artist, album))
|
||||
},
|
||||
errorMessage = "Error"
|
||||
)
|
||||
|
||||
override suspend fun artistById(artistId: Int): Result<Artist> {
|
||||
return try {
|
||||
val artist = ArtistLoader.getArtist(context, artistId)
|
||||
|
|
|
@ -15,7 +15,13 @@
|
|||
package code.name.monkey.retromusic.providers.interfaces
|
||||
|
||||
import code.name.monkey.retromusic.Result
|
||||
import code.name.monkey.retromusic.model.*
|
||||
import code.name.monkey.retromusic.model.Album
|
||||
import code.name.monkey.retromusic.model.Artist
|
||||
import code.name.monkey.retromusic.model.Genre
|
||||
import code.name.monkey.retromusic.model.Home
|
||||
import code.name.monkey.retromusic.model.Playlist
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.rest.model.LastFmAlbum
|
||||
import code.name.monkey.retromusic.rest.model.LastFmArtist
|
||||
|
||||
/**
|
||||
|
@ -54,5 +60,7 @@ interface Repository {
|
|||
|
||||
suspend fun artistInfo(name: String, lang: String?, cache: String?): Result<LastFmArtist>
|
||||
|
||||
suspend fun albumInfo(artist: String, album: String): Result<LastFmAlbum>
|
||||
|
||||
suspend fun artistById(artistId: Int): Result<Artist>
|
||||
}
|
|
@ -15,20 +15,18 @@
|
|||
package code.name.monkey.retromusic.rest;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import code.name.monkey.retromusic.rest.service.LastFMService;
|
||||
import java.io.File;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import code.name.monkey.retromusic.rest.service.LastFMService;
|
||||
import okhttp3.Cache;
|
||||
import okhttp3.Call;
|
||||
import okhttp3.ConnectionPool;
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.logging.HttpLoggingInterceptor;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
|
@ -53,13 +51,9 @@ public class LastFMRestClient {
|
|||
apiService = restAdapter.create(LastFMService.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static Cache createDefaultCache(Context context) {
|
||||
File cacheDir = new File(context.getCacheDir().getAbsolutePath(), "/okhttp-lastfm/");
|
||||
if (cacheDir.mkdirs() || cacheDir.isDirectory()) {
|
||||
return new Cache(cacheDir, 1024 * 1024 * 10);
|
||||
}
|
||||
return null;
|
||||
@NonNull
|
||||
public LastFMService getApiService() {
|
||||
return apiService;
|
||||
}
|
||||
|
||||
private static Interceptor createCacheControlInterceptor() {
|
||||
|
@ -71,6 +65,15 @@ public class LastFMRestClient {
|
|||
};
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static Cache createDefaultCache(Context context) {
|
||||
File cacheDir = new File(context.getCacheDir().getAbsolutePath(), "/okhttp-lastfm/");
|
||||
if (cacheDir.mkdirs() || cacheDir.isDirectory()) {
|
||||
return new Cache(cacheDir, 1024 * 1024 * 10);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private static OkHttpClient.Builder createDefaultOkHttpClientBuilder(@NonNull Context context) {
|
||||
return new OkHttpClient.Builder()
|
||||
|
@ -80,11 +83,14 @@ public class LastFMRestClient {
|
|||
.writeTimeout(1, TimeUnit.MINUTES) // write timeout
|
||||
.readTimeout(1, TimeUnit.MINUTES) // read timeout
|
||||
.cache(createDefaultCache(context))
|
||||
.addInterceptor(createCacheControlInterceptor());
|
||||
.addInterceptor(createCacheControlInterceptor())
|
||||
.addInterceptor(createLogInterceptor());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public LastFMService getApiService() {
|
||||
return apiService;
|
||||
private static Interceptor createLogInterceptor() {
|
||||
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
|
||||
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
|
||||
return interceptor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,65 +16,22 @@ package code.name.monkey.retromusic.rest.model;
|
|||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LastFmAlbum {
|
||||
@Expose
|
||||
private Album album;
|
||||
|
||||
public Album getAlbum() {
|
||||
return album;
|
||||
}
|
||||
|
||||
public void setAlbum(Album album) {
|
||||
this.album = album;
|
||||
}
|
||||
|
||||
public static class Album {
|
||||
@Expose
|
||||
private Tags tags;
|
||||
@Expose
|
||||
private List<Image> image = new ArrayList<>();
|
||||
@Expose
|
||||
private Wiki wiki;
|
||||
|
||||
public List<Image> getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(List<Image> image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public Wiki getWiki() {
|
||||
return wiki;
|
||||
}
|
||||
|
||||
public void setWiki(Wiki wiki) {
|
||||
this.wiki = wiki;
|
||||
}
|
||||
|
||||
public Tags getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public static class Image {
|
||||
|
||||
@SerializedName("#text")
|
||||
@Expose
|
||||
private String Text;
|
||||
|
||||
@Expose
|
||||
private String size;
|
||||
|
||||
public String getText() {
|
||||
return Text;
|
||||
}
|
||||
|
||||
public void setText(String Text) {
|
||||
this.Text = Text;
|
||||
}
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
@ -82,9 +39,18 @@ public class LastFmAlbum {
|
|||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return Text;
|
||||
}
|
||||
|
||||
public void setText(String Text) {
|
||||
this.Text = Text;
|
||||
}
|
||||
}
|
||||
|
||||
public class Tags {
|
||||
|
||||
@Expose
|
||||
private List<Tag> tag = null;
|
||||
|
||||
|
@ -94,6 +60,7 @@ public class LastFmAlbum {
|
|||
}
|
||||
|
||||
public class Tag {
|
||||
|
||||
@Expose
|
||||
private String name;
|
||||
|
||||
|
@ -110,9 +77,13 @@ public class LastFmAlbum {
|
|||
}
|
||||
|
||||
public class Wiki {
|
||||
|
||||
@Expose
|
||||
private String content;
|
||||
|
||||
@Expose
|
||||
private String published;
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
@ -120,6 +91,87 @@ public class LastFmAlbum {
|
|||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getPublished() {
|
||||
return published;
|
||||
}
|
||||
|
||||
public void setPublished(final String published) {
|
||||
this.published = published;
|
||||
}
|
||||
}
|
||||
|
||||
@Expose
|
||||
public String listeners;
|
||||
|
||||
@Expose
|
||||
public String playcount;
|
||||
|
||||
@Expose
|
||||
private List<Image> image = new ArrayList<>();
|
||||
|
||||
@Expose
|
||||
private String name;
|
||||
|
||||
@Expose
|
||||
private Tags tags;
|
||||
|
||||
@Expose
|
||||
private Wiki wiki;
|
||||
|
||||
public List<Image> getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(List<Image> image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getListeners() {
|
||||
return listeners;
|
||||
}
|
||||
|
||||
public void setListeners(final String listeners) {
|
||||
this.listeners = listeners;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPlaycount() {
|
||||
return playcount;
|
||||
}
|
||||
|
||||
public void setPlaycount(final String playcount) {
|
||||
this.playcount = playcount;
|
||||
}
|
||||
|
||||
public Tags getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public Wiki getWiki() {
|
||||
return wiki;
|
||||
}
|
||||
|
||||
public void setWiki(Wiki wiki) {
|
||||
this.wiki = wiki;
|
||||
}
|
||||
}
|
||||
|
||||
@Expose
|
||||
private Album album;
|
||||
|
||||
public Album getAlbum() {
|
||||
return album;
|
||||
}
|
||||
|
||||
public void setAlbum(Album album) {
|
||||
this.album = album;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,45 +16,66 @@ package code.name.monkey.retromusic.rest.model;
|
|||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LastFmArtist {
|
||||
@Expose
|
||||
private Artist artist;
|
||||
|
||||
public Artist getArtist() {
|
||||
return artist;
|
||||
}
|
||||
|
||||
public void setArtist(Artist artist) {
|
||||
this.artist = artist;
|
||||
}
|
||||
|
||||
public static class Artist {
|
||||
|
||||
public static class Image {
|
||||
|
||||
@SerializedName("#text")
|
||||
@Expose
|
||||
private List<Image> image = new ArrayList<>();
|
||||
private String Text;
|
||||
|
||||
@Expose
|
||||
private Bio bio;
|
||||
private String size;
|
||||
|
||||
public List<Image> getImage() {
|
||||
return image;
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setImage(List<Image> image) {
|
||||
this.image = image;
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public Bio getBio() {
|
||||
return bio;
|
||||
public String getText() {
|
||||
return Text;
|
||||
}
|
||||
|
||||
public void setBio(Bio bio) {
|
||||
this.bio = bio;
|
||||
public void setText(String Text) {
|
||||
this.Text = Text;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Stats {
|
||||
|
||||
@Expose
|
||||
public String listeners;
|
||||
|
||||
@Expose
|
||||
public String playcount;
|
||||
|
||||
public String getListeners() {
|
||||
return listeners;
|
||||
}
|
||||
|
||||
public void setListeners(final String listeners) {
|
||||
this.listeners = listeners;
|
||||
}
|
||||
|
||||
public String getPlaycount() {
|
||||
return playcount;
|
||||
}
|
||||
|
||||
public void setPlaycount(final String playcount) {
|
||||
this.playcount = playcount;
|
||||
}
|
||||
}
|
||||
|
||||
public class Bio {
|
||||
|
||||
@Expose
|
||||
private String content;
|
||||
|
||||
|
@ -67,28 +88,40 @@ public class LastFmArtist {
|
|||
}
|
||||
}
|
||||
|
||||
public static class Image {
|
||||
@SerializedName("#text")
|
||||
@Expose
|
||||
private String Text;
|
||||
public Stats stats;
|
||||
|
||||
@Expose
|
||||
private String size;
|
||||
private Bio bio;
|
||||
|
||||
public String getText() {
|
||||
return Text;
|
||||
@Expose
|
||||
private List<Image> image = new ArrayList<>();
|
||||
|
||||
public Bio getBio() {
|
||||
return bio;
|
||||
}
|
||||
|
||||
public void setText(String Text) {
|
||||
this.Text = Text;
|
||||
public void setBio(Bio bio) {
|
||||
this.bio = bio;
|
||||
}
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
public List<Image> getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
public void setImage(List<Image> image) {
|
||||
this.image = image;
|
||||
}
|
||||
}
|
||||
|
||||
@Expose
|
||||
private Artist artist;
|
||||
|
||||
public Artist getArtist() {
|
||||
return artist;
|
||||
}
|
||||
|
||||
public void setArtist(Artist artist) {
|
||||
this.artist = artist;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
package code.name.monkey.retromusic.rest.service
|
||||
|
||||
import code.name.monkey.retromusic.rest.model.LastFmAlbum
|
||||
import code.name.monkey.retromusic.rest.model.LastFmArtist
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Header
|
||||
|
@ -24,14 +25,22 @@ import retrofit2.http.Query
|
|||
*/
|
||||
|
||||
interface LastFMService {
|
||||
|
||||
companion object {
|
||||
const val API_KEY = "c679c8d3efa84613dc7dcb2e8d42da4c"
|
||||
const val BASE_QUERY_PARAMETERS = "?format=json&autocorrect=1&api_key=$API_KEY"
|
||||
}
|
||||
|
||||
@GET("$BASE_QUERY_PARAMETERS&method=artist.getinfo")
|
||||
suspend fun artistInfo(@Query("artist") artistName: String,
|
||||
suspend fun artistInfo(
|
||||
@Query("artist") artistName: String,
|
||||
@Query("lang") language: String?,
|
||||
@Header("Cache-Control") cacheControl: String?
|
||||
): LastFmArtist
|
||||
|
||||
@GET("$BASE_QUERY_PARAMETERS&method=album.getinfo")
|
||||
suspend fun albumInfo(
|
||||
@Query("artist") artistName: String,
|
||||
@Query("album") albumName: String
|
||||
): LastFmAlbum
|
||||
}
|
|
@ -42,6 +42,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
|
||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||
import code.name.monkey.retromusic.App;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
public class RetroUtil {
|
||||
|
||||
|
@ -65,6 +66,17 @@ public class RetroUtil {
|
|||
return bitmap;
|
||||
}
|
||||
|
||||
public static String formatValue(float value) {
|
||||
String arr[] = {"", "K", "M", "B", "T", "P", "E"};
|
||||
int index = 0;
|
||||
while ((value / 1000) >= 1) {
|
||||
value = value / 1000;
|
||||
index++;
|
||||
}
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#.##");
|
||||
return String.format("%s %s", decimalFormat.format(value), arr[index]);
|
||||
}
|
||||
|
||||
public static float frequencyCount(int frequency) {
|
||||
return (float) (frequency / 1000.0);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textAppearance="@style/TextViewHeadline4"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Album name" />
|
||||
|
@ -126,7 +126,6 @@
|
|||
|
||||
<include layout="@layout/activity_album_content" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -89,7 +89,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textAppearance="@style/TextViewHeadline4"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Title" />
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
app:title="@string/search_hint"
|
||||
app:title="@string/action_search"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
|
|
@ -45,10 +45,6 @@
|
|||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_collapseMode="pin"
|
||||
|
@ -62,7 +58,7 @@
|
|||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
app:title="@string/search_hint"
|
||||
app:title="@string/action_search"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
|
|
@ -1,148 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:transitionName="@string/transition_album_art">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/artistImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[12]" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:titleEnabled="false">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="320dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/cab_stub"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp" />
|
||||
</FrameLayout>
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:layout_marginStart="128dp"
|
||||
android:layout_marginEnd="128dp"
|
||||
android:background="?attr/colorSurface"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/contentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
app:cardElevation="8dp"
|
||||
app:shapeAppearanceOverlay="@style/TopCornerCardView">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/albumCoverContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[13]" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/albumTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextViewHeadline3"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Album name" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/albumText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Album details" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/activity_album_content" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:background="@drawable/shadow_down_strong" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -1,116 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:transitionName="@string/transition_artist_image"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:titleEnabled="false">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="parallax" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="pin">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/cab_stub"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp" />
|
||||
</FrameLayout>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:layout_marginStart="128dp"
|
||||
android:layout_marginEnd="128dp"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/contentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="?attr/colorSurface"
|
||||
app:cardElevation="8dp"
|
||||
app:shapeAppearanceOverlay="@style/TopCornerCardView">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/artistTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextViewHeadline4"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Title" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:paddingTop="4dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Title" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/activity_artist_content" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -1,136 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2019 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_fragment_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:contentScrim="@android:color/transparent"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:statusBarScrim="@color/md_black_1000"
|
||||
app:titleEnabled="false">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="258dp"
|
||||
app:layout_collapseMode="parallax">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bannerImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_collapseMode="parallax"
|
||||
tools:background="@color/md_red_400"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[9]" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/shadow_up_full_theme"
|
||||
android:backgroundTint="?colorPrimary" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_collapseMode="pin"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardBackgroundColor="@android:color/transparent"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="6dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_collapseMode="pin"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
android:background="?colorSurface"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
app:title="@string/search_hint"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:behavior_overlapTop="52dp"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
app:cardBackgroundColor="?colorPrimary"
|
||||
app:cardElevation="8dp"
|
||||
app:shapeAppearanceOverlay="@style/TopCornerCardView">
|
||||
|
||||
<include layout="@layout/home_content" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
|
@ -1,133 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2019 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_fragment_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_collapseMode="pin"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
android:background="?colorSurface"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
app:title="@string/search_hint"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<code.name.monkey.retromusic.views.CircularImageView
|
||||
android:id="@+id/userImage"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:civ_border="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/welcome"
|
||||
app:layout_constraintStart_toEndOf="@+id/userImage"
|
||||
app:layout_constraintTop_toTopOf="@+id/userImage"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/titleWelcome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:padding="0dp"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/userImage"
|
||||
app:layout_constraintStart_toEndOf="@+id/userImage"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<include
|
||||
layout="@layout/home_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/titleWelcome" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
|
@ -1,159 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:transitionName="@string/transition_album_art">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/artistImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[15]" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsingToolbarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:titleEnabled="false">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="320dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/cab_stub"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp" />
|
||||
</FrameLayout>
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:layout_marginStart="96dp"
|
||||
android:layout_marginEnd="96dp"
|
||||
android:background="?attr/colorSurface"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/contentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
app:cardElevation="8dp"
|
||||
app:shapeAppearanceOverlay="@style/TopCornerCardView">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:layout_width="196dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/albumCoverContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[14]" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/albumTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextViewHeadline4"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Album name" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/albumText"
|
||||
style="@style/TextViewHeadline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:freezesText="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingTop="4dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Album details" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/activity_album_content" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:background="@drawable/shadow_down_strong" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -1,116 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:transitionName="@string/transition_artist_image"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsingToolbarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:titleEnabled="false">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="parallax" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="pin">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/cab_stub"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp" />
|
||||
</FrameLayout>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:layout_marginStart="96dp"
|
||||
android:layout_marginEnd="96dp"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/contentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="?attr/colorSurface"
|
||||
app:cardElevation="8dp"
|
||||
app:shapeAppearanceOverlay="@style/TopCornerCardView">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:elevation="@dimen/card_elevation"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/artistTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextViewHeadline4"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Title" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="Title" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/activity_artist_content" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/player_album_art_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/player_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:ignore="ContentDescription,UnusedAttribute"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[2]" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shadow_up_edited" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
|
@ -1,133 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2019 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:contentScrim="@android:color/transparent"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:statusBarScrim="@color/md_black_1000"
|
||||
app:titleEnabled="false">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="228dp"
|
||||
app:layout_collapseMode="parallax">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bannerImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_collapseMode="parallax"
|
||||
tools:background="@color/md_red_400"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[9]" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/shadow_up_full_theme"
|
||||
android:backgroundTint="?colorPrimary" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_collapseMode="pin"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardBackgroundColor="@android:color/transparent"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="6dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_collapseMode="pin"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
android:background="?colorSurface"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
app:title="@string/search_hint"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:behavior_overlapTop="52dp"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
app:cardBackgroundColor="?colorPrimary"
|
||||
app:cardElevation="8dp"
|
||||
app:shapeAppearanceOverlay="@style/TopCornerCardView">
|
||||
|
||||
<include layout="@layout/home_content" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
|
@ -1,134 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2019 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_fragment_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/coordinator_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_collapseMode="pin"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
android:background="?colorSurface"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
app:title="@string/search_hint"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<code.name.monkey.retromusic.views.CircularImageView
|
||||
android:id="@+id/userImage"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:civ_border="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/welcome"
|
||||
app:layout_constraintStart_toEndOf="@+id/userImage"
|
||||
app:layout_constraintTop_toTopOf="@+id/userImage"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/titleWelcome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:padding="0dp"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/userImage"
|
||||
app:layout_constraintStart_toEndOf="@+id/userImage"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<include
|
||||
layout="@layout/home_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/titleWelcome" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
|
@ -24,7 +24,7 @@
|
|||
android:layout_margin="16dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_up_24dp"
|
||||
app:tint="?colorOnSurface"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:tint="?colorOnSurface" />
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?colorOnSurface"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="Song name and details" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
@ -54,7 +54,7 @@
|
|||
android:background="?roundSelector"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
|
||||
app:tint="?colorOnSurface"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:tint="@color/black_color" />
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
|||
android:background="?roundSelector"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@drawable/ic_pause_white_24dp"
|
||||
app:tint="?colorOnSurface"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:tint="?colorOnSurface" />
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
|||
android:background="?roundSelector"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
||||
app:tint="?colorOnSurface"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:tint="?colorOnSurface" />
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -30,5 +30,6 @@
|
|||
android:maxLines="2"
|
||||
android:paddingTop="12dp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
|
@ -8,7 +8,7 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareCardView
|
||||
android:layout_width="156dp"
|
||||
android:layout_width="196dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/albumCoverContainer"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/albumTitle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -96,7 +95,8 @@
|
|||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="3"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textAppearance="@style/TextViewHeadline4"
|
||||
android:textStyle="bold"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
android:id="@+id/playAction"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="@dimen/button_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/button_margin_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="@dimen/button_margin_horizontal"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/action_play_all"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:backgroundTint="?attr/colorSurface"
|
||||
|
@ -27,10 +27,10 @@
|
|||
android:id="@+id/shuffleAction"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="@dimen/button_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/button_margin_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="@dimen/button_margin_horizontal"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/shuffle"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:backgroundTint="?attr/colorSurface"
|
||||
|
@ -44,10 +44,12 @@
|
|||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/songs"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/playAction" />
|
||||
|
@ -66,11 +68,16 @@
|
|||
android:id="@+id/moreTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/songs"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/recyclerView"
|
||||
tools:text="More by Hemanth"
|
||||
tools:text="More by Artist"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -88,10 +95,104 @@
|
|||
tools:listitem="@layout/item_album_card"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/aboutAlbumTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:text="@string/songs"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/moreRecyclerView"
|
||||
tools:text="About Album"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/aboutAlbumText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:maxLines="4"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="@style/TextViewBody1"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/aboutAlbumTitle"
|
||||
tools:text="@tools:sample/lorem/random"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/listenersLabel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/listeners_label"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/aboutAlbumText"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/scrobblesLabel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/scrobbles_label"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/listenersLabel"
|
||||
app:layout_constraintTop_toBottomOf="@id/aboutAlbumText"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/listeners"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewBody1"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="@id/listenersLabel"
|
||||
app:layout_constraintStart_toStartOf="@id/listenersLabel"
|
||||
app:layout_constraintTop_toBottomOf="@id/listenersLabel"
|
||||
tools:text="100000"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/scrobbles"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewBody1"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="@id/scrobblesLabel"
|
||||
app:layout_constraintStart_toStartOf="@id/scrobblesLabel"
|
||||
app:layout_constraintTop_toBottomOf="@id/scrobblesLabel"
|
||||
tools:text="100000"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/moreRecyclerView" />
|
||||
app:layout_constraintTop_toBottomOf="@id/listeners" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -38,14 +38,70 @@
|
|||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/biographyTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:text="@string/biography"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/albumTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:text="@string/albums"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textStyle="bold"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/playAction"
|
||||
app:layout_constraintTop_toBottomOf="@id/playAction" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/albumRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:barrierDirection="bottom"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/albumTitle"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_album_card"
|
||||
tools:spanCount="3" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/songs"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textStyle="bold"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/albumRecyclerView" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/songTitle"
|
||||
tools:listitem="@layout/item_song"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/biographyTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/biography"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/recyclerView"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/biographyText"
|
||||
style="@style/TextAppearance.MaterialComponents.Body1"
|
||||
|
@ -56,49 +112,78 @@
|
|||
android:maxLines="4"
|
||||
android:padding="16dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/biographyTitle"
|
||||
tools:text="@string/bug_report_summary"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/albumTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:text="@string/albums"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/biographyText" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/albumRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/listenersLabel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/listeners_label"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/albumTitle"
|
||||
tools:itemCount="3"
|
||||
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
tools:listitem="@layout/item_album_card"
|
||||
tools:spanCount="3" />
|
||||
app:layout_constraintTop_toBottomOf="@id/biographyText"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:text="@string/songs"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/albumRecyclerView" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/scrobblesLabel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/songTitle"
|
||||
tools:listitem="@layout/item_song" />
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/scrobbles_label"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/listenersLabel"
|
||||
app:layout_constraintTop_toBottomOf="@id/biographyText"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/listeners"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewBody2"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="@id/listenersLabel"
|
||||
app:layout_constraintStart_toStartOf="@id/listenersLabel"
|
||||
app:layout_constraintTop_toBottomOf="@id/listenersLabel"
|
||||
tools:text="100000"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/scrobbles"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextViewBody2"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="@id/scrobblesLabel"
|
||||
app:layout_constraintStart_toStartOf="@id/scrobblesLabel"
|
||||
app:layout_constraintTop_toBottomOf="@id/scrobblesLabel"
|
||||
tools:text="100000"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/recyclerView" />
|
||||
app:layout_constraintTop_toBottomOf="@id/listeners" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -84,7 +84,8 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textAppearance="@style/TextViewHeadline4"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -32,10 +32,6 @@
|
|||
android:id="@+id/searchContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardBackgroundColor="?colorSurface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -60,7 +58,7 @@
|
|||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
app:title="@string/search_hint"
|
||||
app:title="@string/action_search"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
|
|
@ -44,10 +44,6 @@
|
|||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardBackgroundColor="?colorSurface"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
|
@ -62,7 +58,7 @@
|
|||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
app:title="@string/search_hint"
|
||||
app:title="@string/action_search"
|
||||
app:titleMarginStart="0dp"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
|
|
@ -47,10 +47,6 @@
|
|||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="112dp"
|
||||
android:layout_height="156dp"
|
||||
android:layout_margin="4dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareCardView
|
||||
android:layout_width="136dp"
|
||||
android:layout_width="156dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:orientation="vertical"
|
||||
|
@ -22,7 +22,6 @@
|
|||
android:scaleType="centerCrop"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
|
||||
|
||||
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
@ -33,6 +32,5 @@
|
|||
android:maxLines="1"
|
||||
android:padding="8dp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="Song name" />
|
||||
</LinearLayout>
|
|
@ -4,6 +4,8 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/item_song_height"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:background="?rectSelector"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
@ -24,8 +26,6 @@
|
|||
android:id="@+id/imageText"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minHeight="40dp"
|
||||
|
|
|
@ -4,5 +4,4 @@
|
|||
<dimen name="toolbar_margin_vertical">16dp</dimen>
|
||||
<dimen name="item_song_height">64dp</dimen>
|
||||
<dimen name="button_padding_vertical">16dp</dimen>
|
||||
<dimen name="button_margin_horizontal">72dp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -819,4 +819,6 @@
|
|||
<string name="your_account_data_is_only_used_for_authentication">Your account data is only used for authentication.</string>
|
||||
<string name="circle">Circle</string>
|
||||
<string name="volume">Volume</string>
|
||||
<string name="listeners_label">Listeners</string>
|
||||
<string name="scrobbles_label">Scrobbles</string>
|
||||
</resources>
|
||||
|
|
|
@ -128,6 +128,10 @@
|
|||
<item name="android:fontFamily">@font/circular</item>
|
||||
</style>
|
||||
|
||||
<style name="TextViewHeadline2" parent="TextAppearance.MaterialComponents.Headline2">
|
||||
<item name="android:fontFamily">@font/circular</item>
|
||||
</style>
|
||||
|
||||
<style name="TextViewSubtitle1" parent="TextAppearance.MaterialComponents.Subtitle1">
|
||||
<item name="android:fontFamily">@font/circular</item>
|
||||
</style>
|
||||
|
|
|
@ -1 +1 @@
|
|||
include ':app', ':appthemehelper', ':liboverscroll'
|
||||
include ':app', ':appthemehelper'
|
Loading…
Reference in a new issue