Details activity improvements

This commit is contained in:
Koitharu
2024-12-11 12:47:18 +02:00
parent ee10b013a1
commit 146ba95af6
12 changed files with 100 additions and 137 deletions

View File

@@ -92,18 +92,21 @@
android:layout_height="wrap_content" />
<TextView
android:id="@+id/textView_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/margin_normal"
android:layout_marginTop="@dimen/margin_small"
android:drawablePadding="@dimen/margin_small"
android:paddingHorizontal="@dimen/margin_normal"
android:paddingVertical="@dimen/margin_small"
android:text="@string/chapter_selection_hint"
android:textAppearance="?attr/textAppearanceBodySmall" />
android:textAppearance="?attr/textAppearanceBodySmall"
app:drawableStartCompat="@drawable/ic_tap" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_start"
android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall"
android:layout_marginTop="@dimen/margin_normal"
android:layout_marginTop="@dimen/margin_small"
android:checked="true"
android:drawablePadding="?android:listPreferredItemPaddingStart"
android:ellipsize="end"

View File

@@ -75,6 +75,32 @@
app:layout_constraintStart_toEndOf="@id/barrier_table"
tools:text="Author name" />
<TextView
android:id="@+id/textView_translation_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="8dp"
android:singleLine="true"
android:text="@string/translation"
android:textAppearance="?textAppearanceTitleSmall"
app:layout_constraintStart_toStartOf="@id/card_details"
app:layout_constraintTop_toBottomOf="@id/textView_author_label" />
<TextView
android:id="@+id/textView_translation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_normal"
android:layout_marginEnd="@dimen/margin_normal"
android:singleLine="true"
android:textAppearance="?textAppearanceBodyMedium"
app:layout_constraintBaseline_toBaselineOf="@id/textView_translation_label"
app:layout_constraintEnd_toEndOf="@id/card_details"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/barrier_table"
tools:text="English" />
<TextView
android:id="@+id/textView_rating_label"
android:layout_width="wrap_content"
@@ -85,7 +111,7 @@
android:text="@string/rating"
android:textAppearance="?textAppearanceTitleSmall"
app:layout_constraintStart_toStartOf="@id/card_details"
app:layout_constraintTop_toBottomOf="@id/textView_author_label" />
app:layout_constraintTop_toBottomOf="@id/textView_translation_label" />
<RatingBar
android:id="@+id/ratingBar_rating"
@@ -230,6 +256,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
app:barrierDirection="end"
app:constraint_referenced_ids="textView_source_label,textView_author_label,textView_rating_label,textView_state_label,textView_progress_label,textView_chapters_label,textView_local_label" />
app:constraint_referenced_ids="textView_source_label,textView_author_label,textView_rating_label,textView_state_label,textView_progress_label,textView_chapters_label,textView_local_label,textView_translation_label" />
</merge>

View File

@@ -12,4 +12,9 @@
android:icon="@drawable/ic_delete"
android:title="@string/remove_from_history" />
<item
android:id="@+id/action_download"
android:icon="@drawable/ic_download"
android:title="@string/download" />
</menu>

View File

@@ -772,4 +772,6 @@
<string name="author">Author</string>
<string name="rating">Rating</string>
<string name="source">Source</string>
<string name="translation">Translation</string>
<string name="chapters_time_pattern" translatable="false">%1$s (%2$s)</string>
</resources>