add top ten to home screen & minor fixes

* use plural for runtime and episodes
* code clean up
This commit is contained in:
2021-01-21 18:22:53 +01:00
parent c6874d0e54
commit 4c5d6e6e24
11 changed files with 101 additions and 39 deletions

View File

@ -10,7 +10,7 @@
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:background="@drawable/ic_baseline_rewind_10_24"
android:contentDescription="@string/forward_10" />
android:contentDescription="@string/rewind_10" />
<TextView
android:id="@+id/textView"

View File

@ -219,6 +219,34 @@
tools:listitem="@layout/item_media" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_top_ten"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="7dp">
<TextView
android:id="@+id/text_top_ten"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="10dp"
android:paddingTop="15dp"
android:paddingEnd="5dp"
android:paddingBottom="5dp"
android:text="@string/top_ten"
android:textSize="16sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_top_ten"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_media" />
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -11,14 +11,22 @@
<string name="new_episodes">Neue Episoden</string>
<string name="new_simulcasts">Neue Simulcasts</string>
<string name="new_titles">Neue Titel</string>
<string name="top_ten">Top 10</string>
<!-- search fragment -->
<string name="search_hint">Suche nach Filmen und Serien</string>
<!-- media fragment -->
<string name="button_play">Abspielen</string>
<string name="text_episodes_count">%1$d Episoden</string>
<plurals name="text_episodes_count">
<item quantity="one">%d Episode</item>
<item quantity="other">%d Episoden</item>
</plurals>
<string name="text_runtime">%1$d Minuten</string>
<plurals name="text_runtime">
<item quantity="one">%d Minute</item>
<item quantity="other">%d Minuten</item>
</plurals>
<string name="component_episode_title">Flg. %1$d %2$s</string>
<string name="component_episode_title_sub">Flg. %1$d %2$s (OmU)</string>

View File

@ -1,6 +0,0 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="text_margin">16dp</dimen>
</resources>

View File

@ -11,6 +11,7 @@
<string name="new_episodes">New episodes</string>
<string name="new_simulcasts">New simulcasts</string>
<string name="new_titles">New titles</string>
<string name="top_ten">Top 10</string>
<!-- search fragment -->
<string name="search_hint">Search for movies and series</string>
@ -23,8 +24,16 @@
<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_episodes_count" translatable="false">1$d episodes</string>
<plurals name="text_episodes_count">
<item quantity="one">%d episode</item>
<item quantity="other">%d episodes</item>
</plurals>
<string name="text_runtime">%1$d Minutes</string>
<plurals name="text_runtime">
<item quantity="one">%d Minute</item>
<item quantity="other">%d Minutes</item>
</plurals>
<string name="component_episode_title">Ep. %1$d %2$s</string>
<string name="component_episode_title_sub">Ep. %1$d %2$s (Sub)</string>
<string name="component_poster_desc" translatable="false">episode poster</string>

View File

@ -41,10 +41,6 @@
<item name="colorControlHighlight">@color/controlHighlightDark</item>
</style>
<style name="LicensesDialogTheme.Dark" parent="Theme.AppCompat.Dialog">
<item name="android:windowBackground">@color/themeSecondaryDark</item>
</style>
<!-- player theme -->
<style name="PlayerTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>