Removed queue icon and fixed color
This commit is contained in:
parent
e1f2d14ee8
commit
afc4f10be2
12 changed files with 54 additions and 69 deletions
|
@ -226,11 +226,6 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
}
|
||||
|
||||
private fun loadAlbumCover() {
|
||||
/* Glide.with(this).load(RetroUtil.getAlbumArtUri(album.id)).placeholder(R.drawable.default_album_art)
|
||||
.error(R.drawable.default_album_art)
|
||||
.dontTransform()
|
||||
.dontAnimate().into(image)*/
|
||||
|
||||
SongGlideRequest.Builder.from(Glide.with(this), album.safeGetFirstSong())
|
||||
.checkIgnoreMediaStore(this)
|
||||
.ignoreMediaStore(PreferenceUtil.getInstance(this).ignoreMediaStoreArtwork())
|
||||
|
|
|
@ -198,9 +198,9 @@ class PlayingQueueAdapter(
|
|||
|
||||
override fun onGetSwipeReactionType(holder: ViewHolder?, position: Int, x: Int, y: Int): Int {
|
||||
return if (onCheckCanStartDrag(holder!!, position, x, y)) {
|
||||
SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH_H;
|
||||
SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH_H
|
||||
} else {
|
||||
SwipeableItemConstants.REACTION_CAN_SWIPE_BOTH_H;
|
||||
SwipeableItemConstants.REACTION_CAN_SWIPE_BOTH_H
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,12 +70,12 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
|||
|
||||
|
||||
materialDialog = MaterialDialog(requireActivity(), BottomSheet(LayoutMode.WRAP_CONTENT))
|
||||
.show {
|
||||
icon(R.mipmap.ic_launcher_round)
|
||||
title(R.string.app_name)
|
||||
customView(view = layout, scrollable = true)
|
||||
cornerRadius(PreferenceUtil.getInstance(requireContext()).dialogCorner)
|
||||
}
|
||||
.show {
|
||||
icon(R.mipmap.ic_launcher_round)
|
||||
title(R.string.app_name)
|
||||
customView(view = layout, scrollable = true)
|
||||
cornerRadius(PreferenceUtil.getInstance(requireContext()).dialogCorner)
|
||||
}
|
||||
return materialDialog
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,11 @@ import android.os.Bundle
|
|||
import android.text.SpannableString
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.*
|
||||
import android.view.GestureDetector
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.retromusic.R
|
||||
|
@ -15,14 +19,18 @@ import code.name.monkey.retromusic.fragments.base.AbsMusicServiceFragment
|
|||
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.util.NavigationUtil
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.RetroUtil
|
||||
import code.name.monkey.retromusic.util.ViewUtil
|
||||
import kotlinx.android.synthetic.main.fragment_mini_player.*
|
||||
import kotlinx.android.synthetic.main.fragment_mini_player.actionNext
|
||||
import kotlinx.android.synthetic.main.fragment_mini_player.actionPrevious
|
||||
import kotlinx.android.synthetic.main.fragment_mini_player.miniPlayerPlayPauseButton
|
||||
import kotlinx.android.synthetic.main.fragment_mini_player.miniPlayerTitle
|
||||
import kotlinx.android.synthetic.main.fragment_mini_player.progressBar
|
||||
import kotlin.math.abs
|
||||
|
||||
open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpdateHelper.Callback, View.OnClickListener {
|
||||
open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpdateHelper.Callback,
|
||||
View.OnClickListener {
|
||||
|
||||
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||
|
||||
|
@ -37,7 +45,6 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
|
|||
|
||||
override fun onClick(view: View) {
|
||||
when (view.id) {
|
||||
R.id.actionPlayingQueue -> NavigationUtil.goToPlayingQueue(requireActivity())
|
||||
R.id.actionNext -> MusicPlayerRemote.playNextSong()
|
||||
R.id.actionPrevious -> MusicPlayerRemote.back()
|
||||
}
|
||||
|
@ -53,19 +60,16 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
|
|||
actionPrevious.visibility = View.VISIBLE
|
||||
actionNext?.visibility = View.VISIBLE
|
||||
actionPrevious?.visibility = View.VISIBLE
|
||||
actionPlayingQueue.visibility = View.VISIBLE
|
||||
} else {
|
||||
actionNext.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE
|
||||
actionPlayingQueue.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.GONE else View.VISIBLE
|
||||
actionPrevious.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE
|
||||
actionNext.visibility =
|
||||
if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE
|
||||
actionPrevious.visibility =
|
||||
if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
actionPlayingQueue.setOnClickListener(this)
|
||||
actionNext.setOnClickListener(this)
|
||||
actionPrevious.setOnClickListener(this)
|
||||
actionNext?.setOnClickListener(this)
|
||||
actionPrevious?.setOnClickListener(this)
|
||||
|
||||
}
|
||||
|
||||
private fun setUpMiniPlayer() {
|
||||
|
@ -106,7 +110,6 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
|
|||
updatePlayPauseDrawableState()
|
||||
}
|
||||
|
||||
|
||||
override fun onUpdateProgressViews(progress: Int, total: Int) {
|
||||
progressBar.max = total
|
||||
val animator = ObjectAnimator.ofInt(progressBar, "progress", progress)
|
||||
|
@ -139,21 +142,23 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
|
|||
|
||||
init {
|
||||
flingPlayBackController = GestureDetector(context,
|
||||
object : GestureDetector.SimpleOnGestureListener() {
|
||||
override fun onFling(e1: MotionEvent, e2: MotionEvent, velocityX: Float,
|
||||
velocityY: Float): Boolean {
|
||||
if (abs(velocityX) > abs(velocityY)) {
|
||||
if (velocityX < 0) {
|
||||
MusicPlayerRemote.playNextSong()
|
||||
return true
|
||||
} else if (velocityX > 0) {
|
||||
MusicPlayerRemote.playPreviousSong()
|
||||
return true
|
||||
}
|
||||
object : GestureDetector.SimpleOnGestureListener() {
|
||||
override fun onFling(
|
||||
e1: MotionEvent, e2: MotionEvent, velocityX: Float,
|
||||
velocityY: Float
|
||||
): Boolean {
|
||||
if (abs(velocityX) > abs(velocityY)) {
|
||||
if (velocityX < 0) {
|
||||
MusicPlayerRemote.playNextSong()
|
||||
return true
|
||||
} else if (velocityX > 0) {
|
||||
MusicPlayerRemote.playPreviousSong()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
})
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
|
|
|
@ -461,7 +461,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
|||
});
|
||||
getMainActivity().setSupportActionBar(toolbar);
|
||||
toolbar.setNavigationOnClickListener(v -> showMainMenu(OptionsSheetDialogFragment.LIBRARY));
|
||||
//ToolbarContentTintHelper.colorBackButton(toolbar);
|
||||
ToolbarContentTintHelper.colorBackButton(toolbar);
|
||||
//toolbar.setTitleTextColor(ATHUtil.INSTANCE.resolveColor(requireContext(), R.attr.colorOnSecondary));
|
||||
}
|
||||
}
|
|
@ -28,7 +28,7 @@ import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropM
|
|||
import com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeManager
|
||||
import com.h6ah4i.android.widget.advrecyclerview.touchguard.RecyclerViewTouchActionGuardManager
|
||||
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
|
||||
import kotlinx.android.synthetic.main.activity_playing_queue.*
|
||||
import kotlinx.android.synthetic.main.activity_playing_queue.recyclerView
|
||||
|
||||
/**
|
||||
* Created by hemanths on 2019-12-08.
|
||||
|
@ -44,6 +44,7 @@ class PlayingQueueFragment : AbsLibraryPagerRecyclerViewFragment<PlayingQueueAda
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
setupRecyclerView()
|
||||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
recyclerViewTouchActionGuardManager = RecyclerViewTouchActionGuardManager()
|
||||
recyclerViewDragDropManager = RecyclerViewDragDropManager()
|
||||
|
@ -69,7 +70,12 @@ class PlayingQueueFragment : AbsLibraryPagerRecyclerViewFragment<PlayingQueueAda
|
|||
}
|
||||
|
||||
override fun createAdapter(): PlayingQueueAdapter {
|
||||
return PlayingQueueAdapter(requireActivity() as AppCompatActivity, MusicPlayerRemote.playingQueue, MusicPlayerRemote.position, R.layout.item_queue)
|
||||
return PlayingQueueAdapter(
|
||||
requireActivity() as AppCompatActivity,
|
||||
MusicPlayerRemote.playingQueue,
|
||||
MusicPlayerRemote.position,
|
||||
R.layout.item_queue
|
||||
)
|
||||
}
|
||||
|
||||
override fun onServiceConnected() {
|
||||
|
|
|
@ -82,19 +82,6 @@
|
|||
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
||||
app:tint="?colorOnSurface"
|
||||
tools:tint="?colorOnSurface" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actionPlayingQueue"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?roundSelector"
|
||||
android:padding="6dp"
|
||||
app:srcCompat="@drawable/ic_playlist_play_white_24dp"
|
||||
app:tint="?colorOnSurface"
|
||||
tools:tint="?colorOnSurface" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
|
|
|
@ -94,16 +94,5 @@
|
|||
android:padding="6dp"
|
||||
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
||||
app:tint="?attr/colorControlNormal" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actionPlayingQueue"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?roundSelector"
|
||||
android:padding="6dp"
|
||||
app:srcCompat="@drawable/ic_playlist_play_white_24dp"
|
||||
app:tint="?attr/colorControlNormal" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
|
@ -21,7 +21,9 @@
|
|||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
android:padding="8dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/ic_drag_vertical_white_24dp"
|
||||
app:tint="?colorOnBackground"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
<item name="android:windowLightNavigationBar">false</item>
|
||||
<!--Manual setting colors-->
|
||||
<item name="colorSurface">@color/darkColorSurface</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="colorSurface">@color/blackColorSurface</item>
|
||||
<item name="colorOnBackground">@color/blackColorSurface</item>
|
||||
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
|
||||
<item name="mcab_popup_theme">@style/ThemeOverlay.AppCompat.Dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
@ -106,7 +108,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MaterialButtonTheme" parent="Widget.MaterialComponents.Button">
|
||||
<item name="cornerRadius">8dp</item>
|
||||
<item name="cornerRadius">24dp</item>
|
||||
<item name="iconGravity">textStart</item>
|
||||
<item name="iconTint">?attr/colorControlNormal</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
|
|
Loading…
Reference in a new issue