Merge branch 'dev' of https://github.com/h4h13/RetroMusicPlayer into dev
Conflicts: app/src/main/java/io/github/muntashirakon/music/Constants.kt app/src/main/java/io/github/muntashirakon/music/adapter/GenreAdapter.kt app/src/main/java/io/github/muntashirakon/music/adapter/HomeAdapter.kt app/src/main/java/io/github/muntashirakon/music/adapter/SearchAdapter.kt app/src/main/java/io/github/muntashirakon/music/fragments/LibraryViewModel.kt app/src/main/java/io/github/muntashirakon/music/fragments/base/AbsPlayerFragment.kt app/src/main/java/io/github/muntashirakon/music/fragments/base/AbsRecyclerViewFragment.kt app/src/main/java/io/github/muntashirakon/music/fragments/genres/GenreDetailsFragment.kt app/src/main/java/io/github/muntashirakon/music/fragments/genres/GenresFragment.kt app/src/main/java/io/github/muntashirakon/music/fragments/home/HomeFragment.kt app/src/main/java/io/github/muntashirakon/music/fragments/search/SearchFragment.kt app/src/main/java/io/github/muntashirakon/music/interfaces/IGenreClickListener.kt app/src/main/java/io/github/muntashirakon/music/interfaces/IHomeClickListener.kt app/src/main/java/io/github/muntashirakon/music/preferences/AlbumCoverStylePreferenceDialog.kt app/src/main/java/io/github/muntashirakon/music/preferences/NowPlayingScreenPreferenceDialog.kt app/src/main/java/io/github/muntashirakon/music/service/notification/PlayingNotificationImpl.kt app/src/main/java/io/github/muntashirakon/music/util/MusicUtil.kt app/src/main/java/io/github/muntashirakon/music/util/PreferenceUtil.kt app/src/main/res/layout/activity_donation.xml app/src/main/res/layout/activity_pro_version.xml app/src/main/res/layout/card_other.xml app/src/main/res/layout/fragment_settings.xml app/src/main/res/layout/fragment_synced.xml app/src/main/res/layout/image.xml app/src/main/res/transition/change_bounds.xml appthemehelper/src/main/res/layout/ate_preference_custom.xml
This commit is contained in:
commit
2dea5c31ca
192 changed files with 10165 additions and 8185 deletions
|
@ -10,6 +10,7 @@
|
|||
* 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 io.github.muntashirakon.music
|
||||
|
||||
|
@ -51,7 +52,7 @@ object Constants {
|
|||
)
|
||||
const val NUMBER_OF_TOP_TRACKS = 99
|
||||
}
|
||||
|
||||
const val EXTRA_PLAYLIST_TYPE = "type"
|
||||
const val EXTRA_GENRE = "extra_genre"
|
||||
const val EXTRA_PLAYLIST = "extra_playlist"
|
||||
const val EXTRA_PLAYLIST_ID = "extra_playlist_id"
|
||||
|
|
|
@ -17,13 +17,12 @@ package io.github.muntashirakon.music.adapter
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.navigation.findNavController
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.github.muntashirakon.music.EXTRA_GENRE
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.adapter.base.MediaEntryViewHolder
|
||||
import io.github.muntashirakon.music.interfaces.IGenreClickListener
|
||||
import io.github.muntashirakon.music.model.Genre
|
||||
import java.util.*
|
||||
|
||||
|
@ -34,7 +33,8 @@ import java.util.*
|
|||
class GenreAdapter(
|
||||
private val activity: FragmentActivity,
|
||||
var dataSet: List<Genre>,
|
||||
private val mItemLayoutRes: Int
|
||||
private val mItemLayoutRes: Int,
|
||||
private val listener: IGenreClickListener
|
||||
) : RecyclerView.Adapter<GenreAdapter.ViewHolder>() {
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
return ViewHolder(LayoutInflater.from(activity).inflate(mItemLayoutRes, parent, false))
|
||||
|
@ -62,10 +62,8 @@ class GenreAdapter(
|
|||
|
||||
inner class ViewHolder(itemView: View) : MediaEntryViewHolder(itemView) {
|
||||
override fun onClick(v: View?) {
|
||||
activity.findNavController(R.id.fragment_container).navigate(
|
||||
R.id.genreDetailsFragment,
|
||||
bundleOf(EXTRA_GENRE to dataSet[layoutPosition])
|
||||
)
|
||||
ViewCompat.setTransitionName(itemView, "genre")
|
||||
listener.onClickGenre(dataSet[layoutPosition], itemView)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ import io.github.muntashirakon.music.glide.SongGlideRequest
|
|||
import io.github.muntashirakon.music.helper.MusicPlayerRemote
|
||||
import io.github.muntashirakon.music.interfaces.IAlbumClickListener
|
||||
import io.github.muntashirakon.music.interfaces.IArtistClickListener
|
||||
import io.github.muntashirakon.music.interfaces.IGenreClickListener
|
||||
import io.github.muntashirakon.music.model.*
|
||||
import io.github.muntashirakon.music.util.PreferenceUtil
|
||||
import com.bumptech.glide.Glide
|
||||
|
@ -45,7 +46,8 @@ import com.google.android.material.card.MaterialCardView
|
|||
|
||||
class HomeAdapter(
|
||||
private val activity: AppCompatActivity
|
||||
) : RecyclerView.Adapter<RecyclerView.ViewHolder>(), IArtistClickListener, IAlbumClickListener {
|
||||
) : RecyclerView.Adapter<RecyclerView.ViewHolder>(), IArtistClickListener, IAlbumClickListener,
|
||||
IGenreClickListener {
|
||||
|
||||
private var list = listOf<Home>()
|
||||
|
||||
|
@ -220,7 +222,8 @@ class HomeAdapter(
|
|||
val genreAdapter = GenreAdapter(
|
||||
activity,
|
||||
home.arrayList as List<Genre>,
|
||||
R.layout.item_grid_genre
|
||||
R.layout.item_grid_genre,
|
||||
this@HomeAdapter
|
||||
)
|
||||
recyclerView.apply {
|
||||
layoutManager = GridLayoutManager(activity, 3, GridLayoutManager.HORIZONTAL, false)
|
||||
|
@ -267,4 +270,16 @@ class HomeAdapter(
|
|||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onClickGenre(genre: Genre, view: View) {
|
||||
activity.findNavController(R.id.fragment_container).navigate(
|
||||
R.id.genreDetailsFragment,
|
||||
bundleOf(EXTRA_GENRE to genre),
|
||||
null,
|
||||
FragmentNavigatorExtras(
|
||||
view to "genre"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
|
@ -18,6 +18,7 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
|
@ -26,6 +27,7 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import io.github.muntashirakon.music.*
|
||||
import io.github.muntashirakon.music.adapter.base.MediaEntryViewHolder
|
||||
import io.github.muntashirakon.music.db.PlaylistEntity
|
||||
import io.github.muntashirakon.music.db.PlaylistWithSongs
|
||||
import io.github.muntashirakon.music.glide.AlbumGlideRequest
|
||||
import io.github.muntashirakon.music.glide.ArtistGlideRequest
|
||||
|
@ -52,7 +54,7 @@ class SearchAdapter(
|
|||
if (dataSet[position] is Album) return ALBUM
|
||||
if (dataSet[position] is Artist) return ARTIST
|
||||
if (dataSet[position] is Genre) return GENRE
|
||||
if (dataSet[position] is PlaylistWithSongs) return PLAYLIST
|
||||
if (dataSet[position] is PlaylistEntity) return PLAYLIST
|
||||
return if (dataSet[position] is Song) SONG else HEADER
|
||||
}
|
||||
|
||||
|
@ -107,9 +109,9 @@ class SearchAdapter(
|
|||
)
|
||||
}
|
||||
PLAYLIST -> {
|
||||
val playlist = dataSet[position] as PlaylistWithSongs
|
||||
holder.title?.text = playlist.playlistEntity.playlistName
|
||||
holder.text?.text = MusicUtil.playlistInfoString(activity, playlist.songs)
|
||||
val playlist = dataSet[position] as PlaylistEntity
|
||||
holder.title?.text = playlist.playlistName
|
||||
//holder.text?.text = MusicUtil.playlistInfoString(activity, playlist.songs)
|
||||
}
|
||||
else -> {
|
||||
holder.title?.text = dataSet[position].toString()
|
||||
|
@ -137,6 +139,7 @@ class SearchAdapter(
|
|||
itemView.setOnLongClickListener(null)
|
||||
imageTextContainer?.isInvisible = true
|
||||
if (itemViewType == SONG) {
|
||||
imageTextContainer?.isGone = true
|
||||
menu?.visibility = View.VISIBLE
|
||||
menu?.setOnClickListener(object : SongMenuHelper.OnClickSongMenu(activity) {
|
||||
override val song: Song
|
||||
|
|
|
@ -89,15 +89,6 @@ open class AlbumAdapter(
|
|||
holder.itemView.isActivated = isChecked
|
||||
holder.title?.text = getAlbumTitle(album)
|
||||
holder.text?.text = getAlbumText(album)
|
||||
holder.playSongs?.setOnClickListener {
|
||||
album.songs.let { songs ->
|
||||
MusicPlayerRemote.openQueue(
|
||||
songs,
|
||||
0,
|
||||
true
|
||||
)
|
||||
}
|
||||
}
|
||||
loadAlbumCover(album, holder)
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ import android.widget.ImageView;
|
|||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import io.github.muntashirakon.music.R;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
|
@ -47,11 +48,10 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold
|
|||
|
||||
@Nullable public View mask;
|
||||
|
||||
@Nullable public View menu;
|
||||
@Nullable public AppCompatImageView menu;
|
||||
|
||||
@Nullable public View paletteColorContainer;
|
||||
|
||||
@Nullable public ImageButton playSongs;
|
||||
|
||||
@Nullable public RecyclerView recyclerView;
|
||||
|
||||
|
@ -83,7 +83,6 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold
|
|||
paletteColorContainer = itemView.findViewById(R.id.paletteColorContainer);
|
||||
recyclerView = itemView.findViewById(R.id.recycler_view);
|
||||
mask = itemView.findViewById(R.id.mask);
|
||||
playSongs = itemView.findViewById(R.id.playSongs);
|
||||
dummyContainer = itemView.findViewById(R.id.dummy_view);
|
||||
|
||||
if (imageContainerCard != null) {
|
||||
|
|
|
@ -111,6 +111,7 @@ open class SongAdapter(
|
|||
holder.title?.setTextColor(color.primaryTextColor)
|
||||
holder.text?.setTextColor(color.secondaryTextColor)
|
||||
holder.paletteColorContainer?.setBackgroundColor(color.backgroundColor)
|
||||
holder.menu?.imageTintList= ColorStateList.valueOf(color.primaryTextColor)
|
||||
}
|
||||
holder.mask?.backgroundTintList = ColorStateList.valueOf(color.primaryTextColor)
|
||||
}
|
||||
|
|
|
@ -14,9 +14,12 @@
|
|||
package io.github.muntashirakon.music.extensions
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewTreeObserver
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.EditText
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.core.animation.doOnEnd
|
||||
|
@ -74,3 +77,39 @@ fun BottomSheetBehavior<*>.peekHeightAnimate(value: Int) {
|
|||
start()
|
||||
}
|
||||
}
|
||||
|
||||
fun View.focusAndShowKeyboard() {
|
||||
/**
|
||||
* This is to be called when the window already has focus.
|
||||
*/
|
||||
fun View.showTheKeyboardNow() {
|
||||
if (isFocused) {
|
||||
post {
|
||||
// We still post the call, just in case we are being notified of the windows focus
|
||||
// but InputMethodManager didn't get properly setup yet.
|
||||
val imm =
|
||||
context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
requestFocus()
|
||||
if (hasWindowFocus()) {
|
||||
// No need to wait for the window to get focus.
|
||||
showTheKeyboardNow()
|
||||
} else {
|
||||
// We need to wait until the window gets focus.
|
||||
viewTreeObserver.addOnWindowFocusChangeListener(
|
||||
object : ViewTreeObserver.OnWindowFocusChangeListener {
|
||||
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
||||
// This notification will arrive just before the InputMethodManager gets set up.
|
||||
if (hasFocus) {
|
||||
this@focusAndShowKeyboard.showTheKeyboardNow()
|
||||
// It’s very important to remove this listener once we are done.
|
||||
viewTreeObserver.removeOnWindowFocusChangeListener(this)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
|
@ -15,36 +15,19 @@
|
|||
package io.github.muntashirakon.music.fragments
|
||||
|
||||
import android.widget.Toast
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.liveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import io.github.muntashirakon.music.App
|
||||
import io.github.muntashirakon.music.RECENT_ALBUMS
|
||||
import io.github.muntashirakon.music.RECENT_ARTISTS
|
||||
import io.github.muntashirakon.music.TOP_ALBUMS
|
||||
import io.github.muntashirakon.music.TOP_ARTISTS
|
||||
import io.github.muntashirakon.music.db.PlaylistEntity
|
||||
import io.github.muntashirakon.music.db.PlaylistWithSongs
|
||||
import io.github.muntashirakon.music.db.SongEntity
|
||||
import io.github.muntashirakon.music.db.toSong
|
||||
import io.github.muntashirakon.music.db.toSongEntity
|
||||
import androidx.lifecycle.*
|
||||
import io.github.muntashirakon.music.*
|
||||
import io.github.muntashirakon.music.db.*
|
||||
import io.github.muntashirakon.music.fragments.ReloadType.*
|
||||
import io.github.muntashirakon.music.helper.MusicPlayerRemote
|
||||
import io.github.muntashirakon.music.interfaces.IMusicServiceEventListener
|
||||
import io.github.muntashirakon.music.model.Album
|
||||
import io.github.muntashirakon.music.model.Artist
|
||||
import io.github.muntashirakon.music.model.Contributor
|
||||
import io.github.muntashirakon.music.model.Genre
|
||||
import io.github.muntashirakon.music.model.Home
|
||||
import io.github.muntashirakon.music.model.Playlist
|
||||
import io.github.muntashirakon.music.model.Song
|
||||
import io.github.muntashirakon.music.model.*
|
||||
import io.github.muntashirakon.music.repository.RealRepository
|
||||
import io.github.muntashirakon.music.state.NowPlayingPanelState
|
||||
import io.github.muntashirakon.music.util.PreferenceUtil
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.Dispatchers.Main
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class LibraryViewModel(
|
||||
private val repository: RealRepository
|
||||
|
@ -152,9 +135,11 @@ class LibraryViewModel(
|
|||
}
|
||||
}
|
||||
|
||||
fun search(query: String?) = viewModelScope.launch(IO) {
|
||||
fun search(query: String?) {
|
||||
viewModelScope.launch(IO) {
|
||||
val result = repository.search(query)
|
||||
searchResults.postValue(result)
|
||||
withContext(Main) { searchResults.postValue(result) }
|
||||
}
|
||||
}
|
||||
|
||||
fun forceReload(reloadType: ReloadType) = viewModelScope.launch {
|
||||
|
@ -322,7 +307,8 @@ class LibraryViewModel(
|
|||
viewModelScope.launch(IO) {
|
||||
val playlists = checkPlaylistExists(playlistName)
|
||||
if (playlists.isEmpty()) {
|
||||
val playlistId: Long = createPlaylist(PlaylistEntity(playlistName = playlistName))
|
||||
val playlistId: Long =
|
||||
createPlaylist(PlaylistEntity(playlistName = playlistName))
|
||||
insertSongs(songs.map { it.toSongEntity(playlistId) })
|
||||
forceReload(Playlists)
|
||||
} else {
|
||||
|
|
|
@ -17,11 +17,7 @@ package io.github.muntashirakon.music.fragments.albums
|
|||
import android.app.ActivityOptions
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.SubMenu
|
||||
import android.view.View
|
||||
import android.view.*
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.text.HtmlCompat
|
||||
|
@ -287,8 +283,8 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
|
|||
}
|
||||
|
||||
private fun setColors(color: Int) {
|
||||
shuffleAction.applyColor(color)
|
||||
playAction.applyOutlineColor(color)
|
||||
shuffleAction?.applyColor(color)
|
||||
playAction?.applyOutlineColor(color)
|
||||
}
|
||||
|
||||
override fun onAlbumClick(albumId: Long, view: View) {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
package io.github.muntashirakon.music.fragments.artists
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.Spanned
|
||||
|
@ -137,7 +138,7 @@ class ArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_d
|
|||
}
|
||||
}
|
||||
|
||||
fun showArtist(artist: Artist) {
|
||||
private fun showArtist(artist: Artist) {
|
||||
this.artist = artist
|
||||
loadArtistImage(artist)
|
||||
if (RetroUtil.isAllowedToDownloadMetadata(requireContext())) {
|
||||
|
@ -164,7 +165,7 @@ class ArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_d
|
|||
songTitle.text = songText
|
||||
albumTitle.text = albumText
|
||||
songAdapter.swapDataSet(artist.songs.sortedBy { it.trackNumber })
|
||||
artist.albums?.let { albumAdapter.swapDataSet(it) }
|
||||
albumAdapter.swapDataSet(artist.albums)
|
||||
}
|
||||
|
||||
private fun loadBiography(
|
||||
|
@ -174,7 +175,7 @@ class ArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_d
|
|||
biography = null
|
||||
this.lang = lang
|
||||
detailsViewModel.getArtistInfo(name, lang, null)
|
||||
.observe(viewLifecycleOwner, Observer { result ->
|
||||
.observe(viewLifecycleOwner, { result ->
|
||||
when (result) {
|
||||
is Result.Loading -> println("Loading")
|
||||
is Result.Error -> println("Error")
|
||||
|
@ -222,8 +223,8 @@ class ArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_d
|
|||
}
|
||||
|
||||
private fun setColors(color: Int) {
|
||||
shuffleAction.applyColor(color)
|
||||
playAction.applyOutlineColor(color)
|
||||
shuffleAction?.applyColor(color)
|
||||
playAction?.applyOutlineColor(color)
|
||||
}
|
||||
|
||||
override fun onAlbumClick(albumId: Long, view: View) {
|
||||
|
@ -282,6 +283,21 @@ class ArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_d
|
|||
return true
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
when (requestCode) {
|
||||
REQUEST_CODE_SELECT_IMAGE -> if (resultCode == Activity.RESULT_OK) {
|
||||
data?.data?.let {
|
||||
CustomArtistImageUtil.getInstance(requireContext())
|
||||
.setCustomArtistImage(artist, it)
|
||||
}
|
||||
}
|
||||
else -> if (resultCode == Activity.RESULT_OK) {
|
||||
println("OK")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater)
|
||||
inflater.inflate(R.menu.menu_artist_detail, menu)
|
||||
|
|
|
@ -50,13 +50,13 @@ import io.github.muntashirakon.music.model.lyrics.Lyrics
|
|||
import io.github.muntashirakon.music.repository.RealRepository
|
||||
import io.github.muntashirakon.music.service.MusicService
|
||||
import io.github.muntashirakon.music.util.*
|
||||
import java.io.FileNotFoundException
|
||||
import kotlinx.android.synthetic.main.shadow_statusbar_toolbar.*
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.Dispatchers.Main
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.koin.android.ext.android.get
|
||||
import java.io.FileNotFoundException
|
||||
|
||||
abstract class AbsPlayerFragment(@LayoutRes layout: Int) : AbsMainActivityFragment(layout),
|
||||
Toolbar.OnMenuItemClickListener, IPaletteColorHolder, PlayerAlbumCoverFragment.Callbacks {
|
||||
|
|
|
@ -112,7 +112,7 @@ abstract class AbsRecyclerViewCustomGridSizeFragment<A : RecyclerView.Adapter<*>
|
|||
} else {
|
||||
0
|
||||
}
|
||||
recyclerView.setPadding(padding, padding, padding, padding)
|
||||
//recyclerView.setPadding(padding, padding, padding, padding)
|
||||
}
|
||||
|
||||
protected abstract fun setGridSize(gridSize: Int)
|
||||
|
|
|
@ -15,10 +15,14 @@
|
|||
package io.github.muntashirakon.music.fragments.base
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.*
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.annotation.NonNull
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
|
@ -28,12 +32,9 @@ import io.github.muntashirakon.music.R
|
|||
import io.github.muntashirakon.music.dialogs.CreatePlaylistDialog
|
||||
import io.github.muntashirakon.music.dialogs.ImportPlaylistDialog
|
||||
import io.github.muntashirakon.music.helper.MusicPlayerRemote
|
||||
import io.github.muntashirakon.music.state.NowPlayingPanelState
|
||||
import io.github.muntashirakon.music.util.DensityUtil
|
||||
import io.github.muntashirakon.music.util.ThemedFastScroller.create
|
||||
import io.github.muntashirakon.music.views.ScrollingViewOnApplyWindowInsetsListener
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.transition.Hold
|
||||
import kotlinx.android.synthetic.main.fragment_main_recycler.*
|
||||
import me.zhanghai.android.fastscroll.FastScroller
|
||||
import me.zhanghai.android.fastscroll.FastScrollerBuilder
|
||||
|
@ -50,15 +51,6 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
|
|||
protected var adapter: A? = null
|
||||
protected var layoutManager: LM? = null
|
||||
|
||||
private fun setUpTransitions() {
|
||||
exitTransition = Hold()
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setUpTransitions()
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
mainActivity.setBottomBarVisibility(View.VISIBLE)
|
||||
|
@ -86,12 +78,7 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
|
|||
layoutManager = this@AbsRecyclerViewFragment.layoutManager
|
||||
adapter = this@AbsRecyclerViewFragment.adapter
|
||||
val fastScroller = create(this)
|
||||
setOnApplyWindowInsetsListener(
|
||||
ScrollingViewOnApplyWindowInsetsListener(
|
||||
recyclerView,
|
||||
fastScroller
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
checkForPadding()
|
||||
}
|
||||
|
@ -125,13 +112,13 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
|
|||
|
||||
private fun checkForPadding() {
|
||||
val itemCount: Int = adapter?.itemCount ?: 0
|
||||
val params = container.layoutParams as ViewGroup.MarginLayoutParams
|
||||
|
||||
if (itemCount > 0 && MusicPlayerRemote.playingQueue.isNotEmpty()) {
|
||||
val height = DensityUtil.dip2px(requireContext(), 104f)
|
||||
params.bottomMargin = height
|
||||
val height = DensityUtil.dip2px(requireContext(), 112f)
|
||||
recyclerView.updatePadding(0, 0, 0, height)
|
||||
} else {
|
||||
val height = DensityUtil.dip2px(requireContext(), 52f)
|
||||
params.bottomMargin = height
|
||||
val height = DensityUtil.dip2px(requireContext(), 56f)
|
||||
recyclerView.updatePadding(0, 0, 0, height)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,12 +132,12 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
|
|||
protected abstract fun createAdapter(): A
|
||||
|
||||
override fun onOffsetChanged(p0: AppBarLayout?, i: Int) {
|
||||
container.setPadding(
|
||||
container.paddingLeft,
|
||||
container.paddingTop,
|
||||
container.paddingRight,
|
||||
/*recyclerView.setPadding(
|
||||
recyclerView.paddingLeft,
|
||||
recyclerView.paddingTop,
|
||||
recyclerView.paddingRight,
|
||||
i
|
||||
)
|
||||
)*/
|
||||
}
|
||||
|
||||
override fun onQueueChanged() {
|
||||
|
|
|
@ -19,10 +19,12 @@ import android.view.Menu
|
|||
import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.navigation.fragment.navArgs
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.adapter.song.SongAdapter
|
||||
import io.github.muntashirakon.music.extensions.dipToPix
|
||||
|
@ -30,11 +32,11 @@ import io.github.muntashirakon.music.fragments.base.AbsMainActivityFragment
|
|||
import io.github.muntashirakon.music.helper.menu.GenreMenuHelper
|
||||
import io.github.muntashirakon.music.model.Genre
|
||||
import io.github.muntashirakon.music.model.Song
|
||||
import io.github.muntashirakon.music.state.NowPlayingPanelState
|
||||
import java.util.*
|
||||
import com.google.android.material.transition.MaterialContainerTransform
|
||||
import kotlinx.android.synthetic.main.fragment_playlist_detail.*
|
||||
import org.koin.androidx.viewmodel.ext.android.viewModel
|
||||
import org.koin.core.parameter.parametersOf
|
||||
import java.util.*
|
||||
|
||||
class GenreDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_detail) {
|
||||
private val arguments by navArgs<GenreDetailsFragmentArgs>()
|
||||
|
@ -43,22 +45,31 @@ class GenreDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_
|
|||
}
|
||||
private lateinit var genre: Genre
|
||||
private lateinit var songAdapter: SongAdapter
|
||||
private fun setUpTransitions() {
|
||||
val transform = MaterialContainerTransform()
|
||||
transform.setAllContainerColors(ATHUtil.resolveColor(requireContext(), R.attr.colorSurface))
|
||||
sharedElementEnterTransition = transform
|
||||
}
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setUpTransitions()
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setHasOptionsMenu(true)
|
||||
mainActivity.setBottomBarVisibility(View.GONE)
|
||||
mainActivity.addMusicServiceEventListener(detailsViewModel)
|
||||
mainActivity.setSupportActionBar(toolbar)
|
||||
progressIndicator.hide()
|
||||
ViewCompat.setTransitionName(container, "genre")
|
||||
genre = arguments.extraGenre
|
||||
toolbar?.title = arguments.extraGenre.name
|
||||
setupRecyclerView()
|
||||
detailsViewModel.getSongs().observe(viewLifecycleOwner, androidx.lifecycle.Observer {
|
||||
detailsViewModel.getSongs().observe(viewLifecycleOwner, {
|
||||
songs(it)
|
||||
})
|
||||
detailsViewModel.getGenre().observe(viewLifecycleOwner, androidx.lifecycle.Observer {
|
||||
genre = it
|
||||
toolbar?.title = it.name
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
|
@ -77,7 +88,9 @@ class GenreDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_
|
|||
}
|
||||
|
||||
fun songs(songs: List<Song>) {
|
||||
songAdapter.swapDataSet(songs)
|
||||
progressIndicator.hide()
|
||||
if (songs.isNotEmpty()) songAdapter.swapDataSet(songs)
|
||||
else songAdapter.swapDataSet(emptyList())
|
||||
}
|
||||
|
||||
private fun getEmojiByUnicode(unicode: Int): String {
|
||||
|
|
|
@ -16,13 +16,20 @@ package io.github.muntashirakon.music.fragments.genres
|
|||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.navigation.fragment.FragmentNavigatorExtras
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import io.github.muntashirakon.music.EXTRA_GENRE
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.adapter.GenreAdapter
|
||||
import io.github.muntashirakon.music.fragments.base.AbsRecyclerViewFragment
|
||||
import io.github.muntashirakon.music.interfaces.IGenreClickListener
|
||||
import io.github.muntashirakon.music.model.Genre
|
||||
|
||||
class GenresFragment : AbsRecyclerViewFragment<GenreAdapter, LinearLayoutManager>() {
|
||||
class GenresFragment : AbsRecyclerViewFragment<GenreAdapter, LinearLayoutManager>(),
|
||||
IGenreClickListener {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
libraryViewModel.getGenre().observe(viewLifecycleOwner, Observer {
|
||||
|
@ -39,7 +46,7 @@ class GenresFragment : AbsRecyclerViewFragment<GenreAdapter, LinearLayoutManager
|
|||
|
||||
override fun createAdapter(): GenreAdapter {
|
||||
val dataSet = if (adapter == null) ArrayList() else adapter!!.dataSet
|
||||
return GenreAdapter(requireActivity(), dataSet, R.layout.item_list_no_image)
|
||||
return GenreAdapter(requireActivity(), dataSet, R.layout.item_list_no_image, this)
|
||||
}
|
||||
|
||||
override val emptyMessage: Int
|
||||
|
@ -54,4 +61,15 @@ class GenresFragment : AbsRecyclerViewFragment<GenreAdapter, LinearLayoutManager
|
|||
return GenresFragment()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClickGenre(genre: Genre, view: View) {
|
||||
findNavController().navigate(
|
||||
R.id.genreDetailsFragment,
|
||||
bundleOf(EXTRA_GENRE to genre),
|
||||
null,
|
||||
FragmentNavigatorExtras(
|
||||
view to "genre"
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,17 +29,13 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.common.ATHToolbarActivity
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
import io.github.muntashirakon.music.HISTORY_PLAYLIST
|
||||
import io.github.muntashirakon.music.LAST_ADDED_PLAYLIST
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.TOP_PLAYED_PLAYLIST
|
||||
import io.github.muntashirakon.music.*
|
||||
import io.github.muntashirakon.music.adapter.HomeAdapter
|
||||
import io.github.muntashirakon.music.dialogs.CreatePlaylistDialog
|
||||
import io.github.muntashirakon.music.dialogs.ImportPlaylistDialog
|
||||
import io.github.muntashirakon.music.fragments.base.AbsMainActivityFragment
|
||||
import io.github.muntashirakon.music.glide.ProfileBannerGlideRequest
|
||||
import io.github.muntashirakon.music.glide.UserProfileGlideRequest
|
||||
import io.github.muntashirakon.music.state.NowPlayingPanelState
|
||||
import io.github.muntashirakon.music.util.NavigationUtil
|
||||
import io.github.muntashirakon.music.util.PreferenceUtil
|
||||
import com.bumptech.glide.Glide
|
||||
|
@ -68,14 +64,14 @@ class HomeFragment :
|
|||
lastAdded.setOnClickListener {
|
||||
findNavController().navigate(
|
||||
R.id.detailListFragment,
|
||||
bundleOf("type" to LAST_ADDED_PLAYLIST)
|
||||
bundleOf(EXTRA_PLAYLIST_TYPE to LAST_ADDED_PLAYLIST)
|
||||
)
|
||||
}
|
||||
|
||||
topPlayed.setOnClickListener {
|
||||
findNavController().navigate(
|
||||
R.id.detailListFragment,
|
||||
bundleOf("type" to TOP_PLAYED_PLAYLIST)
|
||||
bundleOf(EXTRA_PLAYLIST_TYPE to TOP_PLAYED_PLAYLIST)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -86,7 +82,7 @@ class HomeFragment :
|
|||
history.setOnClickListener {
|
||||
findNavController().navigate(
|
||||
R.id.detailListFragment,
|
||||
bundleOf("type" to HISTORY_PLAYLIST)
|
||||
bundleOf(EXTRA_PLAYLIST_TYPE to HISTORY_PLAYLIST)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ import android.speech.RecognizerIntent
|
|||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import androidx.core.content.ContextCompat.getSystemService
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
|
@ -32,6 +30,7 @@ import io.github.muntashirakon.music.R
|
|||
import io.github.muntashirakon.music.adapter.SearchAdapter
|
||||
import io.github.muntashirakon.music.extensions.accentColor
|
||||
import io.github.muntashirakon.music.extensions.dipToPix
|
||||
import io.github.muntashirakon.music.extensions.focusAndShowKeyboard
|
||||
import io.github.muntashirakon.music.extensions.showToast
|
||||
import io.github.muntashirakon.music.fragments.base.AbsMainActivityFragment
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
|
@ -54,17 +53,16 @@ class SearchFragment : AbsMainActivityFragment(R.layout.fragment_search), TextWa
|
|||
mainActivity.setSupportActionBar(toolbar)
|
||||
libraryViewModel.clearSearchResult()
|
||||
setupRecyclerView()
|
||||
searchView.addTextChangedListener(this)
|
||||
searchView.apply {
|
||||
addTextChangedListener(this@SearchFragment)
|
||||
focusAndShowKeyboard()
|
||||
}
|
||||
voiceSearch.setOnClickListener { startMicSearch() }
|
||||
clearText.setOnClickListener { searchView.clearText() }
|
||||
keyboardPopup.apply {
|
||||
accentColor()
|
||||
setOnClickListener {
|
||||
val inputManager = getSystemService(
|
||||
requireContext(),
|
||||
InputMethodManager::class.java
|
||||
)
|
||||
inputManager?.showSoftInput(searchView, InputMethodManager.SHOW_IMPLICIT)
|
||||
searchView.focusAndShowKeyboard()
|
||||
}
|
||||
}
|
||||
if (savedInstanceState != null) {
|
||||
|
|
|
@ -25,7 +25,7 @@ import com.bumptech.glide.request.animation.GlideAnimation
|
|||
|
||||
abstract class SingleColorTarget(view: ImageView) : BitmapPaletteTarget(view) {
|
||||
|
||||
protected val defaultFooterColor: Int
|
||||
private val defaultFooterColor: Int
|
||||
get() = ATHUtil.resolveColor(view.context, R.attr.colorControlNormal)
|
||||
|
||||
abstract fun onColorReady(color: Int)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package io.github.muntashirakon.music.interfaces
|
||||
|
||||
import android.view.View
|
||||
import io.github.muntashirakon.music.model.Genre
|
||||
|
||||
interface IGenreClickListener {
|
||||
fun onClickGenre(genre: Genre, view: View)
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package io.github.muntashirakon.music.interfaces
|
||||
|
||||
import io.github.muntashirakon.music.model.Album
|
||||
import io.github.muntashirakon.music.model.Artist
|
||||
import io.github.muntashirakon.music.model.Genre
|
||||
|
||||
interface IHomeClickListener {
|
||||
fun onAlbumClick(album: Album)
|
||||
|
||||
fun onArtistClick(artist: Artist)
|
||||
|
||||
fun onGenreClick(genre: Genre)
|
||||
}
|
|
@ -30,11 +30,12 @@ import androidx.fragment.app.DialogFragment
|
|||
import androidx.viewpager.widget.PagerAdapter
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||
import io.github.muntashirakon.music.App
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.extensions.colorButtons
|
||||
import io.github.muntashirakon.music.extensions.colorControlNormal
|
||||
import io.github.muntashirakon.music.extensions.materialDialog
|
||||
import io.github.muntashirakon.music.extensions.*
|
||||
import io.github.muntashirakon.music.fragments.AlbumCoverStyle
|
||||
import io.github.muntashirakon.music.fragments.AlbumCoverStyle.*
|
||||
import io.github.muntashirakon.music.util.NavigationUtil
|
||||
import io.github.muntashirakon.music.util.PreferenceUtil
|
||||
import io.github.muntashirakon.music.util.ViewUtil
|
||||
import com.bumptech.glide.Glide
|
||||
|
@ -115,7 +116,7 @@ class AlbumCoverStylePreferenceDialog : DialogFragment(),
|
|||
val proText = layout.findViewById<TextView>(R.id.proText)
|
||||
Glide.with(context).load(albumCoverStyle.drawableResId).into(image)
|
||||
title.setText(albumCoverStyle.titleRes)
|
||||
proText.setText(R.string.pro)
|
||||
proText.hide()
|
||||
return layout
|
||||
}
|
||||
|
||||
|
|
|
@ -29,13 +29,14 @@ import androidx.fragment.app.DialogFragment
|
|||
import androidx.viewpager.widget.PagerAdapter
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.extensions.colorButtons
|
||||
import io.github.muntashirakon.music.extensions.colorControlNormal
|
||||
import io.github.muntashirakon.music.extensions.materialDialog
|
||||
import io.github.muntashirakon.music.fragments.NowPlayingScreen.*
|
||||
import io.github.muntashirakon.music.util.PreferenceUtil
|
||||
import io.github.muntashirakon.music.util.ViewUtil
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.extensions.*
|
||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen
|
||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen.*
|
||||
import code.name.monkey.retromusic.util.NavigationUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import com.bumptech.glide.Glide
|
||||
|
||||
class NowPlayingScreenPreference @JvmOverloads constructor(
|
||||
|
@ -119,7 +120,7 @@ private class NowPlayingScreenAdapter(private val context: Context) : PagerAdapt
|
|||
val proText = layout.findViewById<TextView>(R.id.proText)
|
||||
Glide.with(context).load(nowPlayingScreen.drawableResId).into(image)
|
||||
title.setText(nowPlayingScreen.titleRes)
|
||||
proText.setText(R.string.pro)
|
||||
proText.hide()
|
||||
return layout
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class RealSearchRepository(
|
|||
private val roomRepository: RoomRepository,
|
||||
private val genreRepository: GenreRepository,
|
||||
) {
|
||||
suspend fun searchAll(context: Context, query: String?): MutableList<Any> {
|
||||
fun searchAll(context: Context, query: String?): MutableList<Any> {
|
||||
val results = mutableListOf<Any>()
|
||||
query?.let { searchString ->
|
||||
val songs = songRepository.songs(searchString)
|
||||
|
@ -53,14 +53,14 @@ class RealSearchRepository(
|
|||
results.add(context.resources.getString(R.string.genres))
|
||||
results.addAll(genres)
|
||||
}
|
||||
val playlist = roomRepository.playlistWithSongs().filter { playlist ->
|
||||
playlist.playlistEntity.playlistName.toLowerCase(Locale.getDefault())
|
||||
/* val playlist = roomRepository.playlists().filter { playlist ->
|
||||
playlist.playlistName.toLowerCase(Locale.getDefault())
|
||||
.contains(searchString.toLowerCase(Locale.getDefault()))
|
||||
}
|
||||
if (playlist.isNotEmpty()) {
|
||||
results.add(context.getString(R.string.playlists))
|
||||
results.addAll(playlist)
|
||||
}
|
||||
}*/
|
||||
}
|
||||
return results
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@ import androidx.core.text.HtmlCompat
|
|||
import androidx.media.app.NotificationCompat.MediaStyle
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.activities.MainActivity
|
||||
import io.github.muntashirakon.music.db.PlaylistEntity
|
||||
import io.github.muntashirakon.music.db.toSongEntity
|
||||
import io.github.muntashirakon.music.glide.SongGlideRequest
|
||||
import io.github.muntashirakon.music.glide.palette.BitmapPaletteWrapper
|
||||
import io.github.muntashirakon.music.service.MusicService
|
||||
|
@ -38,17 +40,25 @@ import com.bumptech.glide.Glide
|
|||
import com.bumptech.glide.request.animation.GlideAnimation
|
||||
import com.bumptech.glide.request.target.SimpleTarget
|
||||
import com.bumptech.glide.request.target.Target
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import org.koin.core.KoinComponent
|
||||
|
||||
class PlayingNotificationImpl : PlayingNotification() {
|
||||
class PlayingNotificationImpl : PlayingNotification(), KoinComponent {
|
||||
private var target: Target<BitmapPaletteWrapper>? = null
|
||||
|
||||
@Synchronized
|
||||
override fun update() {
|
||||
stopped = false
|
||||
|
||||
GlobalScope.launch {
|
||||
val song = service.currentSong
|
||||
val playlist: PlaylistEntity? = MusicUtil.repository.favoritePlaylist()
|
||||
val isPlaying = service.isPlaying
|
||||
val isFavorite = MusicUtil.isFavorite(service, song)
|
||||
val isFavorite = if (playlist != null) {
|
||||
val songEntity = song.toSongEntity(playlist.playListId)
|
||||
MusicUtil.repository.isFavoriteSong(songEntity).isNotEmpty()
|
||||
} else false
|
||||
|
||||
val playButtonResId =
|
||||
if (isPlaying) R.drawable.ic_pause_white_48dp else R.drawable.ic_play_arrow_white_48dp
|
||||
val favoriteResId =
|
||||
|
@ -174,6 +184,7 @@ class PlayingNotificationImpl : PlayingNotification() {
|
|||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun retrievePlaybackAction(action: String): PendingIntent {
|
||||
val serviceName = ComponentName(service, MusicService::class.java)
|
||||
|
|
|
@ -15,7 +15,9 @@ import android.widget.Toast
|
|||
import androidx.core.content.FileProvider
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.db.PlaylistEntity
|
||||
import io.github.muntashirakon.music.db.SongEntity
|
||||
import io.github.muntashirakon.music.db.toSongEntity
|
||||
import io.github.muntashirakon.music.extensions.getLong
|
||||
import io.github.muntashirakon.music.helper.MusicPlayerRemote.removeFromQueue
|
||||
import io.github.muntashirakon.music.model.Artist
|
||||
|
@ -24,8 +26,11 @@ import io.github.muntashirakon.music.model.Song
|
|||
import io.github.muntashirakon.music.model.lyrics.AbsSynchronizedLyrics
|
||||
import io.github.muntashirakon.music.repository.RealPlaylistRepository
|
||||
import io.github.muntashirakon.music.repository.RealSongRepository
|
||||
import io.github.muntashirakon.music.repository.Repository
|
||||
import io.github.muntashirakon.music.repository.SongRepository
|
||||
import io.github.muntashirakon.music.service.MusicService
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import org.jaudiotagger.audio.AudioFileIO
|
||||
import org.jaudiotagger.tag.FieldKey
|
||||
import org.koin.core.KoinComponent
|
||||
|
@ -321,17 +326,22 @@ object MusicUtil : KoinComponent {
|
|||
return playlist.name == context.getString(R.string.favorites)
|
||||
}
|
||||
|
||||
val repository = get<Repository>()
|
||||
fun toggleFavorite(context: Context, song: Song) {
|
||||
if (isFavorite(context, song)) {
|
||||
PlaylistsUtil.removeFromPlaylist(context, song, getFavoritesPlaylist(context).id)
|
||||
GlobalScope.launch {
|
||||
val playlist: PlaylistEntity? = repository.favoritePlaylist()
|
||||
if (playlist != null) {
|
||||
val songEntity = song.toSongEntity(playlist.playListId)
|
||||
val isFavorite = repository.isFavoriteSong(songEntity).isNotEmpty()
|
||||
if (isFavorite) {
|
||||
repository.removeSongFromPlaylist(songEntity)
|
||||
} else {
|
||||
PlaylistsUtil.addToPlaylist(
|
||||
context, song, getOrCreateFavoritesPlaylist(context).id,
|
||||
false
|
||||
)
|
||||
repository.insertSongs(listOf(song.toSongEntity(playlist.playListId)))
|
||||
}
|
||||
}
|
||||
context.sendBroadcast(Intent(MusicService.FAVORITE_STATE_CHANGED))
|
||||
}
|
||||
}
|
||||
|
||||
private fun getFavoritesPlaylist(context: Context): Playlist {
|
||||
return RealPlaylistRepository(context.contentResolver).playlist(context.getString(R.string.favorites))
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.github.muntashirakon.music.util
|
||||
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener
|
||||
import android.net.ConnectivityManager
|
||||
import android.net.NetworkInfo
|
||||
|
@ -8,75 +7,7 @@ import androidx.core.content.ContextCompat
|
|||
import androidx.core.content.edit
|
||||
import androidx.preference.PreferenceManager
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import io.github.muntashirakon.music.ADAPTIVE_COLOR_APP
|
||||
import io.github.muntashirakon.music.ALBUM_ARTISTS_ONLY
|
||||
import io.github.muntashirakon.music.ALBUM_ART_ON_LOCK_SCREEN
|
||||
import io.github.muntashirakon.music.ALBUM_COVER_STYLE
|
||||
import io.github.muntashirakon.music.ALBUM_COVER_TRANSFORM
|
||||
import io.github.muntashirakon.music.ALBUM_DETAIL_SONG_SORT_ORDER
|
||||
import io.github.muntashirakon.music.ALBUM_GRID_SIZE
|
||||
import io.github.muntashirakon.music.ALBUM_GRID_SIZE_LAND
|
||||
import io.github.muntashirakon.music.ALBUM_GRID_STYLE
|
||||
import io.github.muntashirakon.music.ALBUM_SONG_SORT_ORDER
|
||||
import io.github.muntashirakon.music.ALBUM_SORT_ORDER
|
||||
import io.github.muntashirakon.music.ARTIST_ALBUM_SORT_ORDER
|
||||
import io.github.muntashirakon.music.ARTIST_GRID_SIZE
|
||||
import io.github.muntashirakon.music.ARTIST_GRID_SIZE_LAND
|
||||
import io.github.muntashirakon.music.ARTIST_GRID_STYLE
|
||||
import io.github.muntashirakon.music.ARTIST_SONG_SORT_ORDER
|
||||
import io.github.muntashirakon.music.ARTIST_SORT_ORDER
|
||||
import io.github.muntashirakon.music.AUDIO_DUCKING
|
||||
import io.github.muntashirakon.music.AUTO_DOWNLOAD_IMAGES_POLICY
|
||||
import io.github.muntashirakon.music.App
|
||||
import io.github.muntashirakon.music.BLACK_THEME
|
||||
import io.github.muntashirakon.music.BLUETOOTH_PLAYBACK
|
||||
import io.github.muntashirakon.music.BLURRED_ALBUM_ART
|
||||
import io.github.muntashirakon.music.CAROUSEL_EFFECT
|
||||
import io.github.muntashirakon.music.CHOOSE_EQUALIZER
|
||||
import io.github.muntashirakon.music.CLASSIC_NOTIFICATION
|
||||
import io.github.muntashirakon.music.COLORED_APP_SHORTCUTS
|
||||
import io.github.muntashirakon.music.COLORED_NOTIFICATION
|
||||
import io.github.muntashirakon.music.DESATURATED_COLOR
|
||||
import io.github.muntashirakon.music.EXPAND_NOW_PLAYING_PANEL
|
||||
import io.github.muntashirakon.music.EXTRA_SONG_INFO
|
||||
import io.github.muntashirakon.music.FILTER_SONG
|
||||
import io.github.muntashirakon.music.GAP_LESS_PLAYBACK
|
||||
import io.github.muntashirakon.music.GENERAL_THEME
|
||||
import io.github.muntashirakon.music.GENRE_SORT_ORDER
|
||||
import io.github.muntashirakon.music.HOME_ALBUM_GRID_STYLE
|
||||
import io.github.muntashirakon.music.HOME_ARTIST_GRID_STYLE
|
||||
import io.github.muntashirakon.music.IGNORE_MEDIA_STORE_ARTWORK
|
||||
import io.github.muntashirakon.music.INITIALIZED_BLACKLIST
|
||||
import io.github.muntashirakon.music.KEEP_SCREEN_ON
|
||||
import io.github.muntashirakon.music.LANGUAGE_NAME
|
||||
import io.github.muntashirakon.music.LAST_ADDED_CUTOFF
|
||||
import io.github.muntashirakon.music.LAST_CHANGELOG_VERSION
|
||||
import io.github.muntashirakon.music.LAST_PAGE
|
||||
import io.github.muntashirakon.music.LAST_SLEEP_TIMER_VALUE
|
||||
import io.github.muntashirakon.music.LIBRARY_CATEGORIES
|
||||
import io.github.muntashirakon.music.LOCK_SCREEN
|
||||
import io.github.muntashirakon.music.LYRICS_OPTIONS
|
||||
import io.github.muntashirakon.music.NEXT_SLEEP_TIMER_ELAPSED_REALTIME
|
||||
import io.github.muntashirakon.music.NOW_PLAYING_SCREEN_ID
|
||||
import io.github.muntashirakon.music.PAUSE_ON_ZERO_VOLUME
|
||||
import io.github.muntashirakon.music.PLAYLIST_SORT_ORDER
|
||||
import io.github.muntashirakon.music.R
|
||||
import io.github.muntashirakon.music.RECENTLY_PLAYED_CUTOFF
|
||||
import io.github.muntashirakon.music.SAF_SDCARD_URI
|
||||
import io.github.muntashirakon.music.SLEEP_TIMER_FINISH_SONG
|
||||
import io.github.muntashirakon.music.SONG_GRID_SIZE
|
||||
import io.github.muntashirakon.music.SONG_GRID_SIZE_LAND
|
||||
import io.github.muntashirakon.music.SONG_GRID_STYLE
|
||||
import io.github.muntashirakon.music.SONG_SORT_ORDER
|
||||
import io.github.muntashirakon.music.START_DIRECTORY
|
||||
import io.github.muntashirakon.music.TAB_TEXT_MODE
|
||||
import io.github.muntashirakon.music.TOGGLE_ADD_CONTROLS
|
||||
import io.github.muntashirakon.music.TOGGLE_FULL_SCREEN
|
||||
import io.github.muntashirakon.music.TOGGLE_HEADSET
|
||||
import io.github.muntashirakon.music.TOGGLE_HOME_BANNER
|
||||
import io.github.muntashirakon.music.TOGGLE_SHUFFLE
|
||||
import io.github.muntashirakon.music.TOGGLE_VOLUME
|
||||
import io.github.muntashirakon.music.USER_NAME
|
||||
import io.github.muntashirakon.music.*
|
||||
import io.github.muntashirakon.music.extensions.getIntRes
|
||||
import io.github.muntashirakon.music.extensions.getStringOrDefault
|
||||
import io.github.muntashirakon.music.fragments.AlbumCoverStyle
|
||||
|
@ -84,13 +15,7 @@ import io.github.muntashirakon.music.fragments.NowPlayingScreen
|
|||
import io.github.muntashirakon.music.fragments.folder.FoldersFragment
|
||||
import io.github.muntashirakon.music.helper.SortOrder.*
|
||||
import io.github.muntashirakon.music.model.CategoryInfo
|
||||
import io.github.muntashirakon.music.transform.CascadingPageTransformer
|
||||
import io.github.muntashirakon.music.transform.DepthTransformation
|
||||
import io.github.muntashirakon.music.transform.HingeTransformation
|
||||
import io.github.muntashirakon.music.transform.HorizontalFlipTransformation
|
||||
import io.github.muntashirakon.music.transform.NormalPageTransformer
|
||||
import io.github.muntashirakon.music.transform.VerticalFlipTransformation
|
||||
import io.github.muntashirakon.music.transform.VerticalStackTransformer
|
||||
import io.github.muntashirakon.music.transform.*
|
||||
import io.github.muntashirakon.music.util.theme.ThemeMode
|
||||
import com.google.android.material.bottomnavigation.LabelVisibilityMode
|
||||
import com.google.gson.Gson
|
||||
|
@ -183,13 +108,6 @@ object PreferenceUtil {
|
|||
putString(SAF_SDCARD_URI, value)
|
||||
}
|
||||
|
||||
|
||||
val selectedEqualizer
|
||||
get() = sharedPreferences.getStringOrDefault(
|
||||
CHOOSE_EQUALIZER,
|
||||
"system"
|
||||
)
|
||||
|
||||
val autoDownloadImagesPolicy
|
||||
get() = sharedPreferences.getStringOrDefault(
|
||||
AUTO_DOWNLOAD_IMAGES_POLICY,
|
||||
|
@ -458,11 +376,6 @@ object PreferenceUtil {
|
|||
putInt(LAST_SLEEP_TIMER_VALUE, value)
|
||||
}
|
||||
|
||||
var lastPage
|
||||
get() = sharedPreferences.getInt(LAST_PAGE, R.id.action_song)
|
||||
set(value) = sharedPreferences.edit {
|
||||
putInt(LAST_PAGE, value)
|
||||
}
|
||||
|
||||
var nextSleepTimerElapsedRealTime
|
||||
get() = sharedPreferences.getInt(
|
||||
|
@ -486,8 +399,8 @@ object PreferenceUtil {
|
|||
val position = sharedPreferences.getStringOrDefault(
|
||||
HOME_ARTIST_GRID_STYLE, "0"
|
||||
).toInt()
|
||||
val typedArray =
|
||||
App.getContext().resources.obtainTypedArray(R.array.pref_home_grid_style_layout)
|
||||
val typedArray = App.getContext()
|
||||
.resources.obtainTypedArray(R.array.pref_home_grid_style_layout)
|
||||
val layoutRes = typedArray.getResourceId(position, 0)
|
||||
typedArray.recycle()
|
||||
return if (layoutRes == 0) {
|
||||
|
@ -497,10 +410,12 @@ object PreferenceUtil {
|
|||
|
||||
val homeAlbumGridStyle: Int
|
||||
get() {
|
||||
val position = sharedPreferences.getStringOrDefault(HOME_ALBUM_GRID_STYLE, "4").toInt()
|
||||
val typedArray =
|
||||
App.getContext().resources.obtainTypedArray(R.array.pref_home_grid_style_layout)
|
||||
val layoutRes = typedArray.getResourceId(position, 0)
|
||||
val position = sharedPreferences.getStringOrDefault(
|
||||
HOME_ALBUM_GRID_STYLE, "4"
|
||||
).toInt()
|
||||
val typedArray = App.getContext()
|
||||
.resources.obtainTypedArray(R.array.pref_home_grid_style_layout)
|
||||
val layoutRes = typedArray.getResourceId(position, 4)
|
||||
typedArray.recycle()
|
||||
return if (layoutRes == 0) {
|
||||
R.layout.item_artist
|
||||
|
@ -510,7 +425,7 @@ object PreferenceUtil {
|
|||
val tabTitleMode: Int
|
||||
get() {
|
||||
return when (sharedPreferences.getStringOrDefault(
|
||||
TAB_TEXT_MODE, "0"
|
||||
TAB_TEXT_MODE, "1"
|
||||
).toInt()) {
|
||||
1 -> LabelVisibilityMode.LABEL_VISIBILITY_LABELED
|
||||
0 -> LabelVisibilityMode.LABEL_VISIBILITY_AUTO
|
||||
|
@ -639,32 +554,9 @@ object PreferenceUtil {
|
|||
}
|
||||
|
||||
fun getRecentlyPlayedCutoffTimeMillis(): Long {
|
||||
return getCutoffTimeMillis(RECENTLY_PLAYED_CUTOFF)
|
||||
}
|
||||
|
||||
fun getRecentlyPlayedCutoffText(context: Context): String? {
|
||||
return getCutoffText(RECENTLY_PLAYED_CUTOFF, context)
|
||||
}
|
||||
|
||||
private fun getCutoffText(
|
||||
cutoff: String,
|
||||
context: Context
|
||||
): String? {
|
||||
return when (sharedPreferences.getString(cutoff, "")) {
|
||||
"today" -> context.getString(R.string.today)
|
||||
"this_week" -> context.getString(R.string.this_week)
|
||||
"past_seven_days" -> context.getString(R.string.past_seven_days)
|
||||
"past_three_months" -> context.getString(R.string.past_three_months)
|
||||
"this_year" -> context.getString(R.string.this_year)
|
||||
"this_month" -> context.getString(R.string.this_month)
|
||||
else -> context.getString(R.string.this_month)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getCutoffTimeMillis(cutoff: String): Long {
|
||||
val calendarUtil = CalendarUtil()
|
||||
val interval: Long
|
||||
interval = when (sharedPreferences.getString(cutoff, "")) {
|
||||
interval = when (sharedPreferences.getString(RECENTLY_PLAYED_CUTOFF, "")) {
|
||||
"today" -> calendarUtil.elapsedToday
|
||||
"this_week" -> calendarUtil.elapsedWeek
|
||||
"past_seven_days" -> calendarUtil.getElapsedDays(7)
|
||||
|
@ -690,5 +582,4 @@ object PreferenceUtil {
|
|||
}
|
||||
return (System.currentTimeMillis() - interval) / 1000
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ class RingtoneManager(val context: Context) {
|
|||
return false
|
||||
}
|
||||
|
||||
fun getDialog(context: Context): AlertDialog {
|
||||
fun getDialog(context: Context) {
|
||||
return MaterialAlertDialogBuilder(context, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(R.string.dialog_title_set_ringtone)
|
||||
.setMessage(R.string.dialog_message_set_ringtone)
|
||||
|
@ -82,7 +82,7 @@ class RingtoneManager(val context: Context) {
|
|||
context.startActivity(intent)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.create()
|
||||
.create().show()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
android:duration="150" />
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"
|
||||
android:duration="150" />
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromXDelta="50%p"
|
||||
android:toXDelta="0" />
|
||||
<alpha
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0" />
|
||||
</set>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="-50%p" />
|
||||
<alpha
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0" />
|
||||
</set>
|
|
@ -1,72 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group android:scaleX="0.12342857"
|
||||
android:scaleY="0.12342857"
|
||||
android:translateX="36.966858"
|
||||
android:translateY="32.4">
|
||||
<path
|
||||
android:pathData="M10.256,0L265.4,0C268.967,0 270.26,0.371 271.563,1.069C272.867,1.766 273.89,2.789 274.587,4.093C275.285,5.396 275.656,6.689 275.656,10.256L275.656,177.191C275.656,180.757 275.285,182.05 274.587,183.353C273.89,184.657 272.867,185.68 271.563,186.378C270.26,187.075 268.967,187.446 265.4,187.446L10.256,187.446C6.689,187.446 5.396,187.075 4.093,186.378C2.789,185.68 1.766,184.657 1.069,183.353C0.371,182.05 0,180.757 -0,177.191L0,10.256C-0,6.689 0.371,5.396 1.069,4.093C1.766,2.789 2.789,1.766 4.093,1.069C5.396,0.371 6.689,0 10.256,0Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="236.10738"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M262.814,336.03L0.163,75.53L0.006,183.375C0.002,185.781 0.962,188.088 2.67,189.781L161.703,347.393C163.201,348.877 165.225,349.711 167.334,349.711L257.18,349.711C261.598,349.711 265.18,346.129 265.18,341.711C265.18,339.577 264.328,337.533 262.814,336.03Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="250.9684"
|
||||
android:centerX="-32.788143"
|
||||
android:centerY="67.34283"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M8.035,349.71L59.204,349.71C63.623,349.71 67.204,346.128 67.204,341.71C67.204,339.608 66.377,337.59 64.901,336.093L13.732,284.191C10.63,281.045 5.565,281.009 2.418,284.111C0.894,285.614 0.035,287.666 0.035,289.808L0.035,341.71C0.035,346.128 3.617,349.71 8.035,349.71Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="95.39285"
|
||||
android:centerX="-268.79202"
|
||||
android:centerY="57.347355"
|
||||
android:type="radial">
|
||||
<item
|
||||
android:offset="0"
|
||||
android:color="#FF3D5AFE" />
|
||||
<item
|
||||
android:offset="1"
|
||||
android:color="#FF651FFF" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
</vector>
|
|
@ -1,15 +0,0 @@
|
|||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="NewApi">
|
||||
<item
|
||||
android:id="@+id/state_on"
|
||||
android:drawable="@drawable/ic_album"
|
||||
android:state_checked="true" />
|
||||
<item
|
||||
android:id="@+id/state_off"
|
||||
android:drawable="@drawable/ic_album" />
|
||||
<transition
|
||||
android:drawable="@drawable/avd_album"
|
||||
android:fromId="@id/state_off"
|
||||
android:toId="@id/state_on" />
|
||||
</animated-selector>
|
|
@ -1,15 +0,0 @@
|
|||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="NewApi">
|
||||
<item
|
||||
android:id="@+id/state_on"
|
||||
android:drawable="@drawable/ic_home"
|
||||
android:state_checked="true" />
|
||||
<item
|
||||
android:id="@+id/state_off"
|
||||
android:drawable="@drawable/ic_home" />
|
||||
<transition
|
||||
android:drawable="@drawable/avd_home"
|
||||
android:fromId="@id/state_off"
|
||||
android:toId="@id/state_on" />
|
||||
</animated-selector>
|
|
@ -1,15 +0,0 @@
|
|||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="NewApi">
|
||||
<item
|
||||
android:id="@+id/state_on"
|
||||
android:drawable="@drawable/ic_audiotrack"
|
||||
android:state_checked="true" />
|
||||
<item
|
||||
android:id="@+id/state_off"
|
||||
android:drawable="@drawable/ic_audiotrack" />
|
||||
<transition
|
||||
android:drawable="@drawable/avd_music_note"
|
||||
android:fromId="@id/state_off"
|
||||
android:toId="@id/state_on" />
|
||||
</animated-selector>
|
|
@ -1,38 +0,0 @@
|
|||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt">
|
||||
<aapt:attr name="android:drawable">
|
||||
<vector
|
||||
android:name="vector"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:name="path"
|
||||
android:pathData="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 16.5 C 9.51 16.5 7.5 14.49 7.5 12 C 7.5 9.51 9.51 7.5 12 7.5 C 14.49 7.5 16.5 9.51 16.5 12 C 16.5 14.49 14.49 16.5 12 16.5 Z M 12 11 C 11.45 11 11 11.45 11 12 C 11 12.55 11.45 13 12 13 C 12.55 13 13 12.55 13 12 C 13 11.45 12.55 11 12 11 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
||||
</aapt:attr>
|
||||
<target android:name="path">
|
||||
<aapt:attr name="android:animation">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:propertyName="pathData"
|
||||
android:duration="200"
|
||||
android:valueFrom="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 16.5 C 9.51 16.5 7.5 14.49 7.5 12 C 7.5 9.51 9.51 7.5 12 7.5 C 14.49 7.5 16.5 9.51 16.5 12 C 16.5 14.49 14.49 16.5 12 16.5 Z M 12 11 C 11.45 11 11 11.45 11 12 C 11 12.55 11.45 13 12 13 C 12.55 13 13 12.55 13 12 C 13 11.45 12.55 11 12 11 Z M 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 L 12 12"
|
||||
android:valueTo="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 20 C 7.59 20 4 16.41 4 12 C 4 7.59 7.59 4 12 4 C 16.41 4 20 7.59 20 12 C 20 16.41 16.41 20 12 20 Z M 12 7.5 C 9.51 7.5 7.5 9.51 7.5 12 C 7.5 14.49 9.51 16.5 12 16.5 C 14.49 16.5 16.5 14.49 16.5 12 C 16.5 9.51 14.49 7.5 12 7.5 Z M 12 13 C 11.45 13 11 12.55 11 12 C 11 11.45 11.45 11 12 11 C 12.55 11 13 11.45 13 12 C 13 12.55 12.55 13 12 13 L 12 13"
|
||||
android:valueType="pathType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="pathData"
|
||||
android:startOffset="200"
|
||||
android:duration="200"
|
||||
android:valueFrom="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 20 C 7.59 20 4 16.41 4 12 C 4 7.59 7.59 4 12 4 C 16.41 4 20 7.59 20 12 C 20 16.41 16.41 20 12 20 Z M 12 7.5 C 9.51 7.5 7.5 9.51 7.5 12 C 7.5 14.49 9.51 16.5 12 16.5 C 14.49 16.5 16.5 14.49 16.5 12 C 16.5 9.51 14.49 7.5 12 7.5 Z M 12 13 C 12.55 13 13 12.55 13 12 C 13 11.45 12.55 11 12 11 C 11.45 11 11 11.45 11 12 C 11 12.55 11.45 13 12 13 L 12 13"
|
||||
android:valueTo="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z M 12 16.5 C 9.51 16.5 7.5 14.49 7.5 12 C 7.5 9.51 9.51 7.5 12 7.5 C 14.49 7.5 16.5 9.51 16.5 12 C 16.5 14.49 14.49 16.5 12 16.5 Z M 12 11 C 11.45 11 11 11.45 11 12 C 11 12.55 11.45 13 12 13 C 12.55 13 13 12.55 13 12 C 13 11.45 12.55 11 12 11 Z M 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 C 12 12 12 12 12 12 L 12 12"
|
||||
android:valueType="pathType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</set>
|
||||
</aapt:attr>
|
||||
</target>
|
||||
</animated-vector>
|
|
@ -1,95 +0,0 @@
|
|||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt">
|
||||
<aapt:attr name="android:drawable">
|
||||
<vector
|
||||
android:name="home"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group android:name="home_icon">
|
||||
<path
|
||||
android:name="home_data"
|
||||
android:pathData="M 10 19 L 10 14 L 14 14 L 14 19 C 14 19.55 14.45 20 15 20 L 18 20 C 18.55 20 19 19.55 19 19 L 19 12 L 20.7 12 C 21.16 12 21.38 11.43 21.03 11.13 L 12.67 3.6 C 12.29 3.26 11.71 3.26 11.33 3.6 L 2.97 11.13 C 2.63 11.43 2.84 12 3.3 12 L 5 12 L 5 19 C 5 19.55 5.45 20 6 20 L 9 20 C 9.55 20 10 19.55 10 19 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1" />
|
||||
</group>
|
||||
<group
|
||||
android:name="sun"
|
||||
android:translateX="-5"
|
||||
android:translateY="4"
|
||||
android:scaleX="0.2"
|
||||
android:scaleY="0.2">
|
||||
<path
|
||||
android:name="sun_data"
|
||||
android:pathData="M 12 2 C 6.48 2 2 6.48 2 12 C 2 17.52 6.48 22 12 22 C 17.52 22 22 17.52 22 12 C 22 6.48 17.52 2 12 2 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1" />
|
||||
</group>
|
||||
<group
|
||||
android:name="cloud"
|
||||
android:translateX="2"
|
||||
android:scaleX="0.2"
|
||||
android:scaleY="0.2">
|
||||
<path
|
||||
android:name="path"
|
||||
android:pathData="M 19.37 10.04 C 18.68 6.59 15.65 4 12.01 4 C 9.12 4 6.61 5.64 5.36 8.04 C 2.35 8.36 0.01 10.91 0.01 14 C 0.01 17.31 2.7 20 6.01 20 L 19.01 20 C 21.77 20 24.01 17.76 24.01 15 C 24.01 12.36 21.96 10.22 19.37 10.04 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1" />
|
||||
</group>
|
||||
<group
|
||||
android:name="cloud_1"
|
||||
android:translateX="1"
|
||||
android:translateY="4"
|
||||
android:scaleX="0.1"
|
||||
android:scaleY="0.1">
|
||||
<path
|
||||
android:name="cloud_2"
|
||||
android:pathData="M 19.37 10.04 C 18.68 6.59 15.65 4 12.01 4 C 9.12 4 6.61 5.64 5.36 8.04 C 2.35 8.36 0.01 10.91 0.01 14 C 0.01 17.31 2.7 20 6.01 20 L 19.01 20 C 21.77 20 24.01 17.76 24.01 15 C 24.01 12.36 21.96 10.22 19.37 10.04 Z"
|
||||
android:fillColor="#000000" />
|
||||
</group>
|
||||
</vector>
|
||||
</aapt:attr>
|
||||
<target android:name="sun">
|
||||
<aapt:attr name="android:animation">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:propertyName="translateX"
|
||||
android:duration="400"
|
||||
android:valueFrom="-5"
|
||||
android:valueTo="16"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:duration="400"
|
||||
android:valueFrom="10"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</set>
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="cloud">
|
||||
<aapt:attr name="android:animation">
|
||||
<objectAnimator
|
||||
android:propertyName="translateX"
|
||||
android:duration="400"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="24"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="cloud_1">
|
||||
<aapt:attr name="android:animation">
|
||||
<objectAnimator
|
||||
android:propertyName="translateX"
|
||||
android:duration="400"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="12"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
</animated-vector>
|
|
@ -1,114 +0,0 @@
|
|||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt">
|
||||
<aapt:attr name="android:drawable">
|
||||
<vector
|
||||
android:name="vector"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group android:name="group_1">
|
||||
<path
|
||||
android:name="note_1"
|
||||
android:pathData="M 12 5 L 12 13.55 C 11.06 13.01 9.9 12.8 8.67 13.23 C 7.33 13.71 6.3 14.9 6.06 16.3 C 5.6 19.04 7.92 21.38 10.65 20.95 C 12.61 20.64 14 18.84 14 16.85 L 14 7 L 16 7 C 17.1 7 18 6.1 18 5 C 18 3.9 17.1 3 16 3 L 14 3 C 12.9 3 12 3.9 12 5 Z"
|
||||
android:fillColor="#000"
|
||||
android:strokeWidth="1" />
|
||||
</group>
|
||||
<group
|
||||
android:name="group_2"
|
||||
android:translateX="-2"
|
||||
android:translateY="13"
|
||||
android:scaleX="0.4"
|
||||
android:scaleY="0.4">
|
||||
<path
|
||||
android:name="note_2"
|
||||
android:pathData="M 12 5 L 12 13.55 C 11.06 13.01 9.9 12.8 8.67 13.23 C 7.33 13.71 6.3 14.9 6.06 16.3 C 5.6 19.04 7.92 21.38 10.65 20.95 C 12.61 20.64 14 18.84 14 16.85 L 14 7 L 16 7 C 17.1 7 18 6.1 18 5 C 18 3.9 17.1 3 16 3 L 14 3 C 12.9 3 12 3.9 12 5 Z"
|
||||
android:fillColor="#000000" />
|
||||
</group>
|
||||
<group
|
||||
android:name="group_3"
|
||||
android:translateX="16"
|
||||
android:translateY="-1"
|
||||
android:scaleX="0.4"
|
||||
android:scaleY="0.4">
|
||||
<path
|
||||
android:name="path"
|
||||
android:pathData="M 12 5 L 12 13.55 C 11.06 13.01 9.9 12.8 8.67 13.23 C 7.33 13.71 6.3 14.9 6.06 16.3 C 5.6 19.04 7.92 21.38 10.65 20.95 C 12.61 20.64 14 18.84 14 16.85 L 14 7 L 16 7 C 17.1 7 18 6.1 18 5 C 18 3.9 17.1 3 16 3 L 14 3 C 12.9 3 12 3.9 12 5 Z"
|
||||
android:fillColor="#000000" />
|
||||
</group>
|
||||
</vector>
|
||||
</aapt:attr>
|
||||
<target android:name="group_1">
|
||||
<aapt:attr name="android:animation">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:duration="100"
|
||||
android:valueFrom="-3"
|
||||
android:valueTo="3"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:startOffset="125"
|
||||
android:duration="76"
|
||||
android:valueFrom="-1"
|
||||
android:valueTo="-2"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:startOffset="225"
|
||||
android:duration="175"
|
||||
android:valueFrom="-1"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</set>
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="group_2">
|
||||
<aapt:attr name="android:animation">
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:duration="400"
|
||||
android:valueFrom="13"
|
||||
android:valueTo="-11"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="group_3">
|
||||
<aapt:attr name="android:animation">
|
||||
<objectAnimator
|
||||
android:propertyName="translateY"
|
||||
android:duration="400"
|
||||
android:valueFrom="-1"
|
||||
android:valueTo="15"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="note_2">
|
||||
<aapt:attr name="android:animation">
|
||||
<objectAnimator
|
||||
android:propertyName="fillAlpha"
|
||||
android:duration="400"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="path">
|
||||
<aapt:attr name="android:animation">
|
||||
<objectAnimator
|
||||
android:propertyName="fillAlpha"
|
||||
android:duration="400"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
||||
</aapt:attr>
|
||||
</target>
|
||||
</animated-vector>
|
|
@ -1,35 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2019 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape
|
||||
android:dither="true"
|
||||
android:shape="ring"
|
||||
android:thickness="3dp"
|
||||
android:type="sweep"
|
||||
android:useLevel="false">
|
||||
<solid android:color="?android:attr/textColorSecondary" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<shape
|
||||
android:shape="ring"
|
||||
android:thickness="3dp"
|
||||
android:type="sweep"
|
||||
android:useLevel="true">
|
||||
<solid android:color="?attr/colorAccent" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M3 8c0 0.55 0.45 1 1 1s1-0.45 1-1V6h2c0.55 0 1-0.45 1-1s-0.45-1-1-1H5V2c0-0.55-0.45-1-1-1s-1 0.45-1 1v2H1c-0.55 0-1 0.45-1 1s0.45 1 1 1h2v2z" />
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M 13 11 C 14.6568542495 11 16 12.3431457505 16 14 C 16 15.6568542495 14.6568542495 17 13 17 C 11.3431457505 17 10 15.6568542495 10 14 C 10 12.3431457505 11.3431457505 11 13 11 Z" />
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M21 6h-3.17l-1.24-1.35c-0.37-0.41-0.91-0.65-1.47-0.65h-6.4c0.17 0.3 0.28 0.63 0.28 1 0 1.1-0.9 2-2 2H6v1c0 1.1-0.9 2-2 2-0.37 0-0.7-0.11-1-0.28V20c0 1.1 0.9 2 2 2h16c1.1 0 2-0.9 2-2V8c0-1.1-0.9-2-2-2zm-8 13c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z" />
|
||||
</vector>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="176dp"
|
||||
android:height="176dp"
|
||||
android:viewportWidth="176"
|
||||
android:viewportHeight="176">
|
||||
|
||||
<group
|
||||
android:pivotX="88"
|
||||
android:pivotY="88"
|
||||
android:scaleX="0.916"
|
||||
android:scaleY="0.916"
|
||||
android:translateX="-8"
|
||||
android:translateY="-8">
|
||||
<path
|
||||
android:name="ic_app_shortcut_search_ic"
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M104.333 97.3333H100.647L99.34 96.0733C103.913 90.7533 106.667 83.8467 106.667 76.3333C106.667 59.58 93.0867 46 76.3333 46C59.58 46 46 59.58 46 76.3333C46 93.0867 59.58 106.667 76.3333 106.667C83.8467 106.667 90.7533 103.913 96.0733 99.34L97.3333 100.647V104.333L120.667 127.62L127.62 120.667L104.333 97.3333V97.3333ZM76.3333 97.3333C64.7133 97.3333 55.3333 87.9533 55.3333 76.3333C55.3333 64.7133 64.7133 55.3333 76.3333 55.3333C87.9533 55.3333 97.3333 64.7133 97.3333 76.3333C97.3333 87.9533 87.9533 97.3333 76.3333 97.3333Z" />
|
||||
</group>
|
||||
</vector>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M11,14C12,14 13.05,14.16 14.2,14.44C13.39,15.31 13,16.33 13,17.5C13,18.39 13.25,19.23 13.78,20H3V18C3,16.81 3.91,15.85 5.74,15.12C7.57,14.38 9.33,14 11,14M11,12C9.92,12 9,11.61 8.18,10.83C7.38,10.05 7,9.11 7,8C7,6.92 7.38,6 8.18,5.18C9,4.38 9.92,4 11,4C12.11,4 13.05,4.38 13.83,5.18C14.61,6 15,6.92 15,8C15,9.11 14.61,10.05 13.83,10.83C13.05,11.61 12.11,12 11,12M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z" />
|
||||
</vector>
|
|
@ -1,9 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M17,3A2,2 0 0,1 19,5V21L12,18L5,21V5C5,3.89 5.9,3 7,3H17M11,11A2,2 0 0,0 9,13A2,2 0 0,0 11,15A2,2 0 0,0 13,13V8H16V6H12V11.27C11.71,11.1 11.36,11 11,11Z" />
|
||||
</vector>
|
|
@ -1,10 +0,0 @@
|
|||
<!-- drawable/currency_inr.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M8,3H18L17,5H13.74C14.22,5.58 14.58,6.26 14.79,7H18L17,9H15C14.75,11.57 12.74,13.63 10.2,13.96V14H9.5L15.5,21H13L7,14V12H9.5V12C11.26,12 12.72,10.7 12.96,9H7L8,7H12.66C12.1,5.82 10.9,5 9.5,5H7L8,3Z" />
|
||||
</vector>
|
|
@ -1,10 +0,0 @@
|
|||
<vector android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0"
|
||||
android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M17.66,7.93L12,2.27 6.34,7.93c-3.12,3.12 -3.12,8.19 0,11.31C7.9,20.8 9.95,21.58 12,21.58c2.05,0 4.1,-0.78 5.66,-2.34 3.12,-3.12 3.12,-8.19 0,-11.31zM12,19.59c-1.6,0 -3.11,-0.62 -4.24,-1.76C6.62,16.69 6,15.19 6,13.59s0.62,-3.11 1.76,-4.24L12,5.1v14.49z" />
|
||||
</vector>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2020 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.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M4 18h16c0.55 0 1-0.45 1-1s-0.45-1-1-1H4c-0.55 0-1 0.45-1 1s0.45 1 1 1zm0-5h16c0.55 0 1-0.45 1-1s-0.45-1-1-1H4c-0.55 0-1 0.45-1 1s0.45 1 1 1zM3 7c0 0.55 0.45 1 1 1h16c0.55 0 1-0.45 1-1s-0.45-1-1-1H4c-0.55 0-1 0.45-1 1z" />
|
||||
</vector>
|
|
@ -1,10 +0,0 @@
|
|||
<!-- drawable/rounded_corner.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M19,19H21V21H19V19M19,17H21V15H19V17M3,13H5V11H3V13M3,17H5V15H3V17M3,9H5V7H3V9M3,5H5V3H3V5M7,5H9V3H7V5M15,21H17V19H15V21M11,21H13V19H11V21M15,21H17V19H15V21M7,21H9V19H7V21M3,21H5V19H3V21M21,8A5,5 0 0,0 16,3H11V5H16A3,3 0 0,1 19,8V13H21V8Z" />
|
||||
</vector>
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M19.8 10.7L4.2 5l-0.7 1.9L17.6 12H5c-1.1 0-2 0.9-2 2v4c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-5.5c0-0.8-0.5-1.6-1.2-1.8zM19 18H5v-4h14v4zM6 15h2v2H6zm4 0h8v2h-8z" />
|
||||
</vector>
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<corners android:radius="35dp" />
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/md_white_1000" />
|
||||
|
||||
</shape>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="12dp" />
|
||||
<solid android:color="@android:color/black" />
|
||||
</shape>
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2020 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">
|
||||
<solid android:color="?attr/colorControlNormal" />
|
||||
<corners android:radius="8dp" />
|
||||
<size
|
||||
android:width="72dp"
|
||||
android:height="4dp" />
|
||||
</shape>
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:centerColor="#11000000"
|
||||
android:endColor="@color/twenty_percent_black_overlay"
|
||||
android:startColor="#00000000" />
|
||||
</shape>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:endColor="#00000000"
|
||||
android:startColor="#11000000"
|
||||
android:type="linear" />
|
||||
</shape>
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@android:color/white" />
|
||||
</shape>
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:left="4dp"
|
||||
android:right="4dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="3dp"
|
||||
android:topRightRadius="3dp" />
|
||||
<size android:height="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -1,7 +1,6 @@
|
|||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/gradient_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface">
|
||||
|
@ -64,7 +63,6 @@
|
|||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/editables"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/toolbarContainer">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
tools:layout="@layout/fragment_album_full_cover" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
|
@ -114,7 +114,6 @@
|
|||
app:tint="@color/md_green_500" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/volumeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/volume"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/anti_clickable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/windowBackground">
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/gradient_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/rectSelector"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="156dp"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playSongs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/color_circle_gradient"
|
||||
android:backgroundTint="@color/eighty_percent_black_overlay"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
</LinearLayout>
|
|
@ -1,62 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/rectSelector"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="256dp"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playSongs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/color_circle_gradient"
|
||||
android:backgroundTint="@color/eighty_percent_black_overlay"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="My top tracks" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:text="My top tracks" />
|
||||
</LinearLayout>
|
|
@ -65,7 +65,6 @@
|
|||
app:srcCompat="@drawable/ic_library_add" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/materialTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
|
@ -152,7 +151,6 @@
|
|||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/shortcuts"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="history,lastAdded,topPlayed,actionShuffle" />
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/editables"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
app:srcCompat="@drawable/ic_close" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/car"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_margin="16dp"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/editables"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/separator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_columnSpan="2"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.AppCompatCheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@android:id/text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeightSmall"
|
||||
android:checkMark="?android:attr/listChoiceIndicatorSingle"
|
||||
android:checkMarkTint="@color/md_red_400"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:textAppearance="@style/TextViewBody1"
|
||||
tools:text="@tools:sample/full_names" />
|
|
@ -25,7 +25,6 @@
|
|||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
@ -60,7 +59,6 @@
|
|||
tools:layout="@layout/fragment_album_full_card_cover" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/player_lyrics"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/playbackControls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/player_album_art_frame"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/player_album_art_frame"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
<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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="24dp"
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
<include layout="@layout/shadow_statusbar_toolbar" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
|
|
|
@ -139,7 +139,6 @@
|
|||
app:tint="@color/md_green_500" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/volumeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/volume"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -10,56 +9,50 @@
|
|||
android:paddingBottom="8dp"
|
||||
tools:ignore="MissingPrefix">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/progressContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/progress_container_height"
|
||||
android:background="@color/twenty_percent_black_overlay"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songCurrentProgress"
|
||||
android:layout_width="0dp"
|
||||
android:minWidth="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:gravity="center_vertical|left|end"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textColor="?colorOnSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical|right|end"
|
||||
android:paddingRight="8dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="?colorOnSecondary"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
style="@style/MusicProgressSlider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
android:layout_toLeftOf="@id/songTotalTime"
|
||||
android:layout_toRightOf="@id/songCurrentProgress"
|
||||
tools:ignore="RtlHardcoded,UnusedAttribute" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|right|end"
|
||||
android:paddingEnd="8dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry"
|
||||
tools:text="@tools:sample/date/hhmmss" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/player_footer_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/player_footer_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface"
|
||||
android:fadingEdge="vertical"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/offlineLyrics"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start"
|
||||
android:lineSpacingExtra="3dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="128dp"
|
||||
android:text="@string/no_lyrics_found"
|
||||
android:textAppearance="@style/TextViewBody1"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
</ScrollView>
|
|
@ -42,23 +42,18 @@
|
|||
</FrameLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
android:transitionGroup="true"
|
||||
app:layout_dodgeInsetEdges="bottom"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||
tools:listitem="@layout/item_list" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@android:id/empty"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -87,6 +82,4 @@
|
|||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/miniPlayerContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:background="?attr/colorSurface"
|
||||
|
@ -19,7 +18,6 @@
|
|||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/miniPlayerImage"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<io.github.muntashirakon.music.views.StatusBarView
|
||||
android:id="@+id/status_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/contentFrame"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/settings_graph" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="pin"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceNormal"
|
||||
tools:title="@string/action_settings" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<io.github.muntashirakon.music.lyrics.LrcView
|
||||
android:id="@+id/lyricsView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/viewGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/emptyContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
|
|
|
@ -32,6 +32,5 @@
|
|||
android:padding="12dp"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textColor="@color/md_white_1000"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</io.github.muntashirakon.music.views.WidthFitSquareLayout>
|
|
@ -36,12 +36,13 @@
|
|||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/titleContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/menu"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/image">
|
||||
|
||||
|
@ -62,6 +63,17 @@
|
|||
android:singleLine="true"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/menu"
|
||||
style="@style/OverFlowButton"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0"
|
||||
app:layout_constraintBottom_toBottomOf="@id/titleContainer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/titleContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/titleContainer"
|
||||
app:tint="?attr/colorControlNormal" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</FrameLayout>
|
|
@ -34,12 +34,13 @@
|
|||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/titleContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/menu"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/image">
|
||||
|
||||
|
@ -60,6 +61,17 @@
|
|||
android:singleLine="true"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/menu"
|
||||
style="@style/OverFlowButton"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0"
|
||||
app:layout_constraintBottom_toBottomOf="@id/titleContainer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/titleContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/titleContainer"
|
||||
app:tint="?attr/colorControlNormal" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</FrameLayout>
|
|
@ -33,12 +33,13 @@
|
|||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/titleContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/menu"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/imageContainer">
|
||||
|
||||
|
@ -60,5 +61,16 @@
|
|||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/menu"
|
||||
style="@style/OverFlowButton"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0"
|
||||
app:layout_constraintBottom_toBottomOf="@id/titleContainer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/titleContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/titleContainer"
|
||||
app:tint="?attr/colorControlNormal" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue