Fix lockscreen, playlist icon
This commit is contained in:
parent
4470a66fb2
commit
c9811ca06b
42 changed files with 350 additions and 262 deletions
|
@ -32,8 +32,8 @@ android {
|
|||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
applicationId "code.name.monkey.retromusic"
|
||||
versionCode 311
|
||||
versionName '3.1.300'
|
||||
versionCode 313
|
||||
versionName '3.1.400'
|
||||
|
||||
multiDexEnabled true
|
||||
|
||||
|
|
|
@ -2,17 +2,6 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="code.name.monkey.retromusic">
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
|
@ -123,40 +112,29 @@
|
|||
android:theme="@style/ErrorHandlingTheme" />
|
||||
<activity android:name=".ui.activities.WhatsNewActivity" />
|
||||
<activity android:name=".ui.activities.bugreport.BugReportActivity" />
|
||||
<activity android:name=".ui.activities.LockScreenActivity" />
|
||||
<activity
|
||||
android:name=".ui.activities.LockScreenActivity"
|
||||
android:noHistory="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:showOnLockScreen="true" />
|
||||
<activity
|
||||
android:name=".appshortcuts.AppShortcutLauncherActivity"
|
||||
android:launchMode="singleInstance"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
||||
|
||||
<service
|
||||
android:name=".service.MusicService"
|
||||
android:enabled="true" />
|
||||
|
||||
<service
|
||||
android:name=".service.WearBrowserService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.media.browse.MediaBrowserService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<receiver android:name=".service.MediaButtonIntentReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
|
||||
<meta-data
|
||||
android:name="android.max_aspect"
|
||||
android:value="2.1" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.lge.support.SPLIT_WINDOW"
|
||||
android:value="true" />
|
||||
|
||||
<meta-data
|
||||
android:name="code.name.monkey.retromusic.glide.RetroMusicGlideModule"
|
||||
android:value="GlideModule" />
|
||||
|
||||
|
||||
<meta-data
|
||||
android:name="com.bumptech.glide.integration.okhttp3.OkHttpGlideModule"
|
||||
android:value="GlideModule" />
|
||||
|
@ -174,12 +152,18 @@
|
|||
android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
|
||||
<receiver android:name=".service.MediaButtonIntentReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".appwidgets.BootReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver
|
||||
android:name=".appwidgets.AppWidgetBig"
|
||||
android:exported="false"
|
||||
|
@ -192,6 +176,7 @@
|
|||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/app_widget_big_info" />
|
||||
</receiver>
|
||||
|
||||
<receiver
|
||||
android:name=".appwidgets.AppWidgetClassic"
|
||||
android:exported="false"
|
||||
|
@ -241,6 +226,29 @@
|
|||
android:resource="@xml/app_widget_card_info" />
|
||||
</receiver>
|
||||
|
||||
<service
|
||||
android:name=".service.MusicService"
|
||||
android:enabled="true" />
|
||||
<service
|
||||
android:name=".service.WearBrowserService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.media.browse.MediaBrowserService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
|
||||
</application>
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
</manifest>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"name": "Gaming Inc.",
|
||||
"summary": "Discord server maintainer",
|
||||
"link": "https://discord.gg/qTecXXn",
|
||||
"profile_image": "https://i.imgur.com/5wXLrS2.jpg"
|
||||
"profile_image": "https://i.imgur.com/FMqPDSS.png"
|
||||
},
|
||||
{
|
||||
"name": "Marko Ivanović",
|
||||
|
|
|
@ -1 +1 @@
|
|||
<html>
<head>
<style type="text/css">
* {
word-wrap: break-word;
}
{style-placeholder}
a {
color: #{link-color};
}
a:active {
color: #{link-color-active};
}
ul {
list-style-position: outside;
padding-left: 0;
padding-right: 0;
margin-left: 1em;
}
li {
padding-top: 8px;
}
</style>
</head>
<body>
<h4>v3.1.300</h4>
<ul>
<li>Fix rename playlist text color</li>
<li>Fix same album showing in details page</li>
<li>Fix lyrics text alignment on sync and lyrics reading improved</li>
<li>Improved home sections loading</li>
<li>Removed library options which are duplicated (it's available from profile menu)</li>
<li>Replaced collapsing Fab with Android Floating Extended Fab</li>
<li>Replaced home with for you</li>
<li>Fixed profile image not loading in about</li>
<li>Improved selecting user profile image</li>
<li>Added bio to enter custom message</li>
<li>Improved some UI screens</li>
</ul>
<h4>v3.1.240</h4>
<ul>
<li>Fix Search not showing from home screen</li>
<li>Fix Volume controls color issue</li>
<li>Fix Seek bar alignment</li>
<li>Added tiny theme</li>
<li>Improved full theme appearances</li>
<li>Now playing theme preview updated</li>
<li>Fix composer error</li>
<li>Bottom Options improved(internal)</li>
</ul>
<h4>v3.1.200</h4>
<ul>
<li>Added composer sort and editing</li>
<li>Fix Crash in Album tag editor while selecting options</li>
<li>Added Filter song length</li>
<li>Added Favourites playlist icon will be accent color</li>
<li>Added Colorful settings icons</li>
<li>Added Corners for dialog</li>
</ul>
<h4>v3.0.570</h4>
<ul>
<li>Fix Album/Artist square image</li>
<li>Fix Delete dialog text format</li>
<li>Fix Profile picture not showing after coming back from folders</li>
<li>Fix Play button color i Simple and Plain themes</li>
<li>Fix Sleep timer dialog crashing</li>
<li>Fix Share song dialog title and text</li>
</ul>
<p>If you see entire app white or dark or black select same theme in settings to fix </p>
<p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a>
</p>
<p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its
not working try to
uninstall and install again. </p>
</body>
|
||||
<html>
<head>
<style type="text/css">
* {
word-wrap: break-word;
}
{style-placeholder}
a {
color: #{link-color};
}
a:active {
color: #{link-color-active};
}
ul {
list-style-position: outside;
padding-left: 0;
padding-right: 0;
margin-left: 1em;
}
li {
padding-top: 8px;
}
</style>
</head>
<body>
<h4>v3.1.400</h4>
<ul>
<li>Improved lock-screen behavior and UI</li>
<li>Fix some crashes</li>
<li>Fix playlist icon on small devices</li>
</ul>
<h4>v3.1.300</h4>
<ul>
<li>Fix rename playlist text color</li>
<li>Fix same album showing in details page</li>
<li>Fix lyrics text alignment on sync and lyrics reading improved</li>
<li>Improved home sections loading</li>
<li>Removed library options which are duplicated (it's available from profile menu)</li>
<li>Replaced collapsing Fab with Android Floating Extended Fab</li>
<li>Replaced home with for you</li>
<li>Fixed profile image not loading in about</li>
<li>Improved selecting user profile image</li>
<li>Added bio to enter custom message</li>
<li>Improved some UI screens</li>
</ul>
<h4>v3.1.240</h4>
<ul>
<li>Fix Search not showing from home screen</li>
<li>Fix Volume controls color issue</li>
<li>Fix Seek bar alignment</li>
<li>Added tiny theme</li>
<li>Improved full theme appearances</li>
<li>Now playing theme preview updated</li>
<li>Fix composer error</li>
<li>Bottom Options improved(internal)</li>
</ul>
<h4>v3.1.200</h4>
<ul>
<li>Added composer sort and editing</li>
<li>Fix Crash in Album tag editor while selecting options</li>
<li>Added Filter song length</li>
<li>Added Favourites playlist icon will be accent color</li>
<li>Added Colorful settings icons</li>
<li>Added Corners for dialog</li>
</ul>
<h4>v3.0.570</h4>
<ul>
<li>Fix Album/Artist square image</li>
<li>Fix Delete dialog text format</li>
<li>Fix Profile picture not showing after coming back from folders</li>
<li>Fix Play button color i Simple and Plain themes</li>
<li>Fix Sleep timer dialog crashing</li>
<li>Fix Share song dialog title and text</li>
</ul>
<p>If you see entire app white or dark or black select same theme in settings to fix </p>
<p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a>
</p>
<p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its
not working try to
uninstall and install again. </p>
</body>
|
|
@ -54,7 +54,7 @@ public final class RetroGlideExtension {
|
|||
@GlideOption
|
||||
public static RequestOptions artistOptions(@NonNull RequestOptions requestOptions, @NonNull Artist artist) {
|
||||
return requestOptions
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
|
||||
.error(R.drawable.default_artist_art)
|
||||
.placeholder(R.drawable.default_artist_art)
|
||||
.priority(Priority.LOW)
|
||||
|
|
|
@ -42,7 +42,10 @@ import java.util.concurrent.TimeUnit
|
|||
|
||||
class ArtistImage(val artistName: String, val skipOkHttpCache: Boolean)
|
||||
|
||||
class ArtistImageFetcher(private val context: Context, private val lastFMRestClient: LastFMRestClient, private val okHttp: OkHttpClient, private val model: ArtistImage) : DataFetcher<InputStream> {
|
||||
class ArtistImageFetcher(private val context: Context,
|
||||
private val lastFMRestClient: LastFMRestClient,
|
||||
private val okHttp: OkHttpClient,
|
||||
private val model: ArtistImage) : DataFetcher<InputStream> {
|
||||
@Volatile
|
||||
private var isCancelled: Boolean = false
|
||||
private var call: Call<LastFmArtist>? = null
|
||||
|
@ -54,7 +57,7 @@ class ArtistImageFetcher(private val context: Context, private val lastFMRestCli
|
|||
}
|
||||
|
||||
override fun getDataSource(): DataSource {
|
||||
return DataSource.MEMORY_CACHE
|
||||
return DataSource.LOCAL
|
||||
}
|
||||
|
||||
override fun loadData(priority: Priority, callback: DataFetcher.DataCallback<in InputStream>) {
|
||||
|
|
|
@ -38,7 +38,6 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
|
|||
private val hashSet: HashSet<Home> = HashSet()
|
||||
|
||||
override fun homeSections() {
|
||||
loadSuggestions()
|
||||
loadRecentArtists()
|
||||
loadRecentAlbums()
|
||||
loadTopArtists()
|
||||
|
@ -55,17 +54,6 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
|
|||
disposable.dispose()
|
||||
}
|
||||
|
||||
private fun loadSuggestions() {
|
||||
disposable += repository.suggestionSongs
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(5, R.string.suggestion_songs, 0, it, SUGGESTIONS, R.drawable.ic_audiotrack_black_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmpty()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadRecentArtists() {
|
||||
disposable += repository.recentArtists
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
|
|
@ -276,7 +276,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
|||
private fun loadArtistImage() {
|
||||
GlideApp.with(this)
|
||||
.asBitmapPalette()
|
||||
.load(RetroGlideExtension.getArtistModel(artist!!, forceDownload))
|
||||
.load(RetroGlideExtension.getArtistModel(artist, forceDownload))
|
||||
.transition(RetroGlideExtension.getDefaultTransition())
|
||||
.artistOptions(artist)
|
||||
.dontAnimate()
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package code.name.monkey.retromusic.ui.activities
|
||||
|
||||
import android.app.KeyguardManager
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
|
@ -14,19 +17,23 @@ import code.name.monkey.retromusic.ui.activities.base.AbsMusicServiceActivity
|
|||
import code.name.monkey.retromusic.ui.fragments.player.lockscreen.LockScreenPlayerControlsFragment
|
||||
import com.r0adkll.slidr.Slidr
|
||||
import com.r0adkll.slidr.model.SlidrConfig
|
||||
import com.r0adkll.slidr.model.SlidrListener
|
||||
import com.r0adkll.slidr.model.SlidrPosition
|
||||
import kotlinx.android.synthetic.main.activity_album.*
|
||||
|
||||
class LockScreenActivity : AbsMusicServiceActivity() {
|
||||
private var mFragment: LockScreenPlayerControlsFragment? = null
|
||||
private var fragment: LockScreenPlayerControlsFragment? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
|
||||
or WindowManager.LayoutParams.FLAG_FULLSCREEN
|
||||
or WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
|
||||
or WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
|
||||
setShowWhenLocked(true)
|
||||
setTurnScreenOn(true)
|
||||
} else {
|
||||
this.window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
|
||||
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
|
||||
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON)
|
||||
}
|
||||
setDrawUnderStatusBar()
|
||||
setContentView(R.layout.activity_lock_screen_old_style)
|
||||
|
||||
|
@ -37,12 +44,32 @@ class LockScreenActivity : AbsMusicServiceActivity() {
|
|||
setLightNavigationBar(true)
|
||||
|
||||
val config = SlidrConfig.Builder()
|
||||
.listener(object : SlidrListener {
|
||||
override fun onSlideStateChanged(state: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onSlideChange(percent: Float) {
|
||||
|
||||
}
|
||||
|
||||
override fun onSlideOpened() {
|
||||
|
||||
}
|
||||
|
||||
override fun onSlideClosed() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
val keyguardManager = getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager
|
||||
keyguardManager.requestDismissKeyguard(this@LockScreenActivity, null)
|
||||
}
|
||||
}
|
||||
})
|
||||
.position(SlidrPosition.BOTTOM)
|
||||
.build()
|
||||
|
||||
Slidr.attach(this, config)
|
||||
|
||||
mFragment = supportFragmentManager.findFragmentById(R.id.playback_controls_fragment) as LockScreenPlayerControlsFragment?
|
||||
fragment = supportFragmentManager.findFragmentById(R.id.playback_controls_fragment) as LockScreenPlayerControlsFragment?
|
||||
|
||||
findViewById<View>(R.id.slide).apply {
|
||||
translationY = 100f
|
||||
|
@ -77,7 +104,7 @@ class LockScreenActivity : AbsMusicServiceActivity() {
|
|||
.dontAnimate()
|
||||
.into(object : RetroMusicColoredTarget(image) {
|
||||
override fun onColorReady(color: Int) {
|
||||
mFragment!!.setDark(color)
|
||||
fragment!!.setDark(color)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -147,6 +147,9 @@ class SongFileAdapter(private val activity: AppCompatActivity, private var dataS
|
|||
}
|
||||
}
|
||||
}
|
||||
if (imageTextContainer != null) {
|
||||
imageTextContainer?.cardElevation = 0f
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
|
|
|
@ -16,6 +16,7 @@ import code.name.monkey.appthemehelper.util.TintHelper
|
|||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import code.name.monkey.retromusic.volume.AudioVolumeObserver
|
||||
import code.name.monkey.retromusic.volume.OnAudioVolumeChangedListener
|
||||
import kotlinx.android.synthetic.main.fragment_volume.*
|
||||
|
@ -103,12 +104,14 @@ class VolumeFragment : Fragment(), SeekBar.OnSeekBarChangeListener, OnAudioVolum
|
|||
val iconColor = Color.WHITE
|
||||
volumeDown.setColorFilter(iconColor, PorterDuff.Mode.SRC_IN)
|
||||
volumeUp.setColorFilter(iconColor, PorterDuff.Mode.SRC_IN)
|
||||
TintHelper.setTintAuto(volumeSeekBar, iconColor, false)
|
||||
|
||||
ViewUtil.setProgressDrawable(volumeSeekBar, iconColor, true)
|
||||
|
||||
}
|
||||
|
||||
fun setTintable(color: Int) {
|
||||
TintHelper.setTintAuto(volumeSeekBar, color, false)
|
||||
|
||||
ViewUtil.setProgressDrawable(volumeSeekBar, color, true)
|
||||
}
|
||||
|
||||
fun removeThumb() {
|
||||
|
@ -127,7 +130,8 @@ class VolumeFragment : Fragment(), SeekBar.OnSeekBarChangeListener, OnAudioVolum
|
|||
fun setTintableColor(color: Int) {
|
||||
volumeDown.setColorFilter(color, PorterDuff.Mode.SRC_IN)
|
||||
volumeUp.setColorFilter(color, PorterDuff.Mode.SRC_IN)
|
||||
TintHelper.setTintAuto(volumeSeekBar, color, false)
|
||||
//TintHelper.setTintAuto(volumeSeekBar, color, false)
|
||||
ViewUtil.setProgressDrawable(volumeSeekBar, color, true)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -4,9 +4,11 @@ import android.os.Bundle
|
|||
import android.view.View
|
||||
import android.view.animation.AccelerateInterpolator
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||
import code.name.monkey.retromusic.ui.fragments.VolumeFragment
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import kotlinx.android.synthetic.main.volume_controls.*
|
||||
|
||||
|
||||
/**
|
||||
* Created by hemanths on 24/09/17.
|
||||
|
@ -56,11 +58,19 @@ abstract class AbsPlayerControlsFragment : AbsMusicServiceFragment(), MusicProgr
|
|||
hideVolumeIfAvailable()
|
||||
}
|
||||
|
||||
protected var volumeFragment: VolumeFragment? = null
|
||||
|
||||
private fun hideVolumeIfAvailable() {
|
||||
volumeFragmentContainer?.visibility = if (PreferenceUtil.getInstance().volumeToggle) View.VISIBLE else View.GONE
|
||||
if (PreferenceUtil.getInstance().volumeToggle) {
|
||||
childFragmentManager.beginTransaction().replace(R.id.volumeFragmentContainer, VolumeFragment()).commit()
|
||||
childFragmentManager.executePendingTransactions()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragmentContainer) as VolumeFragment?
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val SLIDER_ANIMATION_TIME: Long = 400
|
||||
const val VOLUME_FRAGMENT: String = "volume_fragment"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,12 +13,6 @@ import android.view.ViewGroup;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.afollestad.materialcab.MaterialCab;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Objects;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
|
@ -27,6 +21,15 @@ import androidx.core.content.ContextCompat;
|
|||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.afollestad.materialcab.MaterialCab;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Objects;
|
||||
|
||||
import code.name.monkey.appthemehelper.ThemeStore;
|
||||
import code.name.monkey.appthemehelper.common.ATHToolbarActivity;
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||
|
@ -64,6 +67,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
private ImageView userImage;
|
||||
private CompositeDisposable disposable;
|
||||
|
||||
@NonNull
|
||||
public static Fragment newInstance(int tab) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt(CURRENT_TAB_ID, tab);
|
||||
|
@ -72,6 +76,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
return fragment;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Fragment newInstance() {
|
||||
return new LibraryFragment();
|
||||
}
|
||||
|
@ -218,7 +223,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
public void onCreateOptionsMenu(@NotNull Menu menu, @NonNull MenuInflater inflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
inflater.inflate(R.menu.menu_main, menu);
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
|||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.ui.fragments.VolumeFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
@ -31,7 +30,6 @@ class AdaptivePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private var progressViewUpdateHelper: MusicProgressViewUpdateHelper? = null
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -47,8 +45,6 @@ class AdaptivePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
|
||||
playPauseButton.setOnClickListener {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
MusicPlayerRemote.pauseSong()
|
||||
|
@ -109,7 +105,7 @@ class AdaptivePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(colorFinal)), false)
|
||||
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
||||
ViewUtil.setProgressDrawable(progressSlider, colorFinal, true)
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
}
|
||||
|
||||
private fun updatePlayPauseColor() {
|
||||
|
|
|
@ -34,7 +34,6 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private var progressViewUpdateHelper: MusicProgressViewUpdateHelper? = null
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -51,7 +50,6 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
|
||||
playPauseButton.setOnClickListener {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
MusicPlayerRemote.pauseSong()
|
||||
|
@ -61,8 +59,6 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
showBonceAnimation()
|
||||
}
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
volumeFragment.tintWhiteColor()
|
||||
}
|
||||
|
||||
private fun updateSong() {
|
||||
|
@ -119,6 +115,7 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
updateRepeatState()
|
||||
updateShuffleState()
|
||||
updatePrevNextColor()
|
||||
volumeFragment?.tintWhiteColor()
|
||||
}
|
||||
|
||||
private fun setFabColor(i: Int) {
|
||||
|
|
|
@ -31,7 +31,7 @@ class CardPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private var progressViewUpdateHelper: MusicProgressViewUpdateHelper? = null
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -57,8 +57,6 @@ class CardPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
}
|
||||
showBonceAnimation(playPauseButton)
|
||||
}
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
}
|
||||
|
||||
private fun setupControls() {
|
||||
|
@ -136,7 +134,7 @@ class CardPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(colorFinal)), false)
|
||||
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
||||
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class CardBlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
@ -49,8 +49,6 @@ class CardBlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
setupVolumeControls()
|
||||
|
||||
}
|
||||
|
||||
override fun setDark(color: Int) {
|
||||
|
@ -63,6 +61,7 @@ class CardBlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
updateProgressTextColor()
|
||||
|
||||
ViewUtil.setProgressDrawable(progressSlider, Color.WHITE, true)
|
||||
volumeFragment?.tintWhiteColor()
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,10 +80,6 @@ class CardBlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupVolumeControls() {
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
volumeFragment.tintWhiteColor()
|
||||
}
|
||||
|
||||
private fun updateProgressTextColor() {
|
||||
val color = MaterialValueHelper.getPrimaryTextColor(context, false)
|
||||
|
|
|
@ -59,7 +59,7 @@ class ClassicPlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
|
||||
}
|
||||
|
||||
volumeFragment.setTintableColor(lastPlaybackControlsColor)
|
||||
//volumeFragment?.setTintableColor(lastPlaybackControlsColor)
|
||||
|
||||
updateRepeatState();
|
||||
updateShuffleState();
|
||||
|
@ -74,7 +74,7 @@ class ClassicPlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
override fun onCreateView(@NonNull inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
return inflater.inflate(code.name.monkey.retromusic.R.layout.fragment_classic_player_playback_controls, container, false)
|
||||
|
@ -91,7 +91,7 @@ class ClassicPlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
setUpMusicControllers()
|
||||
updateProgressTextColor()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
//volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
}
|
||||
|
||||
private fun setUpMusicControllers() {
|
||||
|
|
|
@ -20,7 +20,6 @@ import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
|||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.ui.fragments.VolumeFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
|
||||
|
@ -31,7 +30,6 @@ class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -55,8 +53,6 @@ class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
}
|
||||
|
||||
private fun updateSong() {
|
||||
|
@ -105,7 +101,7 @@ class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
|
||||
setProgressBarColor(lastPlaybackControlsColor, lastDisabledPlaybackControlsColor)
|
||||
|
||||
volumeFragment.setTintableColor(lastPlaybackControlsColor)
|
||||
volumeFragment?.setTintableColor(lastPlaybackControlsColor)
|
||||
|
||||
songCurrentProgress.setTextColor(lastDisabledPlaybackControlsColor)
|
||||
songTotalTime.setTextColor(lastDisabledPlaybackControlsColor)
|
||||
|
|
|
@ -34,7 +34,7 @@ class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -51,8 +51,6 @@ class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
|
||||
playPauseButton.setOnClickListener {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
MusicPlayerRemote.pauseSong()
|
||||
|
@ -118,7 +116,8 @@ class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
} else {
|
||||
ThemeStore.accentColor(context!!)
|
||||
}
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
|
||||
setFabColor(colorFinal)
|
||||
updateRepeatState()
|
||||
|
|
|
@ -33,7 +33,7 @@ class FlatPlaybackControlsFragment : AbsPlayerControlsFragment(), Callback {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -48,8 +48,6 @@ class FlatPlaybackControlsFragment : AbsPlayerControlsFragment(), Callback {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
@ -109,7 +107,7 @@ class FlatPlaybackControlsFragment : AbsPlayerControlsFragment(), Callback {
|
|||
}
|
||||
|
||||
updateTextColors(colorFinal)
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
|
||||
ViewUtil.setProgressDrawable(progressSlider, colorFinal, true)
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
|||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.ui.fragments.VolumeFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
@ -55,14 +54,11 @@ class FullPlaybackControlsFragment : AbsPlayerControlsFragment(), PopupMenu.OnMe
|
|||
return inflater.inflate(R.layout.fragment_full_player_controls, container, false)
|
||||
}
|
||||
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
|
||||
songTotalTime.setTextColor(Color.WHITE)
|
||||
songCurrentProgress.setTextColor(Color.WHITE)
|
||||
|
||||
|
@ -117,7 +113,7 @@ class FullPlaybackControlsFragment : AbsPlayerControlsFragment(), PopupMenu.OnMe
|
|||
} else {
|
||||
ThemeStore.accentColor(context!!)
|
||||
}
|
||||
volumeFragment.setTintableColor(colorFinal)
|
||||
volumeFragment?.setTintableColor(colorFinal)
|
||||
text.setTextColor(colorFinal)
|
||||
|
||||
ViewUtil.setProgressDrawable(progressSlider, colorFinal, true)
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.view.ViewGroup
|
|||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||
|
@ -21,6 +22,8 @@ import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
|||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import kotlinx.android.synthetic.main.fragment_lock_screen_playback_controls.*
|
||||
import kotlinx.android.synthetic.main.media_button.*
|
||||
import kotlinx.android.synthetic.main.player_time.*
|
||||
|
@ -94,7 +97,6 @@ class LockScreenPlayerControlsFragment : AbsPlayerControlsFragment() {
|
|||
}
|
||||
|
||||
override fun setDark(color: Int) {
|
||||
setProgressBarColor(progressSlider, color)
|
||||
|
||||
val colorBg = ATHUtil.resolveColor(context!!, android.R.attr.colorBackground)
|
||||
if (ColorUtil.isColorLight(colorBg)) {
|
||||
|
@ -105,6 +107,14 @@ class LockScreenPlayerControlsFragment : AbsPlayerControlsFragment() {
|
|||
lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(context!!, false)
|
||||
}
|
||||
|
||||
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
|
||||
color
|
||||
} else {
|
||||
ThemeStore.textColorSecondary(context!!)
|
||||
}
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
ViewUtil.setProgressDrawable(progressSlider, ColorUtil.stripAlpha(colorFinal), true)
|
||||
|
||||
updatePrevNextColor()
|
||||
|
||||
val isDark = ColorUtil.isColorLight(color)
|
||||
|
|
|
@ -33,7 +33,7 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -48,8 +48,6 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
}
|
||||
|
||||
private fun updateSong() {
|
||||
|
@ -114,7 +112,7 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
|||
text.setTextColor(colorFinal)
|
||||
ViewUtil.setProgressDrawable(progressSlider, ColorUtil.stripAlpha(colorFinal), true)
|
||||
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
|
||||
updatePlayPauseColor()
|
||||
updatePrevNextColor()
|
||||
|
|
|
@ -20,7 +20,6 @@ import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
|||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.ui.fragments.VolumeFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
@ -33,7 +32,6 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -50,8 +48,6 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
|
||||
playPauseButton.setOnClickListener {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
MusicPlayerRemote.pauseSong()
|
||||
|
@ -83,8 +79,7 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
||||
ViewUtil.setProgressDrawable(progressSlider, colorFinal)
|
||||
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
|
||||
updateRepeatState()
|
||||
updateShuffleState()
|
||||
|
|
|
@ -39,7 +39,7 @@ class PlainPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
override fun onPlayStateChanged() {
|
||||
updatePlayPauseDrawableState()
|
||||
|
@ -84,8 +84,6 @@ class PlainPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
|
||||
playPauseButton.setOnClickListener {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
MusicPlayerRemote.pauseSong()
|
||||
|
@ -135,7 +133,7 @@ class PlainPlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
} else {
|
||||
ThemeStore.accentColor(context!!)
|
||||
}
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
|
||||
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(colorFinal)), false)
|
||||
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
||||
|
|
|
@ -16,7 +16,6 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
|||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
import code.name.monkey.retromusic.ui.fragments.VolumeFragment
|
||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
@ -32,7 +31,6 @@ class SimplePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
private var lastPlaybackControlsColor: Int = 0
|
||||
private var lastDisabledPlaybackControlsColor: Int = 0
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
override fun onPlayStateChanged() {
|
||||
|
@ -78,8 +76,6 @@ class SimplePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
setUpMusicControllers()
|
||||
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
|
||||
playPauseButton.setOnClickListener {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
MusicPlayerRemote.pauseSong()
|
||||
|
@ -198,7 +194,7 @@ class SimplePlaybackControlsFragment : AbsPlayerControlsFragment() {
|
|||
ThemeStore.accentColor(context!!)
|
||||
}
|
||||
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
volumeFragment?.setTintable(colorFinal)
|
||||
|
||||
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(colorFinal)), false)
|
||||
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
|
||||
|
|
|
@ -132,7 +132,7 @@ class SlidePlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.C
|
|||
songAdapter.swapDataSet(MusicPlayerRemote.playingQueue)
|
||||
}
|
||||
|
||||
private lateinit var volumeFragment: VolumeFragment
|
||||
|
||||
|
||||
|
||||
private fun updatePlayPauseDrawableState() {
|
||||
|
@ -204,7 +204,6 @@ class SlidePlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.C
|
|||
}
|
||||
|
||||
|
||||
volumeFragment.setTintable(colorFinal)
|
||||
text.setTextColor(colorFinal)
|
||||
playerQueueSubHeader.setTextColor(colorFinal)
|
||||
TintHelper.setTintAuto(playPauseButton, lastPlaybackControlsColor, false)
|
||||
|
@ -230,8 +229,6 @@ class SlidePlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.C
|
|||
setUpShuffleButton()
|
||||
setUpProgressSlider()
|
||||
setUpRecyclerView()
|
||||
volumeFragment = childFragmentManager.findFragmentById(R.id.volumeFragment) as VolumeFragment
|
||||
volumeFragmentToggle.visibility = if (PreferenceUtil.getInstance().volumeToggle) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
private lateinit var songAdapter: SimpleSongAdapter
|
||||
|
|
|
@ -16,25 +16,28 @@ package code.name.monkey.retromusic.views;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
public class StatusBarView extends View {
|
||||
|
||||
|
||||
public StatusBarView(Context context) {
|
||||
public StatusBarView(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public StatusBarView(Context context, AttributeSet attrs) {
|
||||
public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public StatusBarView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
public StatusBarView(@NonNull Context context, @NonNull AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public static int getStatusBarHeight(Resources r) {
|
||||
public static int getStatusBarHeight(@NonNull Resources r) {
|
||||
int result = 0;
|
||||
int resourceId = r.getIdentifier("status_bar_height", "dimen", "android");
|
||||
if (resourceId > 0) {
|
||||
|
@ -45,7 +48,6 @@ public class StatusBarView extends View {
|
|||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
setMeasuredDimension(
|
||||
MeasureSpec.getSize(widthMeasureSpec), getStatusBarHeight(getResources()));
|
||||
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), getStatusBarHeight(getResources()));
|
||||
}
|
||||
}
|
|
@ -1,4 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?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.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?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.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
|
@ -7,5 +19,14 @@
|
|||
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M3 10h12v2H3zm0 4h8v2H3zm0-8h12v2H3zm14 8.18c-0.31-0.11-0.65-0.18-1-0.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5v8.18zM16 18c-0.55 0-1-0.45-1-1s0.45-1 1-1 1 0.45 1 1-0.45 1-1 1z" />
|
||||
android:pathData="M22,5 L22,7 L19,7 L19,16 C19,17.66 17.66,19 16,19 C14.34,19 13,17.66 13,16 C13,14.34 14.34,13 16,13 C16.35,13 16.69,13.07 17,13.18 L17,5 L22,5 Z M15,16 C15,16.55 15.45,17 16,17 C16.55,17 17,16.55 17,16 C17,15.45 16.55,15 16,15 C15.45,15 15,15.45 15,16 Z" />
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M 15 5 L 3 5 L 3 7 L 15 7 Z" />
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M 15 9 L 3 9 L 3 11 L 15 11 Z" />
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M 11 13 L 3 13 L 3 15 L 11 15 Z" />
|
||||
</vector>
|
|
@ -5,9 +5,15 @@
|
|||
android:id="@+id/root_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background_material_light"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -24,6 +30,9 @@
|
|||
tools:layout="@layout/fragment_lock_screen_playback_controls" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -32,9 +41,9 @@
|
|||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="8dp">
|
||||
|
||||
|
@ -42,11 +51,10 @@
|
|||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="TODO" />
|
||||
android:contentDescription="TODO"
|
||||
android:scaleType="centerCrop" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/slide"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -54,5 +62,5 @@
|
|||
android:layout_weight="0"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="Swipe to unlock" />
|
||||
android:text="@string/swipe_to_unlock" />
|
||||
</LinearLayout>
|
|
@ -137,7 +137,6 @@
|
|||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_above="@id/title_container"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/color_circle_gradient"
|
||||
android:elevation="4dp"
|
||||
|
@ -150,17 +149,10 @@
|
|||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/volumeFragment"
|
||||
android:name="code.name.monkey.retromusic.ui.fragments.VolumeFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:layout="@layout/fragment_volume" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -50,7 +50,15 @@
|
|||
|
||||
<include layout="@layout/media_button" />
|
||||
|
||||
<include layout="@layout/volume_controls" />
|
||||
<FrameLayout
|
||||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -204,5 +204,9 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/volume_controls" />
|
||||
<FrameLayout
|
||||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0" />
|
||||
</LinearLayout>
|
|
@ -8,6 +8,46 @@
|
|||
android:paddingTop="8dp"
|
||||
tools:ignore="MissingPrefix">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:freezesText="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -20,43 +60,10 @@
|
|||
|
||||
<include layout="@layout/player_time" />
|
||||
|
||||
<LinearLayout
|
||||
<include layout="@layout/media_button" />
|
||||
<FrameLayout
|
||||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
tools:text="Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
tools:text="Title" />
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/media_button" />
|
||||
|
||||
<include layout="@layout/volume_controls" />
|
||||
android:layout_weight="0" />
|
||||
</LinearLayout>
|
||||
|
|
|
@ -8,54 +8,6 @@
|
|||
android:orientation="vertical"
|
||||
tools:ignore="MissingPrefix">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songCurrentProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|left|end"
|
||||
android:paddingLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|right|end"
|
||||
android:paddingRight="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
style="@style/MusicProgressSlider"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/songTotalTime"
|
||||
android:layout_toRightOf="@id/songCurrentProgress"
|
||||
android:maxHeight="3dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:splitTrack="false"
|
||||
android:thumb="@drawable/switch_thumb_material"
|
||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||
tools:progress="20" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -96,8 +48,63 @@
|
|||
android:textColor="?android:attr/textColorSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
style="@style/MusicProgressSlider"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/songTotalTime"
|
||||
android:layout_toRightOf="@id/songCurrentProgress"
|
||||
android:maxHeight="3dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:splitTrack="false"
|
||||
android:thumb="@drawable/switch_thumb_material"
|
||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||
tools:progress="20" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|right|end"
|
||||
android:paddingRight="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/songCurrentProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|left|end"
|
||||
android:paddingLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/media_button" />
|
||||
|
||||
<include layout="@layout/volume_controls" />
|
||||
<FrameLayout
|
||||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
|
@ -2,32 +2,42 @@
|
|||
<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="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:gravity="end"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:rotation="90"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playerRepeatButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/roundSelector"
|
||||
android:contentDescription="TODO"
|
||||
android:padding="16dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:tint="@color/md_black_1000"
|
||||
android:contentDescription="TODO" />
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playerShuffleButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/roundSelector"
|
||||
android:contentDescription="TODO"
|
||||
android:padding="16dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_shuffle_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:tint="@color/md_black_1000"
|
||||
android:contentDescription="TODO" />
|
||||
tools:tint="@color/md_black_1000" />
|
||||
</LinearLayout>
|
|
@ -6,14 +6,13 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
tools:showIn="@layout/fragment_player_playback_controls">
|
||||
android:paddingEnd="8dp" >
|
||||
|
||||
<fragment
|
||||
<!-- <fragment
|
||||
android:id="@+id/volumeFragment"
|
||||
android:name="code.name.monkey.retromusic.ui.fragments.VolumeFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:layout="@layout/fragment_volume" />
|
||||
tools:layout="@layout/fragment_volume" />-->
|
||||
</FrameLayout>
|
|
@ -607,5 +607,6 @@
|
|||
<string name="pick_image_intent_text">Pick image</string>
|
||||
<string name="set_photo">Set a profile photo</string>
|
||||
<string name="edit">Edit</string>
|
||||
<string name="swipe_to_unlock">Swipe to unlock</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||
<item name="md_corner_radius">12dp</item>
|
||||
<item name="md_font_title">@font/circular</item>
|
||||
<item name="md_font_body">@font/circular</item>
|
||||
|
|
|
@ -3,7 +3,7 @@ apply plugin: 'kotlin-android-extensions'
|
|||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
compileSdkVersion 28
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue