ui: completely rework icon management
Completely rework the way Auxio handles icons. This is mostly two changes: 1. Removing ImageButton/StyledImageButton for MaterialButton. This is done by abusing MaterialButton's theming options to make it only show an icon. 2. Standardizing icon sizes into small, medium, and large categories. Small is the default, Medium and Large are for edge-cases like the playback icons which look horrible at 24dp. 3. Abusing the Toolbar to make it follow Material 3 guidelines. This mostly involved removing the strange icon sizing and correctly padding the view. 4. Reworking the playback bar to use more, smaller icons, making it more like a Toolbar in the process (which I like).
This commit is contained in:
parent
a56d5849db
commit
84295dcf25
38 changed files with 347 additions and 434 deletions
|
@ -95,7 +95,7 @@ class HomeFragment : ViewBindingFragment<FragmentHomeBinding>(), Toolbar.OnMenuI
|
|||
|
||||
binding.homeToolbar.alpha = 1f - (abs(offset.toFloat()) / (range.toFloat() / 2))
|
||||
|
||||
binding.homePager.updatePadding(
|
||||
binding.homeContent.updatePadding(
|
||||
bottom = binding.homeAppbar.totalScrollRange + offset)
|
||||
})
|
||||
}
|
||||
|
@ -246,8 +246,7 @@ class HomeFragment : ViewBindingFragment<FragmentHomeBinding>(), Toolbar.OnMenuI
|
|||
}
|
||||
|
||||
private fun updateSortMenu(displayMode: DisplayMode, isVisible: (Int) -> Boolean) {
|
||||
val sortItem =
|
||||
requireNotNull(sortItem) { "Cannot update sort menu when view does not exist" }
|
||||
val sortItem = requireNotNull(sortItem) { "Cannot update sort menu while detached" }
|
||||
|
||||
val toHighlight = homeModel.getSortForDisplay(displayMode)
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.oxycblt.auxio.settings.SettingsManager
|
|||
import org.oxycblt.auxio.ui.DisplayMode
|
||||
import org.oxycblt.auxio.ui.Sort
|
||||
import org.oxycblt.auxio.util.logD
|
||||
import org.oxycblt.auxio.util.unlikelyToBeNull
|
||||
|
||||
/**
|
||||
* The ViewModel for managing [HomeFragment]'s data, sorting modes, and tab state.
|
||||
|
@ -107,19 +106,19 @@ class HomeViewModel : ViewModel(), SettingsManager.Callback, MusicStore.Callback
|
|||
when (_currentTab.value) {
|
||||
DisplayMode.SHOW_SONGS -> {
|
||||
settingsManager.libSongSort = sort
|
||||
_songs.value = sort.songs(unlikelyToBeNull(_songs.value))
|
||||
_songs.value = sort.songs(_songs.value)
|
||||
}
|
||||
DisplayMode.SHOW_ALBUMS -> {
|
||||
settingsManager.libAlbumSort = sort
|
||||
_albums.value = sort.albums(unlikelyToBeNull(_albums.value))
|
||||
_albums.value = sort.albums(_albums.value)
|
||||
}
|
||||
DisplayMode.SHOW_ARTISTS -> {
|
||||
settingsManager.libArtistSort = sort
|
||||
_artists.value = sort.artists(unlikelyToBeNull(_artists.value))
|
||||
_artists.value = sort.artists(_artists.value)
|
||||
}
|
||||
DisplayMode.SHOW_GENRES -> {
|
||||
settingsManager.libGenreSort = sort
|
||||
_genres.value = sort.genres(unlikelyToBeNull(_genres.value))
|
||||
_genres.value = sort.genres(_genres.value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ abstract class BaseFetcher : Fetcher {
|
|||
}
|
||||
} catch (e: Exception) {
|
||||
logW("Unable to extract album art due to an error")
|
||||
logW(e.stackTraceToString())
|
||||
null
|
||||
}
|
||||
}
|
||||
|
@ -114,6 +115,9 @@ abstract class BaseFetcher : Fetcher {
|
|||
}
|
||||
|
||||
private fun fetchAospMetadataCovers(context: Context, album: Album): InputStream? {
|
||||
// FIXME: Do not use use here, as Lollipop devices apparently do not have
|
||||
// MediaMetadataRetriever implemented as AutoClosable.
|
||||
|
||||
MediaMetadataRetriever().use { ext ->
|
||||
// This call is time-consuming but it also doesn't seem to hold up the main thread,
|
||||
// so it's probably fine not to wrap it.
|
||||
|
|
|
@ -28,7 +28,6 @@ import kotlinx.coroutines.withContext
|
|||
import org.oxycblt.auxio.music.backend.Api21MediaStoreBackend
|
||||
import org.oxycblt.auxio.music.backend.Api29MediaStoreBackend
|
||||
import org.oxycblt.auxio.music.backend.Api30MediaStoreBackend
|
||||
import org.oxycblt.auxio.music.backend.ExoPlayerBackend
|
||||
import org.oxycblt.auxio.ui.Sort
|
||||
import org.oxycblt.auxio.util.logD
|
||||
import org.oxycblt.auxio.util.logE
|
||||
|
@ -188,7 +187,7 @@ class Indexer {
|
|||
else -> Api21MediaStoreBackend()
|
||||
}
|
||||
|
||||
val songs = buildSongs(context, ExoPlayerBackend(mediaStoreBackend), generation)
|
||||
val songs = buildSongs(context, mediaStoreBackend, generation)
|
||||
if (songs.isEmpty()) {
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -75,11 +75,9 @@ class PlaybackBarFragment : ViewBindingFragment<FragmentPlaybackBarBinding>() {
|
|||
binding.playbackProgressBar.trackColor =
|
||||
requireContext().getColorStateListSafe(R.color.sel_track).defaultColor
|
||||
|
||||
binding.playbackSkipPrev?.setOnClickListener { playbackModel.prev() }
|
||||
|
||||
binding.playbackPlayPause.setOnClickListener { playbackModel.invertPlaying() }
|
||||
|
||||
binding.playbackSkipNext?.setOnClickListener { playbackModel.next() }
|
||||
binding.playbackSkipNext.setOnClickListener { playbackModel.next() }
|
||||
|
||||
// -- VIEWMODEL SETUP ---
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.oxycblt.auxio.playback.state.RepeatMode
|
|||
import org.oxycblt.auxio.ui.MainNavigationAction
|
||||
import org.oxycblt.auxio.ui.NavigationViewModel
|
||||
import org.oxycblt.auxio.ui.ViewBindingFragment
|
||||
import org.oxycblt.auxio.util.getDrawableSafe
|
||||
import org.oxycblt.auxio.util.getSystemBarInsetsCompat
|
||||
import org.oxycblt.auxio.util.launch
|
||||
import org.oxycblt.auxio.util.logD
|
||||
|
@ -162,7 +163,7 @@ class PlaybackPanelFragment :
|
|||
private fun updateRepeat(repeatMode: RepeatMode) {
|
||||
requireBinding().playbackRepeat.apply {
|
||||
isActivated = repeatMode != RepeatMode.NONE
|
||||
setImageResource(repeatMode.icon)
|
||||
icon = requireContext().getDrawableSafe(repeatMode.icon)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ class NotificationComponent(
|
|||
isShuffled: Boolean
|
||||
): NotificationCompat.Action {
|
||||
val drawableRes =
|
||||
if (isShuffled) R.drawable.ic_shuffle_state else R.drawable.ic_remote_shuffle_off
|
||||
if (isShuffled) R.drawable.ic_shuffle else R.drawable.ic_remote_shuffle_off
|
||||
|
||||
return buildAction(context, PlaybackService.ACTION_INVERT_SHUFFLE, drawableRes)
|
||||
}
|
||||
|
|
|
@ -74,6 +74,7 @@ fun handleAccentCompat(prefs: SharedPreferences): Accent {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Default accent on android 12 should be dynamic colors
|
||||
return Accent.from(prefs.getInt(SettingsManager.KEY_ACCENT, 5))
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Auxio Project
|
||||
*
|
||||
* This program 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 program 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.oxycblt.auxio.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
||||
import android.util.AttributeSet
|
||||
import androidx.annotation.AttrRes
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import org.oxycblt.auxio.R
|
||||
import org.oxycblt.auxio.util.getDrawableSafe
|
||||
|
||||
class IndicatorMaterialButton
|
||||
@JvmOverloads
|
||||
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) :
|
||||
MaterialButton(context, attrs, defStyleAttr) {
|
||||
private val indicatorDrawable = context.getDrawableSafe(R.drawable.ui_indicator)
|
||||
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
||||
|
||||
// Put the indicator right below the icon.
|
||||
val x = (measuredWidth - indicatorDrawable.intrinsicWidth) / 2
|
||||
val y = ((measuredHeight - iconSize) / 2) + iconSize
|
||||
|
||||
indicatorDrawable.bounds.set(
|
||||
x, y, x + indicatorDrawable.intrinsicWidth, y + indicatorDrawable.intrinsicHeight)
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
|
||||
// I would use onDrawForeground but apparently that isn't called by Lollipop devices.
|
||||
// This is not referenced in the documentation at all.
|
||||
if (isActivated) {
|
||||
indicatorDrawable.draw(canvas)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,124 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Auxio Project
|
||||
*
|
||||
* This program 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 program 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.oxycblt.auxio.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Matrix
|
||||
import android.graphics.RectF
|
||||
import android.util.AttributeSet
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.appcompat.widget.AppCompatImageButton
|
||||
import org.oxycblt.auxio.R
|
||||
import org.oxycblt.auxio.util.getDimenSizeSafe
|
||||
import org.oxycblt.auxio.util.getDrawableSafe
|
||||
|
||||
/**
|
||||
* An [AppCompatImageButton] that applies many of the stylistic choices that Auxio uses regarding
|
||||
* buttons.
|
||||
*
|
||||
* More specifically, this class add two features:
|
||||
* - Specification of the icon size. This is to accommodate the playback buttons, which tend to be
|
||||
* larger as by default the playback icons look terrible with the gobs of whitespace everywhere.
|
||||
* - Addition of an indicator, which is a dot that can denote when a button is active. This is also
|
||||
* useful for the playback buttons, as at times highlighting them is not enough to differentiate
|
||||
* them.
|
||||
* @author OxygenCobalt
|
||||
*
|
||||
* TODO: Remove this for Material Buttons (I hope)
|
||||
*/
|
||||
class StyledImageButton
|
||||
@JvmOverloads
|
||||
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) :
|
||||
AppCompatImageButton(context, attrs, defStyleAttr) {
|
||||
private val iconSize: Int
|
||||
private var hasIndicator = false
|
||||
set(value) {
|
||||
field = value
|
||||
invalidate()
|
||||
}
|
||||
|
||||
private val centerMatrix = Matrix()
|
||||
private val matrixSrc = RectF()
|
||||
private val matrixDst = RectF()
|
||||
private val indicatorDrawable = context.getDrawableSafe(R.drawable.ui_indicator)
|
||||
|
||||
init {
|
||||
val size = context.getDimenSizeSafe(R.dimen.size_btn_small)
|
||||
minimumWidth = size
|
||||
minimumHeight = size
|
||||
scaleType = ScaleType.MATRIX
|
||||
setBackgroundResource(R.drawable.ui_large_unbounded_ripple)
|
||||
|
||||
val styledAttrs = context.obtainStyledAttributes(attrs, R.styleable.StyledImageButton)
|
||||
iconSize =
|
||||
styledAttrs
|
||||
.getDimension(
|
||||
R.styleable.StyledImageButton_iconSize,
|
||||
context.getDimenSizeSafe(R.dimen.size_icon_normal).toFloat())
|
||||
.toInt()
|
||||
hasIndicator = styledAttrs.getBoolean(R.styleable.StyledImageButton_hasIndicator, false)
|
||||
styledAttrs.recycle()
|
||||
}
|
||||
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
||||
|
||||
// FIXME: Scale this drawable based on available space after padding
|
||||
|
||||
imageMatrix =
|
||||
centerMatrix.apply {
|
||||
reset()
|
||||
drawable?.let { drawable ->
|
||||
// Android is too good to allow us to set a fixed image size, so we instead need
|
||||
// to define a matrix to scale an image directly.
|
||||
|
||||
// First scale the icon up to the desired size.
|
||||
matrixSrc.set(
|
||||
0f,
|
||||
0f,
|
||||
drawable.intrinsicWidth.toFloat(),
|
||||
drawable.intrinsicHeight.toFloat())
|
||||
matrixDst.set(0f, 0f, iconSize.toFloat(), iconSize.toFloat())
|
||||
centerMatrix.setRectToRect(matrixSrc, matrixDst, Matrix.ScaleToFit.CENTER)
|
||||
|
||||
// Then actually center it into the icon, which the previous call does not
|
||||
// actually do.
|
||||
centerMatrix.postTranslate(
|
||||
(measuredWidth - iconSize) / 2f, (measuredHeight - iconSize) / 2f)
|
||||
}
|
||||
}
|
||||
|
||||
// Put the indicator right below the icon.
|
||||
val x = (measuredWidth - indicatorDrawable.intrinsicWidth) / 2
|
||||
val y = ((measuredHeight - iconSize) / 2) + iconSize
|
||||
|
||||
indicatorDrawable.bounds.set(
|
||||
x, y, x + indicatorDrawable.intrinsicWidth, y + indicatorDrawable.intrinsicHeight)
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
|
||||
// I would use onDrawForeground but apparently that isn't called by Lollipop devices.
|
||||
// This is not referenced in the documentation at all.
|
||||
if (hasIndicator && isActivated) {
|
||||
indicatorDrawable.draw(canvas)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -92,7 +92,7 @@ class AccentViewHolder private constructor(private val binding: ItemAccentBindin
|
|||
fun setSelected(isSelected: Boolean) {
|
||||
binding.accent.apply {
|
||||
isEnabled = !isSelected
|
||||
imageTintList =
|
||||
iconTint =
|
||||
if (isSelected) {
|
||||
context.getAttrColorSafe(R.attr.colorSurface).stateList
|
||||
} else {
|
||||
|
|
|
@ -37,7 +37,7 @@ class AccentGridLayoutManager(
|
|||
) : GridLayoutManager(context, attrs, defStyleAttr, defStyleRes) {
|
||||
// We use 72dp here since that's the rough size of the accent item.
|
||||
// This will need to be modified if this is used beyond the accent dialog.
|
||||
private var columnWidth = context.pxOfDp(72f)
|
||||
private var columnWidth = context.pxOfDp(64f)
|
||||
|
||||
private var lastWidth = -1
|
||||
private var lastHeight = -1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/sel_accented"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down.Actions"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
@ -86,26 +86,26 @@
|
|||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_repeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:iconTint="@color/sel_accented"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_change_repeat"
|
||||
android:src="@drawable/ic_repeat"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/ic_repeat"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_prev" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_prev"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_repeat"
|
||||
|
@ -124,27 +124,27 @@
|
|||
app:layout_constraintStart_toStartOf="@+id/playback_seek_bar"
|
||||
tools:src="@drawable/ic_play" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_shuffle"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_shuffle"
|
||||
app:iconTint="@color/sel_accented"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down.Actions"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
@ -84,28 +84,28 @@
|
|||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_album" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_repeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
android:layout_marginEnd="@dimen/spacing_large"
|
||||
android:contentDescription="@string/desc_change_repeat"
|
||||
android:src="@drawable/ic_repeat"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/ic_repeat"
|
||||
app:iconTint="@color/sel_accented"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_prev" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_large"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_prev"
|
||||
android:layout_marginEnd="@dimen/spacing_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
@ -123,27 +123,27 @@
|
|||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:src="@drawable/ic_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
android:layout_marginStart="@dimen/spacing_large"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_shuffle"
|
||||
app:iconTint="@color/sel_accented"
|
||||
android:layout_marginStart="@dimen/spacing_large"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_skip_next"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down.Actions"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
@ -73,28 +73,28 @@
|
|||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_repeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:contentDescription="@string/desc_change_repeat"
|
||||
android:src="@drawable/ic_repeat"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/ic_repeat"
|
||||
app:iconTint="@color/sel_accented"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_prev" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_prev"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
@ -112,27 +112,27 @@
|
|||
app:layout_constraintStart_toStartOf="@+id/playback_seek_bar"
|
||||
tools:src="@drawable/ic_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_shuffle"
|
||||
app:iconTint="@color/sel_accented"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_skip_next"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
|
|
|
@ -13,18 +13,18 @@
|
|||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:icon="@drawable/ic_song" />
|
||||
tools:src="@drawable/ic_album" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_song"
|
||||
style="@style/Widget.Auxio.TextView.Primary.Compact"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.LabelLarger"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.LabelLarger"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_info"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_cover"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
|
@ -33,57 +33,40 @@
|
|||
<TextView
|
||||
android:id="@+id/playback_info"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Compact"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.LabelLarge"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.LabelLarge"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_cover"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_song"
|
||||
tools:text="Artist Name / Album Name" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
android:id="@+id/playback_skip_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_song"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/Widget.Auxio.Button.Icon.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/sel_playing_state"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_next"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
style="@style/Widget.Auxio.Button.Icon.Medium"
|
||||
android:layout_marginEnd="@dimen/spacing_tiny"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/playback_progress_bar"
|
||||
|
@ -96,4 +79,4 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:progress="70" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down.Actions"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
@ -87,27 +87,27 @@
|
|||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_album" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_repeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_change_repeat"
|
||||
android:src="@drawable/ic_repeat"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/ic_repeat"
|
||||
app:iconTint="@color/sel_accented"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_prev" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_prev"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_repeat"
|
||||
|
@ -127,27 +127,27 @@
|
|||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:src="@drawable/ic_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_shuffle"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_shuffle"
|
||||
app:iconTint="@color/sel_accented"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
android:id="@+id/playback_cover"
|
||||
style="@style/Widget.Auxio.Image.Small"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:icon="@drawable/ic_song" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_song"
|
||||
style="@style/Widget.Auxio.TextView.Primary.Compact"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_info"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_cover"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Song Name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_info"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Compact"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_cover"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_song"
|
||||
tools:text="Artist Name / Album Name" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
android:id="@+id/playback_skip_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_song"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
android:id="@+id/playback_play_pause"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_next"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/playback_progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:progress="70" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -15,9 +15,11 @@
|
|||
app:liftOnScroll="true"
|
||||
app:liftOnScrollTargetViewId="@id/detail_recycler">
|
||||
|
||||
<!-- FIXME: Not every detail view has actions -->
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/detail_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon" />
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Actions" />
|
||||
|
||||
</org.oxycblt.auxio.detail.DetailAppBarLayout>
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/home_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Toolbar.Actions"
|
||||
app:menu="@menu/menu_home"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:title="@string/info_app_name" />
|
||||
|
@ -30,6 +32,7 @@
|
|||
</org.oxycblt.auxio.ui.EdgeAppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/home_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
@ -98,7 +101,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle_all"
|
||||
android:src="@drawable/ic_shuffle_state" />
|
||||
android:src="@drawable/ic_shuffle" />
|
||||
|
||||
</org.oxycblt.auxio.home.EdgeFabContainer>
|
||||
|
||||
|
|
|
@ -43,14 +43,25 @@
|
|||
app:layout_constraintTop_toBottomOf="@+id/playback_song"
|
||||
tools:text="Artist Name / Album Name" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/Widget.Auxio.Button.Icon.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/sel_playing_state"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_next"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Medium"
|
||||
android:layout_marginEnd="@dimen/spacing_tiny"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down.Actions"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
@ -70,26 +70,26 @@
|
|||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_repeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_change_repeat"
|
||||
android:src="@drawable/ic_repeat"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/ic_repeat"
|
||||
app:iconTint="@color/sel_accented"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_prev" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_prev"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_repeat"
|
||||
|
@ -108,31 +108,27 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:src="@drawable/ic_play" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_shuffle"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_shuffle"
|
||||
app:iconTint="@color/sel_accented"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:src="@drawable/ic_shuffle_state"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/search_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Actions"
|
||||
app:menu="@menu/menu_search">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingBottom="@dimen/spacing_small"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:padding="@dimen/spacing_small"
|
||||
android:theme="@style/ThemeOverlay.Accent">
|
||||
|
||||
<ImageButton
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/accent"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/ui_accent_circle"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_check"
|
||||
app:icon="@drawable/ic_check"
|
||||
app:iconTint="?attr/colorSurface"
|
||||
tools:backgroundTint="?attr/colorPrimary"
|
||||
tools:ignore="ContentDescription, SpeakableTextPresentCheck" />
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
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:padding="0dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excluded_path"
|
||||
|
@ -25,20 +24,14 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="/storage/emulated/0/directory" />
|
||||
|
||||
<ImageButton
|
||||
<Button
|
||||
android:id="@+id/excluded_clear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:layout_marginEnd="@dimen/spacing_button_dialog"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:contentDescription="@string/desc_blacklist_delete"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:paddingBottom="@dimen/spacing_small"
|
||||
android:src="@drawable/ic_delete"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -61,19 +61,14 @@
|
|||
app:layout_constraintTop_toBottomOf="@+id/song_name"
|
||||
tools:text="Artist / Album" />
|
||||
|
||||
<ImageView
|
||||
<Button
|
||||
android:id="@+id/song_drag_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:contentDescription="@string/desc_queue_handle"
|
||||
android:focusable="true"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_handle"
|
||||
android:layout_marginEnd="@dimen/spacing_tiny"
|
||||
app:icon="@drawable/ic_handle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/song_album_cover"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/song_album_cover" />
|
||||
|
|
|
@ -16,18 +16,14 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Songs" />
|
||||
|
||||
<ImageButton
|
||||
<Button
|
||||
android:id="@+id/header_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:contentDescription="@string/lbl_sort"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:src="@drawable/ic_sort"
|
||||
android:layout_marginEnd="@dimen/spacing_tiny"
|
||||
app:icon="@drawable/ic_sort"
|
||||
app:layout_constraintBottom_toTopOf="@id/header_divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginTop="@dimen/spacing_small"
|
||||
android:layout_marginBottom="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
|
@ -28,20 +29,14 @@
|
|||
tools:ignore="RtlSymmetry,contentDescription"
|
||||
tools:text="Artist" />
|
||||
|
||||
<ImageView
|
||||
<Button
|
||||
android:id="@+id/tab_drag_handle"
|
||||
android:layout_marginEnd="@dimen/spacing_button_dialog"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/desc_tab_handle"
|
||||
android:focusable="true"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_handle"
|
||||
app:icon="@drawable/ic_handle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab_icon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tab_icon" />
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state" />
|
||||
android:src="@drawable/ic_shuffle" />
|
||||
|
||||
</android.widget.LinearLayout>
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state" />
|
||||
android:src="@drawable/ic_shuffle" />
|
||||
|
||||
</android.widget.LinearLayout>
|
||||
</android.widget.RelativeLayout>
|
||||
|
|
26
app/src/main/res/values-sw600dp/styles_ui.xml
Normal file
26
app/src/main/res/values-sw600dp/styles_ui.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Widget.Auxio.Toolbar.Actions" parent="Widget.Auxio.Toolbar.Base">
|
||||
<item name="android:layout_marginEnd">@dimen/spacing_tiny_inv</item>
|
||||
</style>
|
||||
\
|
||||
<style name="Widget.Auxio.Toolbar.Icon" parent="Widget.Auxio.Toolbar.Base">
|
||||
<item name="navigationIcon">@drawable/ic_back</item>
|
||||
<item name="android:layout_marginStart">@dimen/spacing_small_inv</item>
|
||||
</style>
|
||||
\
|
||||
<style name="Widget.Auxio.Toolbar.Icon.Actions" parent="Widget.Auxio.Toolbar.Actions">
|
||||
<item name="navigationIcon">@drawable/ic_back</item>
|
||||
<item name="android:layout_marginStart">@dimen/spacing_small_inv</item>
|
||||
</style>
|
||||
\
|
||||
<style name="Widget.Auxio.Toolbar.Icon.Down" parent="Widget.Auxio.Toolbar.Base">
|
||||
<item name="navigationIcon">@drawable/ic_down</item>
|
||||
<item name="android:layout_marginStart">@dimen/spacing_small_inv</item>
|
||||
</style>
|
||||
\
|
||||
<style name="Widget.Auxio.Toolbar.Icon.Down.Actions" parent="Widget.Auxio.Toolbar.Actions">
|
||||
<item name="navigationIcon">@drawable/ic_down</item>
|
||||
<item name="android:layout_marginStart">@dimen/spacing_small_inv</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Widget.Auxio.RecyclerView.WithAdaptiveFab" parent="">
|
||||
<item name="android:paddingBottom">@dimen/recycler_fab_space_large</item>
|
||||
</style>
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
<attr name="cornerRadius" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="StyledImageButton">
|
||||
<attr name="iconSize" format="dimension" />
|
||||
<attr name="hasIndicator" format="boolean" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="IntListPreference">
|
||||
<attr name="entries" format="reference" />
|
||||
<attr name="entryValues" format="reference" />
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
<dimen name="spacing_mid_large">24dp</dimen>
|
||||
<dimen name="spacing_large">32dp</dimen>
|
||||
|
||||
<dimen name="spacing_tiny_inv">-4dp</dimen>
|
||||
<dimen name="spacing_small_inv">-8dp</dimen>
|
||||
|
||||
<dimen name="spacing_medium_icon">6dp</dimen>
|
||||
<dimen name="spacing_button_dialog">12dp</dimen>
|
||||
|
||||
<!-- Size Namespace | Width & Heights for UI elements -->
|
||||
<dimen name="size_btn_small">48dp</dimen>
|
||||
<dimen name="size_btn_large">64dp</dimen>
|
||||
|
@ -23,7 +27,8 @@
|
|||
<dimen name="size_corners_small">8dp</dimen>
|
||||
<dimen name="size_corners_large">16dp</dimen>
|
||||
|
||||
<dimen name="size_icon_normal">24dp</dimen>
|
||||
<dimen name="size_icon_small">24dp</dimen>
|
||||
<dimen name="size_icon_medium">28dp</dimen>
|
||||
<dimen name="size_icon_large">32dp</dimen>
|
||||
|
||||
<dimen name="text_size_ext_label_larger">16sp</dimen>
|
||||
|
@ -52,4 +57,6 @@
|
|||
<dimen name="widget_height_min">110dp</dimen>
|
||||
<dimen name="widget_width_def">@dimen/widget_width_min</dimen>
|
||||
<dimen name="widget_height_def">@dimen/widget_height_min</dimen>
|
||||
|
||||
<dimen name="abc_action_bar_default_padding_start_material">4dp</dimen>
|
||||
</resources>
|
|
@ -77,4 +77,23 @@
|
|||
<item name="android:padding">@dimen/spacing_medium</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
</style>
|
||||
|
||||
<!--
|
||||
Hacks around the incorrectly-sized navigation icon in the Toolbar, changing it from
|
||||
56dp to 48dp.
|
||||
-->
|
||||
<style name="Widget.Auxio.Toolbar.Navigation" parent="@style/Widget.AppCompat.Toolbar.Button.Navigation">
|
||||
<item name="android:minWidth">@dimen/size_btn_small</item>
|
||||
</style>
|
||||
|
||||
<!--
|
||||
Hacks around the old overflow button that was deliberately downsized to 36dp
|
||||
(presumably for compat with older devices)
|
||||
-->
|
||||
<style name="Widget.Auxio.Button.Overflow" parent="@style/Widget.AppCompat.ActionButton.Overflow">
|
||||
<item name="android:minWidth">@dimen/size_btn_small</item>
|
||||
<item name="android:minHeight">@dimen/size_btn_small</item>
|
||||
<item name="android:paddingStart">0dp</item>
|
||||
<item name="android:paddingEnd">0dp</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -20,6 +20,8 @@
|
|||
<item name="android:colorBackground">?attr/colorSurface</item>
|
||||
<item name="android:windowBackground">?attr/colorSurface</item>
|
||||
<item name="android:scrollbars">none</item>
|
||||
<item name="toolbarNavigationButtonStyle">@style/Widget.Auxio.Toolbar.Navigation</item>
|
||||
<item name="actionOverflowButtonStyle">@style/Widget.Auxio.Button.Overflow</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
|
||||
|
@ -53,6 +55,7 @@
|
|||
<item name="textAppearanceBodySmall">@style/TextAppearance.Auxio.BodySmall</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!--
|
||||
Theming widgets is technically possible below Android 12, but I *really* don't care enough
|
||||
to bother with it.
|
||||
|
|
|
@ -8,20 +8,89 @@
|
|||
</style>
|
||||
|
||||
<!-- Base toolbar style -->
|
||||
<style name="Widget.Auxio.Toolbar" parent="">
|
||||
<style name="Widget.Auxio.Toolbar.Base" parent="">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
</style>
|
||||
|
||||
<!-- Toolbar sub-style with a nav icon -->
|
||||
<style name="Widget.Auxio.Toolbar.Icon" parent="Widget.Auxio.Toolbar">
|
||||
<style name="Widget.Auxio.Toolbar.Actions" parent="Widget.Auxio.Toolbar.Base">
|
||||
<!--
|
||||
Material guidelines state that there should be 16dp end padding with actions,
|
||||
but Toolbar only has 12dp. Fix that by adding a 4dp margin.
|
||||
-->
|
||||
<item name="android:layout_marginEnd">4dp</item>
|
||||
</style>
|
||||
\
|
||||
<style name="Widget.Auxio.Toolbar.Icon" parent="Widget.Auxio.Toolbar.Base">
|
||||
<item name="navigationIcon">@drawable/ic_back</item>
|
||||
</style>
|
||||
|
||||
<!-- Toolbar sub-style with a downwards nav icon -->
|
||||
<style name="Widget.Auxio.Toolbar.Icon.Down" parent="Widget.Auxio.Toolbar">
|
||||
\
|
||||
<style name="Widget.Auxio.Toolbar.Icon.Actions" parent="Widget.Auxio.Toolbar.Actions">
|
||||
<item name="navigationIcon">@drawable/ic_back</item>
|
||||
</style>
|
||||
\
|
||||
<style name="Widget.Auxio.Toolbar.Icon.Down" parent="Widget.Auxio.Toolbar.Base">
|
||||
<item name="navigationIcon">@drawable/ic_down</item>
|
||||
</style>
|
||||
\
|
||||
<style name="Widget.Auxio.Toolbar.Icon.Down.Actions" parent="Widget.Auxio.Toolbar.Actions">
|
||||
<item name="navigationIcon">@drawable/ic_down</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.Slider" parent="Widget.Material3.Slider">
|
||||
<item name="trackColorInactive">@color/sel_track</item>
|
||||
<item name="haloRadius">@dimen/spacing_medium</item>
|
||||
<item name="thumbRadius">@dimen/slider_thumb_radius</item>
|
||||
<item name="labelBehavior">gone</item>
|
||||
<item name="tickVisible">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.LinearProgressIndicator" parent="Widget.Material3.LinearProgressIndicator">
|
||||
<item name="trackColor">@color/sel_track</item>
|
||||
<item name="trackCornerRadius">@dimen/size_corners_large</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.Button.Icon.Base" parent="Widget.Material3.Button.TextButton">
|
||||
<item name="iconPadding">0dp</item>
|
||||
<item name="iconTint">?attr/colorControlNormal</item>
|
||||
<item name="rippleColor">?attr/colorControlHighlight</item>
|
||||
<item name="android:minWidth">@dimen/size_btn_small</item>
|
||||
<item name="android:minHeight">@dimen/size_btn_small</item>
|
||||
<item name="android:maxWidth">@dimen/size_btn_small</item>
|
||||
<item name="android:maxHeight">@dimen/size_btn_small</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.Button.Icon.Small" parent="Widget.Auxio.Button.Icon.Base">
|
||||
<item name="iconSize">@dimen/size_icon_small</item>
|
||||
<item name="android:insetTop">@dimen/spacing_tiny</item>
|
||||
<item name="android:insetBottom">@dimen/spacing_tiny</item>
|
||||
<item name="android:insetLeft">@dimen/spacing_tiny</item>
|
||||
<item name="android:insetRight">@dimen/spacing_tiny</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_small</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_small</item>
|
||||
<item name="android:paddingTop">@dimen/spacing_small</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_small</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.Button.Icon.Medium" parent="Widget.Auxio.Button.Icon.Small">
|
||||
<item name="iconSize">@dimen/size_icon_medium</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_medium_icon</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_medium_icon</item>
|
||||
<item name="android:paddingTop">@dimen/spacing_medium_icon</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_medium_icon</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.Button.Icon.Large" parent="Widget.Auxio.Button.Icon.Base">
|
||||
<item name="iconSize">@dimen/size_icon_large</item>
|
||||
<item name="android:insetTop">0dp</item>
|
||||
<item name="android:insetBottom">0dp</item>
|
||||
<item name="android:insetLeft">0dp</item>
|
||||
<item name="android:insetRight">0dp</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_small</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_small</item>
|
||||
<item name="android:paddingTop">@dimen/spacing_small</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_small</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.Image.Small" parent="">
|
||||
<item name="android:layout_width">@dimen/size_cover_compact</item>
|
||||
|
@ -73,19 +142,6 @@
|
|||
<item name="android:paddingBottom">@dimen/recycler_fab_space_normal</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.Slider" parent="Widget.Material3.Slider">
|
||||
<item name="trackColorInactive">@color/sel_track</item>
|
||||
<item name="haloRadius">@dimen/spacing_medium</item>
|
||||
<item name="thumbRadius">@dimen/slider_thumb_radius</item>
|
||||
<item name="labelBehavior">gone</item>
|
||||
<item name="tickVisible">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.LinearProgressIndicator" parent="Widget.Material3.LinearProgressIndicator">
|
||||
<item name="trackColor">@color/sel_track</item>
|
||||
<item name="trackCornerRadius">@dimen/size_corners_large</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeOverlay.Accent" parent="">
|
||||
<item name="colorOnPrimary">?attr/colorSurface</item>
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue