Skip to content

Commit

Permalink
add playlist icons to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
tsynik committed Jun 8, 2024
1 parent 1ed5e8a commit 2927f54
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/ic_outline_playlist_play.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
android:viewportHeight="24"
android:tint="?attr/colorPrimary"
android:autoMirrored="true">
<group
android:scaleX="1.1"
android:scaleY="1.1"
android:pivotX="4"
android:pivotY="0">
<path
android:fillColor="@android:color/white"
android:pathData="M3,10h11v2h-11z"/>
Expand All @@ -17,4 +22,5 @@
<path
android:fillColor="@android:color/white"
android:pathData="M16,13l0,8l6,-4z"/>
</group>
</vector>
27 changes: 23 additions & 4 deletions app/src/main/res/layout/torrent_file_fragment.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand All @@ -15,7 +16,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal">

<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/btnPlaylist"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
Expand All @@ -25,9 +26,18 @@
android:layout_marginEnd="3dp"
android:layout_marginRight="3dp"
android:layout_weight="1"
android:text="@string/playlist_all" />
android:maxLines="1"
android:text="@string/playlist_all"
app:icon="@drawable/ic_outline_playlist_play"
app:iconGravity="textStart"
app:iconPadding="3dp"
app:iconSize="22dp"
app:iconTint="?attr/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/btnPlaylistContinue"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
Expand All @@ -37,7 +47,16 @@
android:layout_marginEnd="6dp"
android:layout_marginRight="6dp"
android:layout_weight="1"
android:text="@string/playlist_continue" />
android:maxLines="1"
android:text="@string/playlist_continue"
app:icon="@drawable/ic_outline_playlist_play"
app:iconGravity="textStart"
app:iconPadding="3dp"
app:iconSize="22dp"
app:iconTint="?attr/colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</LinearLayout>

Expand Down

0 comments on commit 2927f54

Please sign in to comment.