all: view cleanup
Do even more cleanup regarding views.
This commit is contained in:
parent
33da09a08a
commit
2ff7d93263
48 changed files with 122 additions and 98 deletions
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
## dev [v2.2.3, v2.3.0, or v3.0.0]
|
## dev [v2.2.3, v2.3.0, or v3.0.0]
|
||||||
|
|
||||||
|
#### What's Fixed
|
||||||
|
- Fixed incorrect ellipsizing on song items
|
||||||
|
|
||||||
#### Dev/Meta
|
#### Dev/Meta
|
||||||
- Switched to spotless and ktfmt instead of ktlint
|
- Switched to spotless and ktfmt instead of ktlint
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,9 @@ import org.oxycblt.auxio.util.replaceSystemBarInsetsCompat
|
||||||
import org.oxycblt.auxio.util.systemBarInsetsCompat
|
import org.oxycblt.auxio.util.systemBarInsetsCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The single [AppCompatActivity] for Auxio. TODO: Add a new view for crashes with a stack trace
|
* The single [AppCompatActivity] for Auxio.
|
||||||
|
*
|
||||||
|
* TODO: Add a new view for crashes with a stack trace
|
||||||
* TODO: Custom language support TODO: Rework menus [perhaps add multi-select]
|
* TODO: Custom language support TODO: Rework menus [perhaps add multi-select]
|
||||||
*/
|
*/
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
|
|
|
@ -40,8 +40,9 @@ import org.oxycblt.auxio.util.logW
|
||||||
/**
|
/**
|
||||||
* A wrapper around the home fragment that shows the playback fragment and controls the more
|
* A wrapper around the home fragment that shows the playback fragment and controls the more
|
||||||
* high-level navigation features.
|
* high-level navigation features.
|
||||||
* @author OxygenCobalt TODO: Add a new view with a stack trace whenever the music loading process
|
* @author OxygenCobalt
|
||||||
* fails.
|
*
|
||||||
|
* TODO: Add a new view with a stack trace whenever the music loading process fails.
|
||||||
*/
|
*/
|
||||||
class MainFragment : Fragment() {
|
class MainFragment : Fragment() {
|
||||||
private val playbackModel: PlaybackViewModel by activityViewModels()
|
private val playbackModel: PlaybackViewModel by activityViewModels()
|
||||||
|
|
|
@ -53,8 +53,10 @@ import org.oxycblt.auxio.util.logTraceOrThrow
|
||||||
/**
|
/**
|
||||||
* The main "Launching Point" fragment of Auxio, allowing navigation to the detail views for each
|
* The main "Launching Point" fragment of Auxio, allowing navigation to the detail views for each
|
||||||
* respective item.
|
* respective item.
|
||||||
* @author OxygenCobalt TODO: Make tabs invisible when there is only one TODO: Add duration and song
|
* @author OxygenCobalt
|
||||||
* count sorts
|
*
|
||||||
|
* TODO: Make tabs invisible when there is only one
|
||||||
|
* TODO: Add duration and song count sorts
|
||||||
*/
|
*/
|
||||||
class HomeFragment : Fragment() {
|
class HomeFragment : Fragment() {
|
||||||
private val playbackModel: PlaybackViewModel by activityViewModels()
|
private val playbackModel: PlaybackViewModel by activityViewModels()
|
||||||
|
|
|
@ -35,13 +35,13 @@ import androidx.annotation.AttrRes
|
||||||
import androidx.appcompat.widget.AppCompatTextView
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
import androidx.core.math.MathUtils
|
import androidx.core.math.MathUtils
|
||||||
import androidx.core.view.isInvisible
|
import androidx.core.view.isInvisible
|
||||||
import androidx.core.view.updatePadding
|
|
||||||
import androidx.core.widget.TextViewCompat
|
import androidx.core.widget.TextViewCompat
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import org.oxycblt.auxio.R
|
import org.oxycblt.auxio.R
|
||||||
|
import org.oxycblt.auxio.ui.EdgeRecyclerView
|
||||||
import org.oxycblt.auxio.util.canScroll
|
import org.oxycblt.auxio.util.canScroll
|
||||||
import org.oxycblt.auxio.util.getAttrColorSafe
|
import org.oxycblt.auxio.util.getAttrColorSafe
|
||||||
import org.oxycblt.auxio.util.getDimenOffsetSafe
|
import org.oxycblt.auxio.util.getDimenOffsetSafe
|
||||||
|
@ -76,7 +76,7 @@ import org.oxycblt.auxio.util.systemBarInsetsCompat
|
||||||
class FastScrollRecyclerView
|
class FastScrollRecyclerView
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) :
|
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) :
|
||||||
RecyclerView(context, attrs, defStyleAttr) {
|
EdgeRecyclerView(context, attrs, defStyleAttr) {
|
||||||
/** Callback to provide a string to be shown on the popup when an item is passed */
|
/** Callback to provide a string to be shown on the popup when an item is passed */
|
||||||
var popupProvider: ((Int) -> String)? = null
|
var popupProvider: ((Int) -> String)? = null
|
||||||
|
|
||||||
|
@ -118,7 +118,6 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val initialPadding = Rect(paddingLeft, paddingTop, paddingRight, paddingBottom)
|
|
||||||
private val scrollerPadding = Rect(0, 0, 0, 0)
|
private val scrollerPadding = Rect(0, 0, 0, 0)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -316,16 +315,9 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
||||||
|
super.onApplyWindowInsets(insets)
|
||||||
val bars = insets.systemBarInsetsCompat
|
val bars = insets.systemBarInsetsCompat
|
||||||
|
|
||||||
updatePadding(
|
|
||||||
initialPadding.left,
|
|
||||||
initialPadding.top,
|
|
||||||
initialPadding.right,
|
|
||||||
initialPadding.bottom + bars.bottom)
|
|
||||||
|
|
||||||
scrollerPadding.bottom = bars.bottom
|
scrollerPadding.bottom = bars.bottom
|
||||||
|
|
||||||
return insets
|
return insets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ abstract class HomeListFragment : Fragment() {
|
||||||
onDragListener = { dragging -> homeModel.updateFastScrolling(dragging) }
|
onDragListener = { dragging -> homeModel.updateFastScrolling(dragging) }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that this RecyclerView has data before startup
|
|
||||||
homeData.observe(viewLifecycleOwner) { data -> homeAdapter.updateData(data) }
|
homeData.observe(viewLifecycleOwner) { data -> homeAdapter.updateData(data) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,10 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple [ItemTouchHelper.Callback] that handles dragging items in the tab customization menu.
|
* A simple [ItemTouchHelper.Callback] that handles dragging items in the tab customization menu.
|
||||||
* Unlike QueueAdapter's ItemTouchHelper, this one is bare and simple. TODO: Consider unifying the
|
* Unlike QueueAdapter's ItemTouchHelper, this one is bare and simple.
|
||||||
* shared behavior between this and QueueDragCallback into a single class.
|
*
|
||||||
|
* TODO: Consider unifying the
|
||||||
|
* shared behavior between this and QueueDragCallback into a single class.
|
||||||
*/
|
*/
|
||||||
class TabDragCallback(private val getTabs: () -> Array<Tab>) : ItemTouchHelper.Callback() {
|
class TabDragCallback(private val getTabs: () -> Array<Tab>) : ItemTouchHelper.Callback() {
|
||||||
private val tabs: Array<Tab>
|
private val tabs: Array<Tab>
|
||||||
|
|
|
@ -33,8 +33,10 @@ sealed class Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [Item] variant that represents a music item. TODO: Make name the actual display name and move raw
|
* [Item] variant that represents a music item.
|
||||||
* names (including file names) to a new field called rawName.
|
*
|
||||||
|
* TODO: Make name the actual display name and move raw names (including file names) to a
|
||||||
|
* new field called rawName.
|
||||||
*/
|
*/
|
||||||
sealed class Music : Item() {
|
sealed class Music : Item() {
|
||||||
/** The raw name of this item. */
|
/** The raw name of this item. */
|
||||||
|
|
|
@ -32,8 +32,9 @@ import org.oxycblt.auxio.util.logE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main storage for music items. Getting an instance of this object is more complicated as it
|
* The main storage for music items. Getting an instance of this object is more complicated as it
|
||||||
* loads asynchronously. See the companion object for more. TODO: Add automatic rescanning [major
|
* loads asynchronously. See the companion object for more.
|
||||||
* change]
|
*
|
||||||
|
* TODO: Add automatic rescanning [major change]
|
||||||
* @author OxygenCobalt
|
* @author OxygenCobalt
|
||||||
*/
|
*/
|
||||||
class MusicStore private constructor() {
|
class MusicStore private constructor() {
|
||||||
|
@ -111,7 +112,9 @@ class MusicStore private constructor() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A response that [MusicStore] returns when loading music. And before you ask, yes, I do like
|
* A response that [MusicStore] returns when loading music. And before you ask, yes, I do like
|
||||||
* rust. TODO: Add the exception to the "FAILED" ErrorKind
|
* rust.
|
||||||
|
*
|
||||||
|
* TODO: Add the exception to the "FAILED" ErrorKind
|
||||||
*/
|
*/
|
||||||
sealed class Response {
|
sealed class Response {
|
||||||
class Ok(val musicStore: MusicStore) : Response()
|
class Ok(val musicStore: MusicStore) : Response()
|
||||||
|
|
|
@ -30,8 +30,10 @@ import org.oxycblt.auxio.util.logD
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ViewModel that acts as a wrapper around [ExcludedDatabase], allowing for the addition/removal of
|
* ViewModel that acts as a wrapper around [ExcludedDatabase], allowing for the addition/removal of
|
||||||
* paths. Use [Factory] to instantiate this. TODO: Unify with MusicViewModel
|
* paths. Use [Factory] to instantiate this.
|
||||||
* @author OxygenCobalt
|
* @author OxygenCobalt
|
||||||
|
*
|
||||||
|
* TODO: Unify with MusicViewModel
|
||||||
*/
|
*/
|
||||||
class ExcludedViewModel(private val excludedDatabase: ExcludedDatabase) : ViewModel() {
|
class ExcludedViewModel(private val excludedDatabase: ExcludedDatabase) : ViewModel() {
|
||||||
private val mPaths = MutableLiveData(mutableListOf<String>())
|
private val mPaths = MutableLiveData(mutableListOf<String>())
|
||||||
|
|
|
@ -37,7 +37,9 @@ import org.oxycblt.auxio.util.systemBarInsetsCompat
|
||||||
/**
|
/**
|
||||||
* A [Fragment] that displays more information about the song, along with more media controls.
|
* A [Fragment] that displays more information about the song, along with more media controls.
|
||||||
* Instantiation is done by the navigation component, **do not instantiate this fragment manually.**
|
* Instantiation is done by the navigation component, **do not instantiate this fragment manually.**
|
||||||
* @author OxygenCobalt TODO: Handle RTL correctly in the playback buttons
|
* @author OxygenCobalt
|
||||||
|
*
|
||||||
|
* TODO: Handle RTL correctly in the playback buttons
|
||||||
*/
|
*/
|
||||||
class PlaybackFragment : Fragment() {
|
class PlaybackFragment : Fragment() {
|
||||||
private val playbackModel: PlaybackViewModel by activityViewModels()
|
private val playbackModel: PlaybackViewModel by activityViewModels()
|
||||||
|
|
|
@ -64,8 +64,9 @@ import org.oxycblt.auxio.util.systemBarInsetsCompat
|
||||||
* state and view magic. I tried my best to document it, but it's probably not the most friendly or
|
* state and view magic. I tried my best to document it, but it's probably not the most friendly or
|
||||||
* extendable. You have been warned.
|
* extendable. You have been warned.
|
||||||
*
|
*
|
||||||
* @author OxygenCobalt (With help from Umano and Hai Zhang) TODO: Find a better way to handle
|
* @author OxygenCobalt (With help from Umano and Hai Zhang)
|
||||||
* PlaybackFragment in general (navigation, creation)
|
*
|
||||||
|
* TODO: Find a better way to handle PlaybackFragment in general (navigation, creation)
|
||||||
*/
|
*/
|
||||||
class PlaybackLayout
|
class PlaybackLayout
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
|
|
|
@ -34,8 +34,9 @@ import org.oxycblt.auxio.util.stateList
|
||||||
/**
|
/**
|
||||||
* A custom view that bundles together a seekbar with a current duration and a total duration. The
|
* A custom view that bundles together a seekbar with a current duration and a total duration. The
|
||||||
* sub-views are specifically laid out so that the seekbar has an adequate touch height while still
|
* sub-views are specifically laid out so that the seekbar has an adequate touch height while still
|
||||||
* not having gobs of whitespace everywhere. TODO: Add smooth seeking [i.e seeking in sub-second
|
* not having gobs of whitespace everywhere.
|
||||||
* values]
|
*
|
||||||
|
* TODO: Add smooth seeking [i.e seeking in sub-second values]
|
||||||
* @author OxygenCobalt
|
* @author OxygenCobalt
|
||||||
*/
|
*/
|
||||||
@SuppressLint("RestrictedApi")
|
@SuppressLint("RestrictedApi")
|
||||||
|
|
|
@ -61,7 +61,8 @@ class AudioReactor(context: Context, private val callback: (Float) -> Unit) :
|
||||||
|
|
||||||
private var pauseWasTransient = false
|
private var pauseWasTransient = false
|
||||||
|
|
||||||
// It's good to keep the volume and the ducking multiplier separate so that we can
|
// It's good to keep the volume and the ducking multiplier separate so that we don't
|
||||||
|
// lose information
|
||||||
private var multiplier = 1f
|
private var multiplier = 1f
|
||||||
set(value) {
|
set(value) {
|
||||||
field = value
|
field = value
|
||||||
|
@ -87,8 +88,11 @@ class AudioReactor(context: Context, private val callback: (Float) -> Unit) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the rough volume adjustment for [Metadata] with ReplayGain tags. This is based off
|
* Updates the rough volume adjustment for [Metadata] with ReplayGain tags. This is based off
|
||||||
* Vanilla Music's implementation. TODO: Add ReplayGain pre-amp TODO: Add positive ReplayGain
|
* Vanilla Music's implementation.
|
||||||
* values
|
*
|
||||||
|
* TODO: Add ReplayGain pre-amp
|
||||||
|
*
|
||||||
|
* TODO: Add positive ReplayGain
|
||||||
*/
|
*/
|
||||||
fun applyReplayGain(metadata: Metadata?) {
|
fun applyReplayGain(metadata: Metadata?) {
|
||||||
if (metadata == null) {
|
if (metadata == null) {
|
||||||
|
|
|
@ -498,9 +498,10 @@ class PlaybackService :
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pause from a headset plug. TODO: Find a way to centralize this stuff into a single
|
* Pause from a headset plug.
|
||||||
* BroadcastReciever instead of the weird disjointed arrangement between MediaSession and
|
*
|
||||||
* this.
|
* TODO: Find a way to centralize this stuff into a single BroadcastReceiver instead of
|
||||||
|
* the weird disjointed arrangement between MediaSession and this.
|
||||||
*/
|
*/
|
||||||
private fun pauseFromPlug() {
|
private fun pauseFromPlug() {
|
||||||
if (playbackManager.song != null) {
|
if (playbackManager.song != null) {
|
||||||
|
|
|
@ -54,8 +54,10 @@ fun Fragment.newMenu(anchor: View, data: Item, flag: Int = ActionMenu.FLAG_NONE)
|
||||||
* @param flag Any extra flags to accompany the data. See [FLAG_NONE], [FLAG_IN_ALBUM],
|
* @param flag Any extra flags to accompany the data. See [FLAG_NONE], [FLAG_IN_ALBUM],
|
||||||
* [FLAG_IN_ARTIST], [FLAG_IN_GENRE] for more details.
|
* [FLAG_IN_ARTIST], [FLAG_IN_GENRE] for more details.
|
||||||
* @throws IllegalStateException When there is no menu for this specific datatype/flag
|
* @throws IllegalStateException When there is no menu for this specific datatype/flag
|
||||||
* @author OxygenCobalt TODO: Stop scrolling when a menu is open TODO: Prevent duplicate menus from
|
* @author OxygenCobalt
|
||||||
* showing up TODO: Maybe replace this with a bottom sheet?
|
*
|
||||||
|
* TODO: Stop scrolling when a menu is open TODO: Prevent duplicate menus from showing up
|
||||||
|
* TODO: Maybe replace this with a bottom sheet?
|
||||||
*/
|
*/
|
||||||
class ActionMenu(
|
class ActionMenu(
|
||||||
activity: AppCompatActivity,
|
activity: AppCompatActivity,
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
package org.oxycblt.auxio.ui
|
package org.oxycblt.auxio.ui
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.graphics.Rect
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.WindowInsets
|
import android.view.WindowInsets
|
||||||
import androidx.annotation.AttrRes
|
import androidx.annotation.AttrRes
|
||||||
|
@ -26,12 +27,25 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.oxycblt.auxio.util.systemBarInsetsCompat
|
import org.oxycblt.auxio.util.systemBarInsetsCompat
|
||||||
|
|
||||||
/** A [RecyclerView] that automatically applies insets to itself. */
|
/** A [RecyclerView] that automatically applies insets to itself. */
|
||||||
class EdgeRecyclerView
|
open class EdgeRecyclerView
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) :
|
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) :
|
||||||
RecyclerView(context, attrs, defStyleAttr) {
|
RecyclerView(context, attrs, defStyleAttr) {
|
||||||
|
private val initialPadding = Rect(paddingLeft, paddingTop, paddingRight, paddingBottom)
|
||||||
|
|
||||||
|
init {
|
||||||
|
// Prevent children from being clipped by window insets
|
||||||
|
clipToPadding = false
|
||||||
|
}
|
||||||
|
|
||||||
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
override fun onApplyWindowInsets(insets: WindowInsets): WindowInsets {
|
||||||
updatePadding(bottom = insets.systemBarInsetsCompat.bottom)
|
|
||||||
|
updatePadding(
|
||||||
|
initialPadding.left,
|
||||||
|
initialPadding.top,
|
||||||
|
initialPadding.right,
|
||||||
|
initialPadding.bottom + insets.systemBarInsetsCompat.bottom)
|
||||||
|
|
||||||
return insets
|
return insets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,9 +32,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
abstract class LifecycleDialog : AppCompatDialogFragment() {
|
abstract class LifecycleDialog : AppCompatDialogFragment() {
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val builder = MaterialAlertDialogBuilder(requireActivity(), theme)
|
val builder = MaterialAlertDialogBuilder(requireActivity(), theme)
|
||||||
|
|
||||||
onConfigDialog(builder)
|
onConfigDialog(builder)
|
||||||
|
|
||||||
return builder.create()
|
return builder.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,6 @@ abstract class BaseViewHolder<T : Item>(
|
||||||
doOnLongClick?.let { onLongClick ->
|
doOnLongClick?.let { onLongClick ->
|
||||||
binding.root.setOnLongClickListener { view ->
|
binding.root.setOnLongClickListener { view ->
|
||||||
onLongClick(view, data)
|
onLongClick(view, data)
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24"
|
||||||
android:tint="?attr/colorPrimary">
|
android:tint="?attr/colorPrimary">
|
||||||
<path
|
<path
|
||||||
android:fillColor="@android:color/white"
|
android:fillColor="@android:color/white"
|
||||||
android:pathData="M12,3v10.55c-0.59,-0.34 -1.27,-0.55 -2,-0.55 -2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4V7h4V3h-6z"/>
|
android:pathData="M12,3v10.55c-0.59,-0.34 -1.27,-0.55 -2,-0.55 -2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4V7h4V3h-6z" />
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="oval">
|
android:shape="oval">
|
||||||
<size android:height="4dp"
|
<size
|
||||||
|
android:height="4dp"
|
||||||
android:width="4dp" />
|
android:width="4dp" />
|
||||||
<solid android:color="?attr/colorPrimary" />
|
<solid android:color="?attr/colorPrimary" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
@ -23,8 +23,7 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/playback_layout"
|
android:id="@+id/playback_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:clipToPadding="false">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/playback_toolbar"
|
android:id="@+id/playback_toolbar"
|
||||||
|
|
|
@ -23,8 +23,7 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/playback_layout"
|
android:id="@+id/playback_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:clipToPadding="false">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/playback_toolbar"
|
android:id="@+id/playback_toolbar"
|
||||||
|
|
|
@ -23,8 +23,7 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/playback_layout"
|
android:id="@+id/playback_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:clipToPadding="false">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/playback_toolbar"
|
android:id="@+id/playback_toolbar"
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layout 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">
|
|
||||||
|
|
||||||
<org.oxycblt.auxio.home.fastscroll.FastScrollRecyclerView
|
|
||||||
android:id="@+id/home_recycler"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:paddingBottom="@dimen/recycler_fab_space_large"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
|
||||||
tools:listitem="@layout/item_artist" />
|
|
||||||
</layout>
|
|
|
@ -23,8 +23,7 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/playback_layout"
|
android:id="@+id/playback_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:clipToPadding="false">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/playback_toolbar"
|
android:id="@+id/playback_toolbar"
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
android:id="@+id/detail_recycler"
|
android:id="@+id/detail_recycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||||
tools:listitem="@layout/item_detail" />
|
tools:listitem="@layout/item_detail" />
|
||||||
|
|
|
@ -5,10 +5,9 @@
|
||||||
|
|
||||||
<org.oxycblt.auxio.home.fastscroll.FastScrollRecyclerView
|
<org.oxycblt.auxio.home.fastscroll.FastScrollRecyclerView
|
||||||
android:id="@+id/home_recycler"
|
android:id="@+id/home_recycler"
|
||||||
|
style="@style/Widget.Auxio.RecyclerView.WithAdaptiveFab"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
|
||||||
android:paddingBottom="@dimen/recycler_fab_space_normal"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||||
tools:listitem="@layout/item_artist" />
|
tools:listitem="@layout/item_artist" />
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/playback_layout"
|
android:id="@+id/playback_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:clipToPadding="false">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/playback_toolbar"
|
android:id="@+id/playback_toolbar"
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
android:id="@+id/queue_recycler"
|
android:id="@+id/queue_recycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
|
||||||
android:overScrollMode="ifContentScrolls"
|
android:overScrollMode="ifContentScrolls"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
android:id="@+id/search_recycler"
|
android:id="@+id/search_recycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||||
tools:listitem="@layout/item_song" />
|
tools:listitem="@layout/item_song" />
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
android:name="org.oxycblt.auxio.settings.SettingsListFragment"
|
android:name="org.oxycblt.auxio.settings.SettingsListFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||||
|
|
||||||
</org.oxycblt.auxio.ui.EdgeCoordinatorLayout>
|
</org.oxycblt.auxio.ui.EdgeCoordinatorLayout>
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:ignore="ContentDescription"
|
|
||||||
tools:src="@drawable/ic_album" />
|
tools:src="@drawable/ic_album" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -31,6 +30,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{song.name}"
|
android:text="@{song.name}"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
|
@ -43,8 +43,10 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:songInfo="@{song}"
|
app:songInfo="@{song}"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/song_name"
|
app:layout_constraintTop_toBottomOf="@+id/song_name"
|
||||||
tools:text="Artist / Album" />
|
tools:text="Artist / Album" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -15,7 +15,8 @@
|
||||||
android:title="@string/lbl_sort_year" />
|
android:title="@string/lbl_sort_year" />
|
||||||
</group>
|
</group>
|
||||||
<group android:checkableBehavior="all">
|
<group android:checkableBehavior="all">
|
||||||
<item android:id="@+id/option_sort_asc"
|
<item
|
||||||
|
android:id="@+id/option_sort_asc"
|
||||||
android:title="@string/lbl_sort_asc" />
|
android:title="@string/lbl_sort_asc" />
|
||||||
</group>
|
</group>
|
||||||
</menu>
|
</menu>
|
|
@ -29,7 +29,8 @@
|
||||||
android:title="@string/lbl_sort_year" />
|
android:title="@string/lbl_sort_year" />
|
||||||
</group>
|
</group>
|
||||||
<group android:checkableBehavior="all">
|
<group android:checkableBehavior="all">
|
||||||
<item android:id="@+id/option_sort_asc"
|
<item
|
||||||
|
android:id="@+id/option_sort_asc"
|
||||||
android:title="@string/lbl_sort_asc" />
|
android:title="@string/lbl_sort_asc" />
|
||||||
</group>
|
</group>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<string name="lbl_play_genre">"Přehrát z žánru"</string>
|
<string name="lbl_play_genre">"Přehrát z žánru"</string>
|
||||||
<string name="lbl_playback">"Nyní hraje"</string>
|
<string name="lbl_playback">"Nyní hraje"</string>
|
||||||
<string name="lbl_queue">"Fronta"</string>
|
<string name="lbl_queue">"Fronta"</string>
|
||||||
<string name="lbl_play_next">Další skladba</string>
|
<string name="lbl_play_next">Další skladba</string>
|
||||||
<string name="lbl_queue_add">"Přidat do fronty"</string>
|
<string name="lbl_queue_add">"Přidat do fronty"</string>
|
||||||
<string name="lbl_queue_added">"Přidáno do fronty"</string>
|
<string name="lbl_queue_added">"Přidáno do fronty"</string>
|
||||||
<string name="lbl_go_artist">"Jít na umělce"</string>
|
<string name="lbl_go_artist">"Jít na umělce"</string>
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
<string name="set_audio">Звук</string>
|
<string name="set_audio">Звук</string>
|
||||||
<string name="set_focus">Аудио-фокус</string>
|
<string name="set_focus">Аудио-фокус</string>
|
||||||
<string name="set_focus_desc">Ставить на паузу при звонках</string>
|
<string name="set_focus_desc">Ставить на паузу при звонках</string>
|
||||||
<string name="set_replay_gain">ReplayGain (экспериментально)</string>
|
<string name="set_replay_gain">ReplayGain (экспериментально)</string>
|
||||||
<string name="set_off">Выкл.</string>
|
<string name="set_off">Выкл.</string>
|
||||||
<string name="set_replay_gain_track">По треку</string>
|
<string name="set_replay_gain_track">По треку</string>
|
||||||
<string name="set_replay_gain_album">По альбому</string>
|
<string name="set_replay_gain_album">По альбому</string>
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<style name="Widget.Auxio.RecyclerView.WithAdaptiveFab" parent="">
|
||||||
|
<item name="android:paddingBottom">@dimen/recycler_fab_space_large</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Auxio.FloatingActionButton.Adaptive" parent="Widget.Material3.FloatingActionButton.Large.Primary">
|
<style name="Widget.Auxio.FloatingActionButton.Adaptive" parent="Widget.Material3.FloatingActionButton.Large.Primary">
|
||||||
<item name="fabSize">normal</item>
|
<item name="fabSize">normal</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="Widget.Auxio.Button.AppWidget.V31" parent="Widget.AppCompat.Button.Borderless">
|
|
||||||
|
<style name="Widget.Auxio.Button.AppWidget.V31" parent="Widget.AppCompat.Button.Borderless">
|
||||||
<item name="android:background">@drawable/ui_large_unbounded_ripple</item>
|
<item name="android:background">@drawable/ui_large_unbounded_ripple</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="Theme.Widget" parent="@android:style/Theme.DeviceDefault.DayNight">
|
|
||||||
|
<style name="Theme.Widget" parent="@android:style/Theme.DeviceDefault.DayNight">
|
||||||
<item name="colorSurface">@color/widget_surface</item>
|
<item name="colorSurface">@color/widget_surface</item>
|
||||||
<item name="colorPrimary">?android:attr/colorAccent</item>
|
<item name="colorPrimary">?android:attr/colorAccent</item>
|
||||||
<item name="colorSecondary">?android:attr/colorAccent</item>
|
<item name="colorSecondary">?android:attr/colorAccent</item>
|
||||||
|
|
|
@ -9,8 +9,10 @@
|
||||||
<style name="Theme.Auxio.Dialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
|
<style name="Theme.Auxio.Dialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
|
||||||
<item name="android:checkedTextViewStyle">@style/Widget.Auxio.Dialog.CheckedTextView</item>
|
<item name="android:checkedTextViewStyle">@style/Widget.Auxio.Dialog.CheckedTextView</item>
|
||||||
<item name="materialAlertDialogTitleTextStyle">@style/Widget.Auxio.Dialog.TextView</item>
|
<item name="materialAlertDialogTitleTextStyle">@style/Widget.Auxio.Dialog.TextView</item>
|
||||||
<item name="buttonBarPositiveButtonStyle">@style/Widget.Material3.Button.TextButton.Dialog</item>
|
<item name="buttonBarPositiveButtonStyle">@style/Widget.Material3.Button.TextButton.Dialog
|
||||||
<item name="buttonBarNegativeButtonStyle">@style/Widget.Material3.Button.TextButton.Dialog</item>
|
</item>
|
||||||
|
<item name="buttonBarNegativeButtonStyle">@style/Widget.Material3.Button.TextButton.Dialog
|
||||||
|
</item>
|
||||||
<item name="buttonBarNeutralButtonStyle">@style/Widget.Auxio.Dialog.Button.Flush</item>
|
<item name="buttonBarNeutralButtonStyle">@style/Widget.Auxio.Dialog.Button.Flush</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<style name="Widget.Auxio.Image.MidHuge" parent="">
|
<style name="Widget.Auxio.Image.MidHuge" parent="">
|
||||||
<item name="android:layout_width">@dimen/size_cover_mid_huge</item>
|
<item name="android:layout_width">@dimen/size_cover_mid_huge</item>
|
||||||
<item name="android:layout_height">@dimen/size_cover_mid_huge</item>
|
<item name="android:layout_height">@dimen/size_cover_mid_huge</item>
|
||||||
<item name="cornerRadius">@dimen/size_corners_large</item>
|
<item name="cornerRadius">@dimen/size_corners_large</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Auxio.Image.Huge" parent="">
|
<style name="Widget.Auxio.Image.Huge" parent="">
|
||||||
|
@ -69,6 +69,10 @@
|
||||||
<item name="android:focusable">true</item>
|
<item name="android:focusable">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Widget.Auxio.RecyclerView.WithAdaptiveFab" parent="">
|
||||||
|
<item name="android:paddingBottom">@dimen/recycler_fab_space_normal</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="ThemeOverlay.Accent" parent="">
|
<style name="ThemeOverlay.Accent" parent="">
|
||||||
<item name="colorOnPrimary">?attr/colorSurface</item>
|
<item name="colorOnPrimary">?attr/colorSurface</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="Theme.Auxio.Black" parent="Theme.Auxio.App">
|
|
||||||
|
<style name="Theme.Auxio.Black" parent="Theme.Auxio.App">
|
||||||
<item name="colorSurface">@android:color/black</item>
|
<item name="colorSurface">@android:color/black</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue