ui: update bar styles
Update the styles of LinearProgressIndicator and Slider to be similar across the entirety of the app.
This commit is contained in:
parent
6f625da125
commit
a56d5849db
9 changed files with 23 additions and 21 deletions
|
@ -7,6 +7,7 @@
|
|||
- Added toggle for edge-to-edge mode [#149]
|
||||
|
||||
#### What's Improved
|
||||
- The toolbar in the home UI now collapses when scrolling
|
||||
- Genre parsing now handles multiple integer values and cover/remix indicators (May wipe playback state)
|
||||
|
||||
#### Dev/Meta
|
||||
|
|
|
@ -26,7 +26,6 @@ import androidx.fragment.app.activityViewModels
|
|||
import androidx.navigation.findNavController
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import org.oxycblt.auxio.databinding.FragmentMainBinding
|
||||
import org.oxycblt.auxio.music.IndexerViewModel
|
||||
import org.oxycblt.auxio.music.Music
|
||||
import org.oxycblt.auxio.music.Song
|
||||
import org.oxycblt.auxio.playback.PlaybackViewModel
|
||||
|
@ -43,7 +42,6 @@ import org.oxycblt.auxio.util.launch
|
|||
class MainFragment : ViewBindingFragment<FragmentMainBinding>() {
|
||||
private val playbackModel: PlaybackViewModel by activityViewModels()
|
||||
private val navModel: NavigationViewModel by activityViewModels()
|
||||
private val musicModel: IndexerViewModel by activityViewModels()
|
||||
private var callback: DynamicBackPressedCallback? = null
|
||||
|
||||
override fun onCreateBinding(inflater: LayoutInflater) = FragmentMainBinding.inflate(inflater)
|
||||
|
|
|
@ -89,10 +89,11 @@
|
|||
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"
|
||||
app:trackColor="@color/sel_track"
|
||||
tools:progress="70" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -87,10 +87,11 @@
|
|||
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"
|
||||
app:trackColor="@color/sel_track"
|
||||
tools:progress="70" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -28,14 +28,9 @@
|
|||
android:stepSize="0.1"
|
||||
android:valueFrom="-15.0"
|
||||
android:valueTo="15.0"
|
||||
app:haloRadius="@dimen/slider_halo_radius"
|
||||
app:labelBehavior="gone"
|
||||
app:layout_constraintEnd_toStartOf="@+id/with_tags_ticker"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/with_tags_header"
|
||||
app:thumbRadius="@dimen/slider_thumb_radius"
|
||||
app:tickVisible="false"
|
||||
app:trackColorInactive="@color/sel_track"
|
||||
tools:value="0.0" />
|
||||
|
||||
<TextView
|
||||
|
@ -70,14 +65,9 @@
|
|||
android:stepSize="0.1"
|
||||
android:valueFrom="-15.0"
|
||||
android:valueTo="15.0"
|
||||
app:haloRadius="@dimen/slider_halo_radius"
|
||||
app:labelBehavior="gone"
|
||||
app:layout_constraintEnd_toStartOf="@+id/without_tags_ticker"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/without_tags_header"
|
||||
app:thumbRadius="@dimen/slider_thumb_radius"
|
||||
app:tickVisible="false"
|
||||
app:trackColorInactive="@color/sel_track"
|
||||
tools:value="0.0" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -59,10 +59,11 @@
|
|||
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"
|
||||
app:trackColor="@color/sel_track"
|
||||
tools:progress="70" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -12,15 +12,10 @@
|
|||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1"
|
||||
app:haloRadius="@dimen/slider_halo_radius"
|
||||
app:labelBehavior="gone"
|
||||
app:labelStyle="@style/TextAppearance.Auxio.BodySmall"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:thumbRadius="@dimen/slider_thumb_radius"
|
||||
app:trackColorInactive="@color/sel_track" />
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/seek_bar_position"
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
<!-- Material configuration -->
|
||||
<item name="materialAlertDialogTheme">@style/Theme.Auxio.Dialog</item>
|
||||
<item name="sliderStyle">@style/Widget.Auxio.Slider</item>
|
||||
<item name="linearProgressIndicatorStyle">@style/Widget.Auxio.LinearProgressIndicator</item>
|
||||
|
||||
<item name="textAppearanceDisplayLarge">@style/TextAppearance.Auxio.DisplayLarge</item>
|
||||
<item name="textAppearanceDisplayMedium">@style/TextAppearance.Auxio.DisplayMedium</item>
|
||||
|
|
|
@ -73,6 +73,19 @@
|
|||
<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