improved MediaFragment UI
* fix searchview not losing focus when media is selected
This commit is contained in:
5
app/src/main/res/drawable/shape_rounden_corner.xml
Normal file
5
app/src/main/res/drawable/shape_rounden_corner.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#B0B0B0"/>
|
||||
<corners android:radius="3dp"/>
|
||||
</shape>
|
@ -16,10 +16,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_episode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="48dp"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="72dp"
|
||||
app:srcCompat="@drawable/ic_baseline_account_box_24" />
|
||||
|
||||
<TextView
|
||||
|
@ -15,7 +15,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -40,16 +40,52 @@
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_media_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_year"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="2dp"
|
||||
android:text="@string/text_year_ex" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_age"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:background="@drawable/shape_rounden_corner"
|
||||
android:paddingStart="3dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingEnd="3dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/text_age_ex" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_episodes_or_runtime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:padding="2dp"
|
||||
android:text="@string/text_episodes_count" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_play"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:gravity="center"
|
||||
android:textAllCaps="false"
|
||||
android:text="@string/button_play"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@android:color/primary_text_dark"
|
||||
android:textSize="16sp"
|
||||
app:backgroundTint="#4A4141"
|
||||
@ -59,7 +95,7 @@
|
||||
<TextView
|
||||
android:id="@+id/text_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="12dp"
|
||||
@ -72,9 +108,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/text_overview_ex" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
<!-- media fragment -->
|
||||
<string name="button_play">Abspielen</string>
|
||||
<string name="text_episodes_count">%1$d Episoden</string>
|
||||
<string name="text_runtime">%1$d Minuten</string>
|
||||
|
||||
<!-- settings fragment -->
|
||||
<string name="account">Account</string>
|
||||
|
@ -12,6 +12,10 @@
|
||||
<string name="button_play">Play</string>
|
||||
<string name="text_title_ex" translatable="false">A Silent Voice</string>
|
||||
<string name="text_overview_ex" translatable="false">Shouya Ishida starts bullying the new girl in class …</string>
|
||||
<string name="text_year_ex" translatable="false">2016</string>
|
||||
<string name="text_age_ex" translatable="false">6</string>
|
||||
<string name="text_episodes_count">%1$d episodes</string>
|
||||
<string name="text_runtime">%1$d Minutes</string>
|
||||
|
||||
<!-- settings fragment -->
|
||||
<string name="account">Account</string>
|
||||
|
Reference in New Issue
Block a user