ui: increase seekbar height
Make the seekbar more touchable by increasing it's height. This should have no measurable impact since I did some layout black magic and made the rest of the layout slightly inset into the SeekBar's bounds. This is not a nice solution. Hopefully I'll be able to make a dedicated view with a Seeker with the same insetting things later on.
This commit is contained in:
parent
68b8ff0798
commit
a820724ff2
7 changed files with 39 additions and 25 deletions
|
@ -4,7 +4,7 @@
|
|||
<item>
|
||||
<shape android:shape="rectangle"
|
||||
android:tint="@color/sel_accented">
|
||||
<corners android:radius="@dimen/spacing_small" />
|
||||
<corners android:radius="@dimen/spacing_mid_large" />
|
||||
<solid android:color="@android:color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_toolbar"
|
||||
app:layout_constraintVertical_chainStyle="packed">
|
||||
|
@ -83,6 +83,7 @@
|
|||
android:text="@{song.album.artist.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_song_container"
|
||||
tools:text="Artist Name" />
|
||||
|
@ -98,6 +99,7 @@
|
|||
android:text="@{song.album.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_artist"
|
||||
tools:text="Album Name" />
|
||||
|
@ -107,9 +109,11 @@
|
|||
style="@style/Widget.Auxio.SeekBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_duration_current"
|
||||
android:paddingStart="@dimen/spacing_mid_large"
|
||||
android:paddingEnd="@dimen/spacing_mid_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_album"
|
||||
tools:progress="70" />
|
||||
|
@ -121,7 +125,7 @@
|
|||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:text="@{playbackModel.formattedPosition}"
|
||||
android:textColor="@color/sel_accented_secondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:text="11:38" />
|
||||
|
@ -132,6 +136,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:text="@{song.formattedDuration}"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:text="16:16" />
|
||||
|
@ -176,8 +181,9 @@
|
|||
android:src="@drawable/sel_playing_state"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_duration_current"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_duration_current"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:src="@drawable/ic_pause" />
|
||||
|
||||
<ImageButton
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_toolbar"
|
||||
app:layout_constraintVertical_chainStyle="packed">
|
||||
|
@ -84,6 +85,7 @@
|
|||
android:text="@{song.album.artist.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_song_container"
|
||||
tools:text="Artist Name" />
|
||||
|
@ -99,6 +101,7 @@
|
|||
android:text="@{song.album.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_artist"
|
||||
tools:text="Album Name" />
|
||||
|
@ -108,9 +111,11 @@
|
|||
style="@style/Widget.Auxio.SeekBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_duration_current"
|
||||
android:paddingStart="@dimen/spacing_mid_large"
|
||||
android:paddingEnd="@dimen/spacing_mid_large"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_album"
|
||||
tools:progress="70" />
|
||||
|
@ -122,17 +127,18 @@
|
|||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:text="@{playbackModel.formattedPosition}"
|
||||
android:textColor="@color/sel_accented_secondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:text="11:38" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_song_container_duration"
|
||||
android:id="@+id/playback_song_duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:text="@{song.formattedDuration}"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:text="16:16" />
|
||||
|
@ -176,9 +182,10 @@
|
|||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_container_duration"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_duration_current"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_duration_current"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:src="@drawable/ic_pause" />
|
||||
|
||||
<ImageButton
|
||||
|
@ -208,5 +215,6 @@
|
|||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
app:tint="@color/sel_accented" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
|
@ -96,9 +96,10 @@
|
|||
style="@style/Widget.Auxio.SeekBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:paddingStart="@dimen/spacing_mid_huge"
|
||||
android:paddingEnd="@dimen/spacing_mid_huge"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_duration_current"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:progress="70" />
|
||||
|
@ -108,7 +109,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_mid_huge"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:layout_marginBottom="@dimen/spacing_small"
|
||||
android:text="@{playbackModel.formattedPosition}"
|
||||
android:textColor="@color/sel_accented_secondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
|
@ -120,7 +121,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_huge"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:text="@{song.formattedDuration}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -82,7 +82,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album)}"
|
||||
android:text="@{song.album.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
||||
|
@ -95,7 +94,10 @@
|
|||
style="@style/Widget.Auxio.SeekBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_duration_current"
|
||||
android:paddingStart="@dimen/spacing_mid_large"
|
||||
android:paddingEnd="@dimen/spacing_mid_large"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:progress="70" />
|
||||
|
@ -104,8 +106,8 @@
|
|||
android:id="@+id/playback_duration_current"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:text="@{playbackModel.formattedPosition}"
|
||||
android:textColor="@color/sel_accented_secondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
|
@ -117,7 +119,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@{song.formattedDuration}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -154,13 +156,12 @@
|
|||
style="@style/Widget.Auxio.Button.Circular"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_duration_current"
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<style name="Widget.Auxio.Button.AppWidget" parent="Widget.Auxio.Button.AppWidget.V31">
|
||||
<item name="android:minHeight">@dimen/size_btn_small</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
<item name="android:padding">@dimen/spacing_small</item>
|
||||
<item name="android:padding">10dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Widget panel -->
|
||||
|
|
|
@ -36,14 +36,13 @@
|
|||
<style name="Widget.Auxio.SeekBar" parent="Widget.AppCompat.SeekBar">
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_mid_large</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_mid_large</item>
|
||||
<item name="android:progressBackgroundTint">?attr/colorAccent</item>
|
||||
<item name="android:progressTint">?attr/colorAccent</item>
|
||||
<item name="android:splitTrack">false</item>
|
||||
<item name="android:thumbOffset">@dimen/offset_thumb</item>
|
||||
<item name="android:thumbTint">?attr/colorAccent</item>
|
||||
<item name="android:enabled">true</item>
|
||||
<item name="android:minHeight">@dimen/size_btn_small</item>
|
||||
<item name="android:theme">@style/ThemeOverlay.SeekbarHalo</item>
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in a new issue