Add buttons to MediaInfoFragment (non functional)

This commit is contained in:
Jarne Demeulemeester 2021-06-24 13:59:59 +02:00
parent 2ce0755cf3
commit 009a9120e6
No known key found for this signature in database
GPG key ID: 60884A0C1EBA43E5
8 changed files with 217 additions and 2 deletions

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/neutral_100">
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="@color/neutral_700" />
<corners
android:radius="10dp" />
</shape>
</item>
</ripple>

View file

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20,6l-11,11l-5,-5"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
</vector>

View file

@ -0,0 +1,62 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M4.18,2L19.82,2A2.18,2.18 0,0 1,22 4.18L22,19.82A2.18,2.18 0,0 1,19.82 22L4.18,22A2.18,2.18 0,0 1,2 19.82L2,4.18A2.18,2.18 0,0 1,4.18 2z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M7,2L7,22"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M17,2L17,22"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M2,12L22,12"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M2,7L7,7"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M2,17L7,17"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M17,17L22,17"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M17,7L22,7"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
</vector>

View file

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20.42,4.58a5.4,5.4 0,0 0,-7.65 0l-0.77,0.78 -0.77,-0.78a5.4,5.4 0,0 0,-7.65 0C1.46,6.7 1.33,10.28 4,13l8,8 8,-8c2.67,-2.72 2.54,-6.3 0.42,-8.42z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
</vector>

View file

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M5,3l14,9l-14,9l0,-18z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
</vector>

View file

@ -0,0 +1,41 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M16,3l5,0l0,5"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M4,20L21,3"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M21,16l0,5l-5,0"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M15,15L21,21"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
<path
android:pathData="M4,4L9,9"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="@android:color/white"
android:strokeLineCap="round"/>
</vector>

View file

@ -74,6 +74,63 @@
tools:text="7.3" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:layout_marginHorizontal="24dp">
<ImageButton
android:id="@+id/play_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:background="@drawable/button_setup_background"
android:paddingHorizontal="24dp"
android:paddingVertical="12dp"
android:src="@drawable/ic_play"
android:contentDescription="@string/play_button_description" />
<ImageButton
android:id="@+id/trailer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:background="@drawable/button_accent_background"
android:padding="12dp"
android:src="@drawable/ic_film"
android:contentDescription="@string/trailer_button_description" />
<ImageButton
android:id="@+id/shuffle_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:background="@drawable/button_accent_background"
android:padding="12dp"
android:src="@drawable/ic_shuffle"
android:contentDescription="@string/shuffle_button_description" />
<ImageButton
android:id="@+id/check_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:background="@drawable/button_accent_background"
android:padding="12dp"
android:src="@drawable/ic_check"
android:contentDescription="@string/check_button_description" />
<ImageButton
android:id="@+id/favorite_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/button_accent_background"
android:padding="12dp"
android:src="@drawable/ic_heart"
android:contentDescription="@string/favorite_button_description" />
</LinearLayout>
<LinearLayout
android:id="@+id/info"
android:layout_width="match_parent"
@ -185,8 +242,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:visibility="@{viewModel.seasons != null ? View.VISIBLE : View.GONE}"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="@{viewModel.seasons != null ? View.VISIBLE : View.GONE}">
<TextView
android:layout_width="match_parent"

View file

@ -26,4 +26,9 @@
<string name="writers">Writers</string>
<string name="cast_amp_crew"><![CDATA[Cast & Crew]]></string>
<string name="seasons">Seasons</string>
<string name="play_button_description">Play the media</string>
<string name="trailer_button_description">Watch the trailer</string>
<string name="shuffle_button_description">Shuffle</string>
<string name="check_button_description">Mark as watched or unwatched</string>
<string name="favorite_button_description">Favorite</string>
</resources>