Added Slide theme
This commit is contained in:
parent
9156ec2390
commit
a3a4618769
53 changed files with 1614 additions and 242 deletions
|
@ -32,8 +32,8 @@ android {
|
|||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
applicationId "code.name.monkey.retromusic"
|
||||
versionCode 230
|
||||
versionName '3.1.250'
|
||||
versionCode 305
|
||||
versionName '3.1.300'
|
||||
|
||||
multiDexEnabled true
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
<html>
<head>
<style type="text/css">
* {
word-wrap: break-word;
}
{style-placeholder}
a {
color: #{link-color};
}
a:active {
color: #{link-color-active};
}
ul {
list-style-position: outside;
padding-left: 0;
padding-right: 0;
margin-left: 1em;
}
li {
padding-top: 8px;
}
</style>
</head>
<body>
<h4>v3.1.240</h4>
<ul>
<li>Fix Search not showing from home screen</li>
<li>Fix Volume controls color issue</li>
<li>Fix Seek bar alignment</li>
<li>Added tiny theme</li>
<li>Improved full theme appearances</li>
<li>Now playing theme preview updated</li>
<li>Fix composer error</li>
</ul>
<h4>v3.1.200</h4>
<ul>
<li>Added composer sort and editing</li>
<li>Fix Crash in Album tag editor while selecting options</li>
<li>Added Filter song length</li>
<li>Added Favourites playlist icon will be accent color</li>
<li>Added Colorful settings icons</li>
<li>Added Corners for dialog</li>
</ul>
<h4>v3.0.570</h4>
<ul>
<li>Fix Album/Artist square image</li>
<li>Fix Delete dialog text format</li>
<li>Fix Profile picture not showing after coming back from folders</li>
<li>Fix Play button color i Simple and Plain themes</li>
<li>Fix Sleep timer dialog crashing</li>
<li>Fix Share song dialog title and text</li>
</ul>
<p>If you see entire app white or dark or black select same theme in settings to fix </p>
<p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a>
</p>
<p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its
not working try to
uninstall and install again. </p>
</body>
|
||||
<html>
<head>
<style type="text/css">
* {
word-wrap: break-word;
}
{style-placeholder}
a {
color: #{link-color};
}
a:active {
color: #{link-color-active};
}
ul {
list-style-position: outside;
padding-left: 0;
padding-right: 0;
margin-left: 1em;
}
li {
padding-top: 8px;
}
</style>
</head>
<body>
<h4>v3.1.300</h4>
<ul>
<li>Added new slide theme</li>
<li>Fix Home screen sections loading slow</li>
</ul>
<h4>v3.1.240</h4>
<ul>
<li>Fix Search not showing from home screen</li>
<li>Fix Volume controls color issue</li>
<li>Fix Seek bar alignment</li>
<li>Added tiny theme</li>
<li>Improved full theme appearances</li>
<li>Now playing theme preview updated</li>
<li>Fix composer error</li>
</ul>
<h4>v3.1.200</h4>
<ul>
<li>Added composer sort and editing</li>
<li>Fix Crash in Album tag editor while selecting options</li>
<li>Added Filter song length</li>
<li>Added Favourites playlist icon will be accent color</li>
<li>Added Colorful settings icons</li>
<li>Added Corners for dialog</li>
</ul>
<h4>v3.0.570</h4>
<ul>
<li>Fix Album/Artist square image</li>
<li>Fix Delete dialog text format</li>
<li>Fix Profile picture not showing after coming back from folders</li>
<li>Fix Play button color i Simple and Plain themes</li>
<li>Fix Sleep timer dialog crashing</li>
<li>Fix Share song dialog title and text</li>
</ul>
<p>If you see entire app white or dark or black select same theme in settings to fix </p>
<p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a>
</p>
<p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its
not working try to
uninstall and install again. </p>
</body>
|
|
@ -47,7 +47,7 @@ class CreatePlaylistDialog : RoundedBottomSheetDialogFragment() {
|
|||
|
||||
MaterialUtil.setTint(actionCreate, true)
|
||||
MaterialUtil.setTint(actionCancel, false)
|
||||
MaterialUtil.setTint(actionNewPlaylistContainer, true)
|
||||
MaterialUtil.setTint(actionNewPlaylistContainer, false)
|
||||
|
||||
actionNewPlaylist.setHintTextColor(ColorStateList.valueOf(accentColor))
|
||||
actionNewPlaylist.setTextColor(ThemeStore.textColorPrimary(context!!))
|
||||
|
|
|
@ -32,7 +32,6 @@ import kotlinx.android.synthetic.main.dialog_remove_from_playlist.*
|
|||
class RemoveFromPlaylistDialog : RoundedBottomSheetDialogFragment() {
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
|
||||
return inflater.inflate(R.layout.dialog_remove_from_playlist, container, false)
|
||||
}
|
||||
|
||||
|
@ -53,8 +52,10 @@ class RemoveFromPlaylistDialog : RoundedBottomSheetDialogFragment() {
|
|||
title = R.string.remove_song_from_playlist_title
|
||||
content = Html.fromHtml(getString(R.string.remove_song_x_from_playlist, songs[0].title))
|
||||
}
|
||||
bannerTitle.setTextColor(ThemeStore.textColorPrimary(context!!))
|
||||
bannerTitle.text = content;
|
||||
actionDelete.apply {
|
||||
text = content
|
||||
setText(title)
|
||||
setTextColor(ThemeStore.textColorSecondary(context))
|
||||
setOnClickListener {
|
||||
val playlistSongs = ArrayList<PlaylistSong>()
|
||||
|
@ -64,10 +65,7 @@ class RemoveFromPlaylistDialog : RoundedBottomSheetDialogFragment() {
|
|||
}
|
||||
MaterialUtil.setTint(this)
|
||||
}
|
||||
bannerTitle.apply {
|
||||
setText(title)
|
||||
setTextColor(ThemeStore.textColorPrimary(context))
|
||||
}
|
||||
|
||||
|
||||
actionCancel.apply {
|
||||
setTextColor(ThemeStore.textColorSecondary(context))
|
||||
|
|
|
@ -22,7 +22,8 @@ import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.HomeSection
|
|||
* Created by hemanths on 3/4/19
|
||||
*/
|
||||
|
||||
class Home(@StringRes val title: Int,
|
||||
class Home(val priority: Int,
|
||||
@StringRes val title: Int,
|
||||
@StringRes val subTitle: Int,
|
||||
val arrayList: ArrayList<*>,
|
||||
@HomeSection
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
package code.name.monkey.retromusic.mvp.presenter
|
||||
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.model.*
|
||||
import code.name.monkey.retromusic.model.Home
|
||||
import code.name.monkey.retromusic.mvp.Presenter
|
||||
import code.name.monkey.retromusic.mvp.contract.HomeContract
|
||||
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.GENRES
|
||||
|
@ -26,42 +26,25 @@ import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.SUGGESTIONS
|
|||
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.TOP_ALBUMS
|
||||
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.TOP_ARTISTS
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.functions.Function7
|
||||
|
||||
operator fun CompositeDisposable.plusAssign(disposable: Disposable) {
|
||||
add(disposable)
|
||||
}
|
||||
|
||||
class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), HomeContract.HomePresenter {
|
||||
private val hashSet: HashSet<Home> = HashSet()
|
||||
|
||||
override fun homeSections() {
|
||||
disposable += Observable.combineLatest(repository.suggestionSongs, repository.recentAlbums,
|
||||
repository.topAlbums, repository.recentArtists, repository.topArtists,
|
||||
repository.allGenres, repository.favoritePlaylist,
|
||||
Function7<ArrayList<Song>, ArrayList<Album>, ArrayList<Album>, ArrayList<Artist>,
|
||||
ArrayList<Artist>, ArrayList<Genre>, ArrayList<Playlist>, List<Home>>
|
||||
{ suggestions: ArrayList<Song>, recentAlbums: ArrayList<Album>,
|
||||
topAlbums: ArrayList<Album>, recentArtists: ArrayList<Artist>,
|
||||
topArtists: ArrayList<Artist>, genres: ArrayList<Genre>,
|
||||
favoritePlaylist: ArrayList<Playlist> ->
|
||||
val homes: ArrayList<Home> = ArrayList()
|
||||
if (suggestions.isNotEmpty()) homes.add(Home(R.string.suggestion_songs, 0, suggestions, SUGGESTIONS, R.drawable.ic_audiotrack_black_24dp))
|
||||
if (recentArtists.isNotEmpty()) homes.add(Home(R.string.recent_artists, 0, recentArtists, RECENT_ARTISTS, R.drawable.ic_artist_white_24dp))
|
||||
if (recentAlbums.isNotEmpty()) homes.add(Home(R.string.recent_albums, 0, recentAlbums, RECENT_ALBUMS, R.drawable.ic_album_white_24dp))
|
||||
if (topArtists.isNotEmpty()) homes.add(Home(R.string.top_artists, 0, topArtists, TOP_ARTISTS, R.drawable.ic_artist_white_24dp))
|
||||
if (topAlbums.isNotEmpty()) homes.add(Home(R.string.top_albums, 0, topAlbums, TOP_ALBUMS, R.drawable.ic_album_white_24dp))
|
||||
if (favoritePlaylist.isNotEmpty()) homes.add(Home(R.string.favorites, 0, favoritePlaylist, PLAYLISTS, R.drawable.ic_favorite_white_24dp))
|
||||
if (genres.isNotEmpty() && PreferenceUtil.getInstance().isGenreShown) homes.add(Home(R.string.genres, 0, genres, GENRES, R.drawable.ic_guitar_acoustic_white_24dp))
|
||||
homes
|
||||
}).subscribe({ homes ->
|
||||
if (homes.isNotEmpty()) {
|
||||
view.showData(homes as ArrayList<Home>)
|
||||
}
|
||||
}, {
|
||||
view.showEmpty()
|
||||
}, { })
|
||||
loadSuggestions()
|
||||
loadRecentArtists()
|
||||
loadRecentAlbums()
|
||||
loadTopArtists()
|
||||
loadATopAlbums()
|
||||
loadFavorite()
|
||||
if (PreferenceUtil.getInstance().isGenreShown) loadGenre()
|
||||
}
|
||||
|
||||
override fun subscribe() {
|
||||
|
@ -71,4 +54,81 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
|
|||
override fun unsubscribe() {
|
||||
disposable.dispose()
|
||||
}
|
||||
|
||||
private fun loadSuggestions() {
|
||||
disposable += repository.suggestionSongs
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(5, R.string.suggestion_songs, 0, it, SUGGESTIONS, R.drawable.ic_audiotrack_black_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmpty()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadRecentArtists() {
|
||||
disposable += repository.recentArtists
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(0, R.string.recent_artists, 0, it, RECENT_ARTISTS, R.drawable.ic_artist_white_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmpty()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadRecentAlbums() {
|
||||
disposable += repository.recentAlbums
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(1, R.string.recent_albums, 0, it, RECENT_ALBUMS, R.drawable.ic_album_white_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmpty()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadATopAlbums() {
|
||||
disposable += repository.topAlbums
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(2, R.string.top_albums, 0, it, TOP_ALBUMS, R.drawable.ic_album_white_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmpty()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadTopArtists() {
|
||||
disposable += repository.topArtists
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(3, R.string.top_artists, 0, it, TOP_ARTISTS, R.drawable.ic_artist_white_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmpty()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadFavorite() {
|
||||
disposable += repository.favoritePlaylist
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(4, R.string.favorites, 0, it, PLAYLISTS, R.drawable.ic_favorite_white_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmpty()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadGenre() {
|
||||
disposable += repository.allGenres
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(6, R.string.genres, 0, it, GENRES, R.drawable.ic_guitar_acoustic_white_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmpty()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package code.name.monkey.retromusic.transform;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
/**
|
||||
* Created by hemanths on 3/9/19
|
||||
*/
|
||||
public class RoundStackTransformer implements ViewPager.PageTransformer {
|
||||
@Override
|
||||
public void transformPage(@NonNull View page, float position) {
|
||||
|
||||
}
|
||||
}
|
|
@ -21,7 +21,12 @@ class StackPagerTransformer : ViewPager.PageTransformer {
|
|||
|
||||
|
||||
override fun transformPage(view: View, position: Float) {
|
||||
if (position <= 0f) {
|
||||
|
||||
if (position < -1f) {
|
||||
view.translationX = view.width * position
|
||||
}
|
||||
|
||||
if (position < 0f) {
|
||||
view.translationX = 0f
|
||||
view.scaleX = 1f
|
||||
view.scaleY = 1f
|
||||
|
|
|
@ -17,7 +17,7 @@ package code.name.monkey.retromusic.transform
|
|||
import android.view.View
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
|
||||
class StackTransformer : ViewPager.PageTransformer {
|
||||
class VerticalStackTransformer : ViewPager.PageTransformer {
|
||||
override fun transformPage(page: View, position: Float) {
|
||||
if (position >= 0) {
|
||||
page.scaleX = (0.9f - 0.05f * position)
|
|
@ -109,7 +109,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
|||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
simpleSongAdapter = SimpleSongAdapter(this, ArrayList(), R.layout.item_song)
|
||||
simpleSongAdapter = SimpleSongAdapter(this, ArrayList(), R.layout.item_song,false)
|
||||
recyclerView.apply {
|
||||
layoutManager = LinearLayoutManager(this@AlbumDetailsActivity)
|
||||
itemAnimator = DefaultItemAnimator()
|
||||
|
|
|
@ -166,7 +166,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
|||
layoutManager = GridLayoutManager(this.context, 1, GridLayoutManager.HORIZONTAL, false)
|
||||
adapter = albumAdapter
|
||||
}
|
||||
songAdapter = SimpleSongAdapter(this, ArrayList(), R.layout.item_song)
|
||||
songAdapter = SimpleSongAdapter(this, ArrayList(), R.layout.item_song, false)
|
||||
recyclerView.apply {
|
||||
itemAnimator = DefaultItemAnimator()
|
||||
layoutManager = LinearLayoutManager(this.context)
|
||||
|
|
|
@ -146,7 +146,7 @@ class PlayingQueueActivity : AbsMusicServiceActivity() {
|
|||
setSupportActionBar(toolbar)
|
||||
title = null
|
||||
toolbar.setNavigationOnClickListener { onBackPressed() }
|
||||
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.accentColor(this))
|
||||
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this))
|
||||
clearQueue.setColor(ThemeStore.accentColor(this))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ import java.io.InputStreamReader;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.recyclerview.widget.LinearSmoothScroller;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import code.name.monkey.appthemehelper.ThemeStore;
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||
|
@ -52,7 +54,7 @@ public class WhatsNewActivity extends AbsBaseActivity {
|
|||
webView = findViewById(R.id.webView);
|
||||
title = findViewById(R.id.bannerTitle);
|
||||
toolbar = findViewById(R.id.toolbar);
|
||||
appBarLayout= findViewById(R.id.appBarLayout);
|
||||
appBarLayout = findViewById(R.id.appBarLayout);
|
||||
|
||||
|
||||
setStatusbarColorAuto();
|
||||
|
@ -65,7 +67,7 @@ public class WhatsNewActivity extends AbsBaseActivity {
|
|||
setTitle(null);
|
||||
toolbar.setNavigationOnClickListener(v -> onBackPressed());
|
||||
title.setTextColor(ThemeStore.Companion.textColorPrimary(this));
|
||||
ToolbarContentTintHelper.colorBackButton(toolbar,ThemeStore.Companion.textColorSecondary(this));
|
||||
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.Companion.textColorSecondary(this));
|
||||
|
||||
try {
|
||||
// Load from phonograph-changelog.html in the assets folder
|
||||
|
@ -84,7 +86,7 @@ ToolbarContentTintHelper.colorBackButton(toolbar,ThemeStore.Companion.textColorS
|
|||
.replace("{style-placeholder}",
|
||||
String.format("body { background-color: %s; color: %s; }", backgroundColor, contentColor))
|
||||
.replace("{link-color}", colorToHex(ThemeStore.Companion.accentColor(this)))
|
||||
.replace("{link-color-active}", colorToHex(ColorUtil.INSTANCE.lightenColor(ThemeStore.Companion.accentColor(this))))
|
||||
.replace("{link-color-active}", colorToHex(ColorUtil.INSTANCE.lightenColor(ThemeStore.Companion.accentColor(this))))
|
||||
, "text/html", "UTF-8");
|
||||
} catch (Throwable e) {
|
||||
webView.loadData("<h1>Unable to load</h1><p>" + e.getLocalizedMessage() + "</p>", "text/html", "UTF-8");
|
||||
|
|
|
@ -14,6 +14,7 @@ import code.name.monkey.retromusic.R
|
|||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.ui.fragments.MiniPlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.NowPlayingScreen
|
||||
import code.name.monkey.retromusic.ui.fragments.NowPlayingScreen.*
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.adaptive.AdaptiveFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.blur.BlurPlayerFragment
|
||||
|
@ -23,11 +24,12 @@ import code.name.monkey.retromusic.ui.fragments.player.color.ColorFragment
|
|||
import code.name.monkey.retromusic.ui.fragments.player.fit.FitFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.flat.FlatPlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.full.FullPlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.tiny.TinyPlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.material.MaterialFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.normal.PlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.plain.PlainPlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.simple.SimplePlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.slide.SlidePlayerFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.player.tiny.TinyPlayerFragment
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout
|
||||
|
@ -83,7 +85,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
|||
}
|
||||
|
||||
fun setAntiDragView(antiDragView: View) {
|
||||
slidingLayout.setAntiDragView(antiDragView);
|
||||
slidingLayout.setAntiDragView(antiDragView)
|
||||
}
|
||||
|
||||
private fun collapsePanel() {
|
||||
|
@ -180,19 +182,20 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
|||
currentNowPlayingScreen = PreferenceUtil.getInstance().nowPlayingScreen
|
||||
|
||||
val fragment: Fragment = when (currentNowPlayingScreen) {
|
||||
NowPlayingScreen.BLUR -> BlurPlayerFragment()
|
||||
NowPlayingScreen.ADAPTIVE -> AdaptiveFragment()
|
||||
NowPlayingScreen.NORMAL -> PlayerFragment()
|
||||
NowPlayingScreen.CARD -> CardFragment()
|
||||
NowPlayingScreen.BLUR_CARD -> CardBlurFragment()
|
||||
NowPlayingScreen.FIT -> FitFragment()
|
||||
NowPlayingScreen.FLAT -> FlatPlayerFragment()
|
||||
NowPlayingScreen.FULL -> FullPlayerFragment()
|
||||
NowPlayingScreen.PLAIN -> PlainPlayerFragment()
|
||||
NowPlayingScreen.SIMPLE -> SimplePlayerFragment()
|
||||
NowPlayingScreen.MATERIAL -> MaterialFragment()
|
||||
NowPlayingScreen.COLOR -> ColorFragment()
|
||||
NowPlayingScreen.TINY -> TinyPlayerFragment()
|
||||
BLUR -> BlurPlayerFragment()
|
||||
ADAPTIVE -> AdaptiveFragment()
|
||||
NORMAL -> PlayerFragment()
|
||||
CARD -> CardFragment()
|
||||
BLUR_CARD -> CardBlurFragment()
|
||||
FIT -> FitFragment()
|
||||
FLAT -> FlatPlayerFragment()
|
||||
FULL -> FullPlayerFragment()
|
||||
PLAIN -> PlainPlayerFragment()
|
||||
SIMPLE -> SimplePlayerFragment()
|
||||
MATERIAL -> MaterialFragment()
|
||||
COLOR -> ColorFragment()
|
||||
TINY -> TinyPlayerFragment()
|
||||
SLIDE -> SlidePlayerFragment()
|
||||
else -> PlayerFragment()
|
||||
} // must implement AbsPlayerFragment
|
||||
supportFragmentManager.beginTransaction().replace(R.id.playerFragmentContainer, fragment).commit()
|
||||
|
@ -256,15 +259,15 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
|||
|
||||
val isColorLight = ColorUtil.isColorLight(paletteColor)
|
||||
if (PreferenceUtil.getInstance().adaptiveColor &&
|
||||
(currentNowPlayingScreen == NowPlayingScreen.NORMAL || currentNowPlayingScreen == NowPlayingScreen.FLAT)) {
|
||||
(currentNowPlayingScreen == NORMAL || currentNowPlayingScreen == FLAT)) {
|
||||
super.setLightNavigationBar(true)
|
||||
super.setLightStatusbar(isColorLight)
|
||||
} else if (currentNowPlayingScreen == NowPlayingScreen.FULL || currentNowPlayingScreen == NowPlayingScreen.CARD ||
|
||||
currentNowPlayingScreen == NowPlayingScreen.FIT || /*currentNowPlayingScreen == NowPlayingScreen.CLASSIC ||*/
|
||||
currentNowPlayingScreen == NowPlayingScreen.BLUR || currentNowPlayingScreen == NowPlayingScreen.BLUR_CARD) {
|
||||
} else if (currentNowPlayingScreen == FULL || (currentNowPlayingScreen == SLIDE) || currentNowPlayingScreen == CARD ||
|
||||
currentNowPlayingScreen == FIT || /*currentNowPlayingScreen == NowPlayingScreen.CLASSIC ||*/
|
||||
currentNowPlayingScreen == BLUR || currentNowPlayingScreen == BLUR_CARD) {
|
||||
super.setLightStatusbar(false)
|
||||
super.setLightNavigationBar(true)
|
||||
} else if (currentNowPlayingScreen == NowPlayingScreen.COLOR) {
|
||||
} else if (currentNowPlayingScreen == COLOR) {
|
||||
super.setNavigationbarColor(paletteColor)
|
||||
super.setLightNavigationBar(isColorLight)
|
||||
super.setLightStatusbar(isColorLight)
|
||||
|
@ -303,6 +306,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
|||
super.setTaskDescriptionColor(color)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*import android.animation.ArgbEvaluator
|
||||
import android.animation.ValueAnimator
|
||||
|
|
|
@ -31,7 +31,7 @@ import code.name.monkey.retromusic.views.MetalRecyclerViewPager
|
|||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
|
||||
|
||||
class HomeAdapter(private val activity: AppCompatActivity, private val homes: ArrayList<Home>, private val displayMetrics: DisplayMetrics) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
class HomeAdapter(private val activity: AppCompatActivity, private val homes: List<Home>, private val displayMetrics: DisplayMetrics) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
|
|
|
@ -13,7 +13,8 @@ import java.util.*
|
|||
|
||||
class SimpleSongAdapter(context: AppCompatActivity,
|
||||
songs: ArrayList<Song>,
|
||||
@LayoutRes i: Int) : SongAdapter(context, songs, i, false, null) {
|
||||
@LayoutRes i: Int,
|
||||
val useNumbers: Boolean) : SongAdapter(context, songs, i, false, null) {
|
||||
|
||||
private var textColor: Int = 0
|
||||
|
||||
|
@ -36,7 +37,11 @@ class SimpleSongAdapter(context: AppCompatActivity,
|
|||
val fixedTrackNumber = MusicUtil.getFixedTrackNumber(dataSet[position].trackNumber)
|
||||
|
||||
if (holder.imageText != null) {
|
||||
holder.imageText!!.text = if (fixedTrackNumber > 0) fixedTrackNumber.toString() else "-"
|
||||
if (useNumbers) {
|
||||
holder.imageText!!.text = (position + 1).toString()
|
||||
} else {
|
||||
holder.imageText!!.text = if (fixedTrackNumber > 0) fixedTrackNumber.toString() else "-"
|
||||
}
|
||||
holder.imageText!!.setTextColor(textColor)
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ open class SongAdapter @JvmOverloads constructor(protected val activity: AppComp
|
|||
@param:LayoutRes protected var itemLayoutRes: Int, usePalette: Boolean, cabHolder: CabHolder?,
|
||||
showSectionName: Boolean = true) : AbsMultiSelectAdapter<SongAdapter.ViewHolder, Song>(activity, cabHolder, R.menu.menu_media_selection), MaterialCab.Callback, FastScrollRecyclerView.SectionedAdapter {
|
||||
var dataSet: ArrayList<Song>
|
||||
protected set
|
||||
|
||||
protected var usePalette = false
|
||||
private var showSectionName = true
|
||||
|
|
|
@ -21,6 +21,7 @@ enum class NowPlayingScreen constructor(@param:StringRes @field:StringRes
|
|||
NORMAL(R.string.normal, R.drawable.np_normal, 0),
|
||||
PLAIN(R.string.plain, R.drawable.np_plain, 3),
|
||||
TINY(R.string.tiny, R.drawable.np_tiny, 7),
|
||||
SIMPLE(R.string.simple, R.drawable.np_simple, 8)
|
||||
SIMPLE(R.string.simple, R.drawable.np_simple, 8),
|
||||
SLIDE(R.string.slide, R.drawable.np_slide, 13)
|
||||
|
||||
}
|
||||
|
|
|
@ -211,8 +211,9 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
}
|
||||
|
||||
override fun showData(list: ArrayList<Home>) {
|
||||
val finalList = list.sortedWith(compareBy { it.priority })
|
||||
recyclerView.apply {
|
||||
val homeAdapter = HomeAdapter(mainActivity, list, displayMetrics)
|
||||
val homeAdapter = HomeAdapter(mainActivity, finalList, displayMetrics)
|
||||
layoutManager = LinearLayoutManager(mainActivity)
|
||||
adapter = homeAdapter
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ class CardPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
}
|
||||
|
||||
override fun setDark(color: Int) {
|
||||
image!!.setColorFilter(color, PorterDuff.Mode.SRC_IN)
|
||||
|
||||
if (ColorUtil.isColorLight(ATHUtil.resolveColor(context, android.R.attr.windowBackground))) {
|
||||
lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(activity, true)
|
||||
lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(activity, true)
|
||||
|
@ -132,7 +132,7 @@ class CardPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
} else {
|
||||
ThemeStore.accentColor(context!!)
|
||||
}
|
||||
|
||||
image.setColorFilter(colorFinal, PorterDuff.Mode.SRC_IN)
|
||||
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(colorFinal)), false)
|
||||
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
||||
|
||||
|
|
|
@ -305,12 +305,12 @@ class ColorFragment : AbsPlayerFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun Palette.getContrastColor(background: Int): Int {
|
||||
fun Palette.getContrastColor(background: Int): Int {
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
private fun Palette.getColor(): Int {
|
||||
fun Palette.getColor(): Int {
|
||||
return when {
|
||||
darkMutedSwatch != null -> darkMutedSwatch!!.rgb
|
||||
mutedSwatch != null -> mutedSwatch!!.rgb
|
||||
|
|
|
@ -0,0 +1,336 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package code.name.monkey.retromusic.ui.fragments.player.slide
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.graphics.Color
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.LinearSmoothScroller
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.*
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.glide.GlideApp
|
||||
import code.name.monkey.retromusic.glide.RetroGlideExtension
|
||||
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.ui.activities.base.AbsSlidingMusicPanelActivity
|
||||
import code.name.monkey.retromusic.ui.adapter.song.SimpleSongAdapter
|
||||
import code.name.monkey.retromusic.ui.fragments.VolumeFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerFragment
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import kotlinx.android.synthetic.main.fragment_slide_player.*
|
||||
|
||||
/**
|
||||
* Created by hemanths on 3/15/19
|
||||
*/
|
||||
class SlidePlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Callback {
|
||||
private var lastColor: Int = 0
|
||||
override val paletteColor: Int
|
||||
get() = lastColor
|
||||
|
||||
override fun playerToolbar(): Toolbar {
|
||||
return playerToolbar
|
||||
}
|
||||
|
||||
override fun onShow() {
|
||||
|
||||
}
|
||||
|
||||
override fun onHide() {
|
||||
|
||||
}
|
||||
|
||||
override fun onBackPressed(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun toolbarIconColor(): Int {
|
||||
return Color.WHITE
|
||||
}
|
||||
|
||||
override fun onColorChanged(color: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onFavoriteToggled() {
|
||||
toggleFavorite(MusicPlayerRemote.currentSong)
|
||||
}
|
||||
|
||||
override fun toggleFavorite(song: Song) {
|
||||
super.toggleFavorite(song)
|
||||
if (song.id == MusicPlayerRemote.currentSong.id) {
|
||||
updateIsFavorite()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
return inflater.inflate(R.layout.fragment_slide_player, container, false)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
progressViewUpdateHelper.start()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
progressViewUpdateHelper.stop()
|
||||
}
|
||||
|
||||
|
||||
override fun onPlayingMetaChanged() {
|
||||
super.onPlayingMetaChanged()
|
||||
updateSong()
|
||||
updateIsFavorite()
|
||||
}
|
||||
|
||||
override fun onQueueChanged() {
|
||||
super.onQueueChanged()
|
||||
updateQueue()
|
||||
}
|
||||
|
||||
override fun onServiceConnected() {
|
||||
updatePlayPauseDrawableState()
|
||||
updateRepeatState()
|
||||
updateShuffleState()
|
||||
updateSong()
|
||||
updateIsFavorite()
|
||||
updateQueue()
|
||||
}
|
||||
|
||||
private fun updateQueue() {
|
||||
songAdapter.swapDataSet(MusicPlayerRemote.playingQueue)
|
||||
}
|
||||
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
private fun updatePlayPauseDrawableState() {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
albumCoverContainer.cardElevation = 24.0f
|
||||
playPauseButton.setImageResource(R.drawable.ic_pause_white_24dp)
|
||||
} else {
|
||||
albumCoverContainer.cardElevation = 0.0f
|
||||
playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_24dp)
|
||||
}
|
||||
}
|
||||
|
||||
fun updateRepeatState() {
|
||||
when (MusicPlayerRemote.repeatMode) {
|
||||
MusicService.REPEAT_MODE_NONE -> {
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_white_24dp)
|
||||
repeatButton.setColorFilter(lastDisabledPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
MusicService.REPEAT_MODE_ALL -> {
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_white_24dp)
|
||||
repeatButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
MusicService.REPEAT_MODE_THIS -> {
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_one_white_24dp)
|
||||
repeatButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun updateShuffleState() {
|
||||
when (MusicPlayerRemote.shuffleMode) {
|
||||
MusicService.SHUFFLE_MODE_SHUFFLE -> shuffleButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
else -> shuffleButton.setColorFilter(lastDisabledPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun updateSong() {
|
||||
val song = MusicPlayerRemote.currentSong
|
||||
title.text = song.title
|
||||
text.text = song.artistName
|
||||
|
||||
GlideApp.with(activity!!).asBitmapPalette()
|
||||
.load(RetroGlideExtension.getSongModel(song))
|
||||
.songOptions(song)
|
||||
.transition(RetroGlideExtension.getDefaultTransition())
|
||||
.into(object : RetroMusicColoredTarget(playerImage) {
|
||||
override fun onColorReady(color: Int) {
|
||||
setColor(color)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun setColor(color: Int) {
|
||||
lastColor = color
|
||||
val colorBg = ATHUtil.resolveColor(context!!, android.R.attr.colorBackground)
|
||||
if (ColorUtil.isColorLight(colorBg)) {
|
||||
lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(context!!, true)
|
||||
lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(context!!, true)
|
||||
} else {
|
||||
lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(context!!, false)
|
||||
lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(context!!, false)
|
||||
}
|
||||
|
||||
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
|
||||
color
|
||||
} else {
|
||||
ThemeStore.accentColor(context!!)
|
||||
}
|
||||
|
||||
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
text.setTextColor(colorFinal)
|
||||
playerQueueSubHeader.setTextColor(colorFinal)
|
||||
TintHelper.setTintAuto(playPauseButton, lastPlaybackControlsColor, false)
|
||||
ViewUtil.setProgressDrawable(progressSlider, colorFinal)
|
||||
|
||||
updateRepeatState()
|
||||
updateShuffleState()
|
||||
updatePrevNextColor()
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
setUpPlayerToolbar()
|
||||
(activity as AbsSlidingMusicPanelActivity).setAntiDragView(recyclerView)
|
||||
playerQueueSubHeader.setTextColor(ThemeStore.accentColor(context!!))
|
||||
}
|
||||
|
||||
private fun setUpMusicControllers() {
|
||||
setUpPlayPauseFab()
|
||||
setUpPrevNext()
|
||||
setUpRepeatButton()
|
||||
setUpShuffleButton()
|
||||
setUpProgressSlider()
|
||||
setUpRecyclerView()
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
volumeFragmentToggle.visibility = if (PreferenceUtil.getInstance().volumeToggle) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
private lateinit var songAdapter: SimpleSongAdapter
|
||||
|
||||
private fun setUpRecyclerView() {
|
||||
songAdapter = SimpleSongAdapter(context = activity as AppCompatActivity,
|
||||
songs = ArrayList(), i = R.layout.item_song, useNumbers = true)
|
||||
recyclerView.apply {
|
||||
adapter = songAdapter
|
||||
layoutManager = LinearLayoutManager(context)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setUpProgressSlider() {
|
||||
progressSlider.setOnSeekBarChangeListener(object : SimpleOnSeekbarChangeListener() {
|
||||
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
|
||||
if (fromUser) {
|
||||
MusicPlayerRemote.seekTo(progress)
|
||||
onUpdateProgressViews(MusicPlayerRemote.songProgressMillis, MusicPlayerRemote.songDurationMillis)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun onUpdateProgressViews(progress: Int, total: Int) {
|
||||
progressSlider.max = total
|
||||
|
||||
val animator = ObjectAnimator.ofInt(progressSlider, "progress", progress)
|
||||
animator.duration = AbsPlayerControlsFragment.SLIDER_ANIMATION_TIME
|
||||
animator.interpolator = LinearInterpolator()
|
||||
animator.start()
|
||||
|
||||
songTotalTime.text = MusicUtil.getReadableDurationString(total.toLong())
|
||||
songCurrentProgress.text = MusicUtil.getReadableDurationString(progress.toLong())
|
||||
}
|
||||
|
||||
private fun setUpPlayPauseFab() {
|
||||
playPauseButton.setOnClickListener(PlayPauseButtonOnClickHandler())
|
||||
}
|
||||
|
||||
private fun setUpRepeatButton() {
|
||||
repeatButton.setOnClickListener { MusicPlayerRemote.cycleRepeatMode() }
|
||||
}
|
||||
|
||||
private fun setUpShuffleButton() {
|
||||
shuffleButton.setOnClickListener { MusicPlayerRemote.toggleShuffleMode() }
|
||||
}
|
||||
|
||||
private fun setUpPrevNext() {
|
||||
updatePrevNextColor()
|
||||
nextButton.setOnClickListener { MusicPlayerRemote.playNextSong() }
|
||||
previousButton.setOnClickListener { MusicPlayerRemote.back() }
|
||||
}
|
||||
|
||||
private fun updatePrevNextColor() {
|
||||
nextButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
previousButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
|
||||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
|
||||
override fun onPlayStateChanged() {
|
||||
updatePlayPauseDrawableState()
|
||||
}
|
||||
|
||||
override fun onRepeatModeChanged() {
|
||||
updateRepeatState()
|
||||
}
|
||||
|
||||
override fun onShuffleModeChanged() {
|
||||
updateShuffleState()
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this)
|
||||
}
|
||||
|
||||
private fun setUpPlayerToolbar() {
|
||||
playerToolbar.inflateMenu(R.menu.menu_player)
|
||||
playerToolbar.setNavigationOnClickListener { activity!!.onBackPressed() }
|
||||
playerToolbar.setOnMenuItemClickListener(this)
|
||||
|
||||
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, Color.WHITE, activity)
|
||||
}
|
||||
|
||||
fun RecyclerView.smoothSnapToPosition(position: Int, snapMode: Int = LinearSmoothScroller.SNAP_TO_START) {
|
||||
val smoothScroller = object : LinearSmoothScroller(this.context) {
|
||||
override fun getVerticalSnapPreference(): Int {
|
||||
return snapMode
|
||||
}
|
||||
|
||||
override fun getHorizontalSnapPreference(): Int {
|
||||
return snapMode
|
||||
}
|
||||
}
|
||||
smoothScroller.targetPosition = position
|
||||
this.layoutManager?.startSmoothScroll(smoothScroller)
|
||||
}
|
||||
}
|
|
@ -38,7 +38,7 @@ import code.name.monkey.retromusic.transform.DepthTransformation;
|
|||
import code.name.monkey.retromusic.transform.HingeTransformation;
|
||||
import code.name.monkey.retromusic.transform.HorizontalFlipTransformation;
|
||||
import code.name.monkey.retromusic.transform.NormalPageTransformer;
|
||||
import code.name.monkey.retromusic.transform.StackTransformer;
|
||||
import code.name.monkey.retromusic.transform.VerticalStackTransformer;
|
||||
import code.name.monkey.retromusic.transform.VerticalFlipTransformation;
|
||||
import code.name.monkey.retromusic.ui.activities.MainActivity;
|
||||
import code.name.monkey.retromusic.ui.fragments.AlbumCoverStyle;
|
||||
|
@ -727,7 +727,7 @@ public final class PreferenceUtil {
|
|||
case 5:
|
||||
return new HingeTransformation();
|
||||
case 6:
|
||||
return new StackTransformer();
|
||||
return new VerticalStackTransformer();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package code.name.monkey.retromusic.views
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
|
||||
import com.google.android.material.card.MaterialCardView
|
||||
|
||||
/**
|
||||
* Created by hemanths on 3/18/19
|
||||
*/
|
||||
class WidthFitSquareCardView : MaterialCardView {
|
||||
constructor(context: Context) : super(context) {}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {}
|
||||
|
||||
fun forceSquare(z: Boolean) {
|
||||
this.forceSquare = z
|
||||
requestLayout()
|
||||
}
|
||||
|
||||
override fun onMeasure(i: Int, i2: Int) {
|
||||
var i2 = i2
|
||||
if (this.forceSquare) {
|
||||
i2 = i
|
||||
}
|
||||
super.onMeasure(i, i2)
|
||||
}
|
||||
|
||||
private var forceSquare = true
|
||||
}
|
19
app/src/main/res/color/text_field_background.xml
Normal file
19
app/src/main/res/color/text_field_background.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.16" android:color="?attr/colorSecondary" android:state_hovered="true" />
|
||||
<item android:alpha="0.04" android:color="?attr/colorSecondary" android:state_enabled="false" />
|
||||
<item android:alpha="0.12" android:color="?attr/colorSecondary" />
|
||||
</selector>
|
BIN
app/src/main/res/drawable-xxxhdpi/np_slide.webp
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/np_slide.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
|
@ -7,6 +7,5 @@
|
|||
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
|
||||
|
||||
android:pathData="M9 11.75c-0.69 0-1.25 0.56 -1.25 1.25s0.56 1.25 1.25 1.25 1.25-0.56 1.25-1.25-0.56-1.25-1.25-1.25zm6 0c-0.69 0-1.25 0.56 -1.25 1.25s0.56 1.25 1.25 1.25 1.25-0.56 1.25-1.25-0.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-0.29 0.02 -0.58 0.05 -0.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c0.78 0 1.53-0.09 2.25-0.26 0.21 0.71 0.33 1.47 0.33 2.26 0 4.41-3.59 8-8 8z" />
|
||||
</vector>
|
|
@ -4,9 +4,7 @@
|
|||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M12 5.69l5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z" />
|
||||
android:pathData="M10.25 13c0 0.69-0.56 1.25-1.25 1.25S7.75 13.69 7.75 13s0.56-1.25 1.25-1.25 1.25 0.56 1.25 1.25zM15 11.75c-0.69 0-1.25 0.56 -1.25 1.25s0.56 1.25 1.25 1.25 1.25-0.56 1.25-1.25-0.56-1.25-1.25-1.25zm7 0.25c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10zM10.66 4.12C12.06 6.44 14.6 8 17.5 8c0.46 0 0.91-0.05 1.34-0.12C17.44 5.56 14.9 4 12 4c-0.46 0-0.91 0.05 -1.34 0.12 zM4.42 9.47c1.71-0.97 3.03-2.55 3.66-4.44C6.37 6 5.05 7.58 4.42 9.47zM20 12c0-0.78-0.12-1.53-0.33-2.24-0.7 0.15 -1.42 0.24 -2.17 0.24 -3.13 0-5.92-1.44-7.76-3.69C8.69 8.87 6.6 10.88 4 11.86c0.01 0.04 0 0.09 0 0.14 0 4.41 3.59 8 8 8s8-3.59 8-8z" />
|
||||
</vector>
|
21
app/src/main/res/drawable/material_design_outline.xml
Normal file
21
app/src/main/res/drawable/material_design_outline.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/md_grey_200" />
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<corners android:radius="25dp" />
|
||||
</shape>
|
349
app/src/main/res/layout-land/fragment_slide_player.xml
Normal file
349
app/src/main/res/layout-land/fragment_slide_player.xml
Normal file
|
@ -0,0 +1,349 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:orientation="vertical">
|
||||
|
||||
<code.name.monkey.retromusic.views.HeightFitSquareLayout
|
||||
android:id="@+id/heightContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareCardView
|
||||
android:id="@+id/albumCoverContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
app:cardCornerRadius="0dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playerImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/default_album_art" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<include layout="@layout/shadow_statusbar_toolbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_gravity="bottom"
|
||||
android:navigationIcon="@drawable/ic_close_white_24dp"
|
||||
app:navigationIcon="@drawable/ic_close_white_24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
|
||||
|
||||
|
||||
</code.name.monkey.retromusic.views.HeightFitSquareLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/heightContainer"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/titleContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/frameLayout">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title"
|
||||
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:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/progressContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleContainer">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songCurrentProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|left|end"
|
||||
android:paddingLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|right|end"
|
||||
android:paddingRight="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
style="@style/MusicProgressSlider"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/songTotalTime"
|
||||
android:layout_toRightOf="@id/songCurrentProgress"
|
||||
android:maxHeight="3dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:splitTrack="false"
|
||||
android:thumb="@drawable/switch_thumb_material"
|
||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||
tools:progress="20" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/playerMediaControllerContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layoutDirection="ltr"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
|
||||
tools:ignore="ContentDescription,UnusedAttribute"
|
||||
tools:showIn="@layout/fragment_player_playback_controls">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/repeatButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/previousButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/previousButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playPauseButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/repeatButton"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:layout_editor_absoluteY="0dp"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_above="@id/title_container"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/nextButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/previousButton"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_24dp"
|
||||
tools:layout_editor_absoluteY="0dp"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/nextButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/shuffleButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playPauseButton"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:layout_editor_absoluteY="0dp"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/shuffleButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/nextButton"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_shuffle_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:layout_editor_absoluteY="0dp"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playerMediaControllerContainer"
|
||||
tools:showIn="@layout/fragment_player_playback_controls">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/volumeFragment"
|
||||
android:name="code.name.monkey.retromusic.ui.fragments.VolumeFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:layout="@layout/fragment_volume" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/volumeFragmentToggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="volumeFragmentContainer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playerQueueSubHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/now_playing_queue"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/volumeFragmentContainer" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playerQueueSubHeader" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -6,21 +6,28 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
android:background="@drawable/material_design_outline"
|
||||
android:backgroundTint="?dividerColor"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<code.name.monkey.retromusic.views.IconImageView
|
||||
android:id="@+id/sectionIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
app:srcCompat="@drawable/ic_person_white_24dp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/sectionTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:padding="0dp"
|
||||
android:text="@string/for_you" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -29,7 +36,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/history"
|
||||
|
|
|
@ -118,8 +118,7 @@
|
|||
android:hint="@string/album"
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
android:padding="16dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
@ -145,8 +144,7 @@
|
|||
android:hint="@string/album_artist"
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
android:padding="16dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
@ -172,8 +170,7 @@
|
|||
android:hint="@string/genre"
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
android:padding="16dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
@ -199,8 +196,7 @@
|
|||
android:hint="@string/year"
|
||||
android:inputType="text|number"
|
||||
android:maxLines="1"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
android:padding="16dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -53,11 +53,6 @@
|
|||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
|
@ -72,46 +67,71 @@
|
|||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/songTextContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/songText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:hint="@string/song"
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
|
||||
android:padding="14dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/albumTextContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
<code.name.monkey.appthemehelper.common.views.ATEEditText
|
||||
android:id="@+id/albumText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:hint="@string/album"
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
android:padding="16dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/artistText"
|
||||
|
@ -122,13 +142,24 @@
|
|||
android:hint="@string/artist"
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
||||
android:padding="16dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/albumArtistText"
|
||||
|
@ -139,13 +170,23 @@
|
|||
android:hint="@string/album_artist"
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
||||
android:padding="16dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/songComposerText"
|
||||
|
@ -156,7 +197,7 @@
|
|||
android:hint="@string/composer"
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
||||
android:padding="16dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
@ -169,7 +210,18 @@
|
|||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/genreText"
|
||||
|
@ -180,7 +232,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:hint="@string/genre"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
||||
android:padding="16dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
@ -188,7 +240,19 @@
|
|||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/yearText"
|
||||
|
@ -200,14 +264,25 @@
|
|||
android:hint="@string/year"
|
||||
android:inputType="text|number"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
||||
android:padding="16dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/trackNumberText"
|
||||
|
@ -218,13 +293,25 @@
|
|||
android:hint="@string/track_hint"
|
||||
android:inputType="text|number"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
||||
android:padding="16dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/lyricsText"
|
||||
|
@ -234,7 +321,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:hint="@string/lyrics"
|
||||
android:inputType="textMultiLine"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
||||
android:padding="16dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
@ -247,7 +334,7 @@
|
|||
android:id="@+id/saveFab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_gravity="end|bottom"
|
||||
app:setIcon="@drawable/ic_save_white_24dp"
|
||||
app:setText="Save"
|
||||
app:showTitle="true"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -13,8 +14,11 @@
|
|||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/bannerTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="16dp"
|
||||
android:text="@string/add_playlist_title" />
|
||||
|
||||
<code.name.monkey.retromusic.views.IconImageView
|
||||
|
@ -22,17 +26,11 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:padding="12dp"
|
||||
android:padding="16dp"
|
||||
android:text="@string/new_playlist_title"
|
||||
app:srcCompat="@drawable/ic_playlist_add_white_24dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -4,13 +4,15 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp">
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||
android:id="@+id/dialogTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:text="@string/remove_song_from_playlist_title"
|
||||
android:textStyle="bold" />
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/remove_song_from_playlist_title" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/actionDelete"
|
||||
|
|
|
@ -4,81 +4,80 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
tools:ignore="NewApi,RtlSymmetry">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:padding="16dp"
|
||||
android:text="@string/action_details"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix" />
|
||||
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/filePath"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/fileName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:paddingEnd="16dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/fileSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:paddingEnd="16dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/fileFormat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:paddingEnd="16dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/trackLength"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:paddingEnd="16dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/bitrate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:paddingEnd="16dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/samplingRate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -4,13 +4,15 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/dialogTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:text="@string/what_do_you_want_to_share"
|
||||
android:textStyle="bold" />
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/what_do_you_want_to_share" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/audioText"
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/bannerTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/new_playlist_title" />
|
||||
|
||||
|
@ -15,16 +18,15 @@
|
|||
android:id="@+id/actionNewPlaylistContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCollapsedPaddingTop="16dp"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="@color/md_grey_700"
|
||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:hintEnabled="true">
|
||||
|
||||
|
@ -35,8 +37,7 @@
|
|||
android:background="@null"
|
||||
android:hint="@string/playlist_name_empty"
|
||||
android:inputType="textPersonName|textCapWords|text"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
android:padding="16dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
|
@ -44,26 +45,28 @@
|
|||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="14dp"
|
||||
android:text="@string/create_action"
|
||||
app:backgroundTint="@color/md_pink_A400" />
|
||||
app:backgroundTint="@color/md_pink_A400"
|
||||
app:icon="@drawable/ic_playlist_add_white_24dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/actionCancel"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="14dp"
|
||||
android:text="@android:string/cancel"
|
||||
app:icon="@drawable/ic_close_white_24dp"
|
||||
app:strokeWidth="2dp" />
|
||||
|
||||
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp">
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/bannerTitle"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:padding="12dp"
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/remove_song_from_playlist_title" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
|
@ -23,7 +25,8 @@
|
|||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="@string/remove_action"
|
||||
android:textAllCaps="false" />
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_delete_white_24dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/actionCancel"
|
||||
|
@ -37,6 +40,7 @@
|
|||
android:paddingBottom="16dp"
|
||||
android:text="@android:string/cancel"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_close_white_24dp"
|
||||
app:strokeWidth="2dp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent">
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -13,14 +13,11 @@
|
|||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:padding="12dp"
|
||||
android:text="@string/action_sleep_timer" />
|
||||
|
||||
<View
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?dividerColor" />
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/action_sleep_timer" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||
android:id="@+id/timerDisplay"
|
||||
|
|
|
@ -79,10 +79,7 @@
|
|||
android:background="@android:color/transparent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<code.name.monkey.retromusic.views.StatusBarMarginFrameLayout
|
||||
|
@ -96,11 +93,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
sothree:cardCornerRadius="12dp"
|
||||
android:layout_marginBottom="-8dp"
|
||||
app:cardBackgroundColor="?cardBackgroundColor"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardUseCompatPadding="false">
|
||||
app:cardUseCompatPadding="false"
|
||||
sothree:cardCornerRadius="12dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -104,7 +104,8 @@
|
|||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:contentDescription="TODO"
|
||||
android:src="@drawable/promotional" />
|
||||
android:src="@drawable/promotional"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
@ -132,30 +133,23 @@
|
|||
android:text="@string/action_share"
|
||||
app:icon="@drawable/ic_share_white_24dp" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionBugReport"
|
||||
style="@style/OptionButtonsStyle"
|
||||
android:text="@string/report_bug"
|
||||
app:icon="@drawable/ic_bug_report_white_24dp" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionAbout"
|
||||
style="@style/OptionButtonsStyle"
|
||||
android:text="@string/action_about"
|
||||
app:icon="@drawable/ic_help_white_24dp" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionRate"
|
||||
style="@style/OptionButtonsStyle"
|
||||
android:text="@string/rate_app"
|
||||
app:icon="@drawable/ic_star_white_24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/actionBugReport"
|
||||
style="@style/OptionButtonsTextStyle"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/report_bug"
|
||||
tools:textColor="@color/md_red_A400" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/actionAbout"
|
||||
style="@style/OptionButtonsTextStyle"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/action_about"
|
||||
tools:textColor="@color/md_red_A400" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
327
app/src/main/res/layout/fragment_slide_player.xml
Normal file
327
app/src/main/res/layout/fragment_slide_player.xml
Normal file
|
@ -0,0 +1,327 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareCardView
|
||||
android:id="@+id/albumCoverContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
app:cardCornerRadius="0dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playerImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/default_album_art" />
|
||||
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/titleContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/albumCoverContainer">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title"
|
||||
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:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/progressContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleContainer">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songCurrentProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|left|end"
|
||||
android:paddingLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|right|end"
|
||||
android:paddingRight="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
style="@style/MusicProgressSlider"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/songTotalTime"
|
||||
android:layout_toRightOf="@id/songCurrentProgress"
|
||||
android:maxHeight="3dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:splitTrack="false"
|
||||
android:thumb="@drawable/switch_thumb_material"
|
||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||
tools:progress="20" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/playerMediaControllerContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layoutDirection="ltr"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
|
||||
tools:ignore="ContentDescription,UnusedAttribute"
|
||||
tools:showIn="@layout/fragment_player_playback_controls">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/repeatButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/previousButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/previousButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playPauseButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/repeatButton"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:layout_editor_absoluteY="0dp"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_above="@id/title_container"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/nextButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/previousButton"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_24dp"
|
||||
tools:layout_editor_absoluteY="0dp"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/nextButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/shuffleButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playPauseButton"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:layout_editor_absoluteY="0dp"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/shuffleButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="22dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/nextButton"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_shuffle_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:layout_editor_absoluteY="0dp"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playerMediaControllerContainer"
|
||||
tools:showIn="@layout/fragment_player_playback_controls">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/volumeFragment"
|
||||
android:name="code.name.monkey.retromusic.ui.fragments.VolumeFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:layout="@layout/fragment_volume" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/volumeFragmentToggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="volumeFragmentContainer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playerQueueSubHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/now_playing_queue"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/volumeFragmentContainer" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playerQueueSubHeader" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbarContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<include layout="@layout/shadow_statusbar_toolbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_gravity="bottom"
|
||||
android:navigationIcon="@drawable/ic_close_white_24dp"
|
||||
app:navigationIcon="@drawable/ic_close_white_24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -6,25 +6,32 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/material_design_outline"
|
||||
android:backgroundTint="?dividerColor"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<code.name.monkey.retromusic.views.IconImageView
|
||||
android:id="@+id/sectionIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="0dp"
|
||||
app:srcCompat="@drawable/ic_album_white_24dp" />
|
||||
android:layout_marginEnd="12dp"
|
||||
app:srcCompat="@drawable/ic_person_white_24dp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/sectionTitle"
|
||||
style="@style/SubTitleTextAppearance" />
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:padding="0dp"
|
||||
android:text="@string/for_you" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<code.name.monkey.retromusic.views.MetalRecyclerViewPager
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -6,21 +6,29 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
android:background="@drawable/material_design_outline"
|
||||
android:backgroundTint="?dividerColor"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:layout_margin="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<code.name.monkey.retromusic.views.IconImageView
|
||||
android:id="@+id/sectionIcon"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="0dp"
|
||||
app:srcCompat="@drawable/ic_audiotrack_black_24dp" />
|
||||
app:srcCompat="@drawable/ic_person_white_24dp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/sectionTitle"
|
||||
style="@style/SubTitleTextAppearance" />
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:padding="0dp"
|
||||
android:text="@string/for_you" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -8,21 +8,29 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/material_design_outline"
|
||||
android:backgroundTint="?dividerColor"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<code.name.monkey.retromusic.views.IconImageView
|
||||
android:id="@+id/sectionIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="0dp"
|
||||
app:srcCompat="@drawable/ic_artist_selected_white_24dp" />
|
||||
android:layout_marginEnd="12dp"
|
||||
app:srcCompat="@drawable/ic_person_white_24dp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:id="@+id/sectionTitle"
|
||||
style="@style/SubTitleTextAppearance" />
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:padding="0dp"
|
||||
android:text="@string/for_you" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:id="@+id/action_home"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/toggle_home"
|
||||
android:title="@string/home" />
|
||||
android:title="@string/for_you" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_song"
|
||||
|
|
|
@ -602,5 +602,6 @@
|
|||
<string name="composer">Composer</string>
|
||||
<string name="next_song">Next Song</string>
|
||||
<string name="last_song">Last song</string>
|
||||
<string name="slide">Slide</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -133,8 +133,8 @@
|
|||
<item name="iconTint">?iconColor</item>
|
||||
<item name="rippleColor">?iconColor</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:paddingBottom">12dp</item>
|
||||
<item name="android:paddingTop">12dp</item>
|
||||
<item name="android:paddingBottom">8dp</item>
|
||||
<item name="android:paddingTop">8dp</item>
|
||||
<item name="iconSize">12dp</item>
|
||||
</style>
|
||||
|
||||
|
@ -148,4 +148,12 @@
|
|||
<style name="ErrorHandlingTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
||||
</style>
|
||||
|
||||
<style name="AppTextAppearance.Button" parent="TextAppearance.MaterialComponents.Button">
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTextField" parent="Widget.MaterialComponents.TextInputLayout.FilledBox">
|
||||
<item name="boxBackgroundColor">@color/text_field_background</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
<item name="android:windowSharedElementEnterTransition">@transition/grid_exit</item>
|
||||
<item name="android:windowSharedElementExitTransition">@transition/grid_exit</item>
|
||||
<item name="android:fontFamily">@font/circular</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Color" parent="@style/Theme.RetroMusic.Base">
|
||||
|
@ -123,6 +124,7 @@
|
|||
<item name="android:windowSharedElementEnterTransition">@transition/grid_exit</item>
|
||||
<item name="android:windowSharedElementExitTransition">@transition/grid_exit</item>
|
||||
<item name="android:fontFamily">@font/circular</item>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
package code.name.monkey.appthemehelper.common.views
|
||||
|
||||
import android.content.Context
|
||||
import androidx.appcompat.widget.AppCompatEditText
|
||||
import android.util.AttributeSet
|
||||
|
||||
import code.name.monkey.appthemehelper.ATH
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
|
||||
|
||||
/**
|
||||
* @author Aidan Follestad (afollestad)
|
||||
*/
|
||||
class ATEEditText : AppCompatEditText {
|
||||
class ATEEditText : TextInputEditText {
|
||||
|
||||
constructor(context: Context) : super(context) {
|
||||
init(context)
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package code.name.monkey.appthemehelper.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import code.name.monkey.appthemehelper.ThemeStore;
|
||||
|
||||
/**
|
||||
* Created by hemanths on 3/12/19
|
||||
*/
|
||||
public class ATETextInputLayout extends TextInputLayout {
|
||||
public ATETextInputLayout(@NonNull Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public ATETextInputLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, -1);
|
||||
}
|
||||
|
||||
public ATETextInputLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
|
||||
setBoxBackgroundMode(BOX_BACKGROUND_OUTLINE);
|
||||
setBoxStrokeColor(ThemeStore.Companion.textColorSecondary(context));
|
||||
final float scale = context.getResources().getDisplayMetrics().density;
|
||||
int border = (int) (8 * scale + 0.5f);
|
||||
setBoxCornerRadii(border, border, border, border);
|
||||
setHintAnimationEnabled(true);
|
||||
setHintEnabled(true);
|
||||
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ object MaterialUtil {
|
|||
val colorState = ColorStateList.valueOf(accentColor)
|
||||
|
||||
if (background) {
|
||||
textInputLayout.backgroundTintList = colorState
|
||||
//textInputLayout.backgroundTintList = colorState
|
||||
textInputLayout.defaultHintTextColor = colorState
|
||||
} else {
|
||||
textInputLayout.boxStrokeColor = accentColor
|
||||
|
|
Loading…
Reference in a new issue