This commit is contained in:
Bram van de Kerkhof 2016-05-12 14:28:44 +02:00 committed by inorichi
parent a6df745daa
commit 0ad9e4af0b
2 changed files with 30 additions and 10 deletions

View File

@ -28,6 +28,9 @@ class DownloadHolder(private val view: View) : RecyclerView.ViewHolder(view) {
// Update the chapter name. // Update the chapter name.
view.download_title.text = download.chapter.name view.download_title.text = download.chapter.name
// Update the manga title
view.manga_title.text = download.manga.title
// Update the progress bar and the number of downloaded pages // Update the progress bar and the number of downloaded pages
if (download.pages == null) { if (download.pages == null) {
view.download_progress.progress = 0 view.download_progress.progress = 0

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"> android:layout_marginRight="15dp"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -11,10 +12,24 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/download_title"/> android:orientation="vertical">
<TextView
android:id="@+id/manga_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Manga Title"
android:textAppearance="@style/TextAppearance.Regular.Body1"/>
<TextView
android:id="@+id/download_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Chapter Title"
android:textAppearance="@style/TextAppearance.Regular.Caption"/>
</LinearLayout>
<View <View
android:layout_width="0dp" android:layout_width="0dp"
@ -22,17 +37,19 @@
android:layout_weight="1" /> android:layout_weight="1" />
<TextView <TextView
android:id="@+id/download_progress_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/download_progress_text" android:layout_gravity="start"
android:layout_gravity="start" /> android:textAppearance="@style/TextAppearance.Regular.Caption.Hint"
android:text="(0/10)"/>
</LinearLayout> </LinearLayout>
<ProgressBar <ProgressBar
android:id="@+id/download_progress"
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"/>
android:id="@+id/download_progress" />
</LinearLayout> </LinearLayout>