pick gallery_detail_header.xml changes to television (#131)
* Rewrite info TableLayout to ConstraintLayout for television * Rewrite layout and minor design improve for television
This commit is contained in:
1 parent
0093db9986
commit
513886eff4
1 file changed
+70
-55
@@ -73,16 +73,18 @@
|
|||||||
app:fitsSystemWindowsInsets="top">
|
app:fitsSystemWindowsInsets="top">
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/header_content"
|
android:id="@+id/header_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/thumb_card"
|
android:id="@+id/thumb_card"
|
||||||
style="@style/Widget.Material3.CardView.Elevated"
|
style="@style/Widget.Material3.CardView.Filled"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<com.hippo.widget.LoadImageView
|
<com.hippo.widget.LoadImageView
|
||||||
android:id="@+id/thumb"
|
android:id="@+id/thumb"
|
||||||
@@ -96,70 +98,83 @@
|
|||||||
style="@style/Widget.Material3.CardView.Filled"
|
style="@style/Widget.Material3.CardView.Filled"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginEnd="@dimen/keyline_margin"
|
android:layout_marginEnd="@dimen/keyline_margin"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:nextFocusRight="@+id/read"
|
android:nextFocusRight="@+id/read"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<TableLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
<TableRow>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/language"
|
android:id="@+id/language"
|
||||||
android:layout_width="wrap_content"
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:singleLine="true" />
|
android:singleLine="true"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/size"
|
android:id="@+id/size"
|
||||||
android:layout_width="wrap_content"
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="right"
|
android:layout_marginStart="16dp"
|
||||||
android:singleLine="true" />
|
android:gravity="right"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintBaseline_toBaselineOf="@id/language"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/language" />
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow android:paddingTop="8dp">
|
<TextView
|
||||||
|
android:id="@+id/favoredTimes"
|
||||||
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/language" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/favoredTimes"
|
android:id="@+id/pages"
|
||||||
android:layout_width="wrap_content"
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="left"
|
android:layout_marginStart="16dp"
|
||||||
android:singleLine="true" />
|
android:gravity="right"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintBaseline_toBaselineOf="@id/favoredTimes"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/favoredTimes" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/pages"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="right"
|
|
||||||
android:singleLine="true" />
|
|
||||||
|
|
||||||
</TableRow>
|
<TextView
|
||||||
|
android:id="@+id/posted"
|
||||||
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/favoredTimes" />
|
||||||
|
|
||||||
<TableRow android:paddingTop="8dp">
|
|
||||||
|
|
||||||
<TextView
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:id="@+id/posted"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="left"
|
|
||||||
android:singleLine="true" />
|
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
</TableLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
@@ -168,8 +183,6 @@
|
|||||||
style="@style/Widget.Material3.Chip.Assist"
|
style="@style/Widget.Material3.Chip.Assist"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignBottom="@id/thumb_card"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginEnd="@dimen/keyline_margin"
|
android:layout_marginEnd="@dimen/keyline_margin"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:nextFocusRight="@+id/read"
|
android:nextFocusRight="@+id/read"
|
||||||
@@ -177,24 +190,26 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
app:chipIcon="@drawable/file_upload_black_24dp"
|
app:chipIcon="@drawable/file_upload_black_24dp"
|
||||||
app:ensureMinTouchTargetSize="true" />
|
app:ensureMinTouchTargetSize="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/thumb_card"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
android:id="@+id/category"
|
android:id="@+id/category"
|
||||||
style="@style/Widget.Material3.Chip.Assist"
|
style="@style/Widget.Material3.Chip.Assist"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@id/uploader"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginEnd="@dimen/keyline_margin"
|
android:layout_marginEnd="@dimen/keyline_margin"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
|
android:nextFocusRight="@+id/read"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
app:chipIcon="@drawable/ic_baseline_label_24"
|
app:chipIcon="@drawable/ic_baseline_label_24"
|
||||||
app:ensureMinTouchTargetSize="true"
|
app:ensureMinTouchTargetSize="true"
|
||||||
android:nextFocusRight="@+id/read" />
|
app:layout_constraintBottom_toTopOf="@id/uploader"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user