Optimize layout
parent
7f5ef227eb
commit
6f7efa9e26
@ -1,15 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/list_footer_height"
|
android:layout_height="@dimen/list_footer_height_outer">
|
||||||
android:padding="6dp">
|
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:indeterminate="true" />
|
android:indeterminate="true"
|
||||||
|
app:indicatorSize="@dimen/list_footer_height_inner" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
@ -1,50 +1,41 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/list_selector">
|
android:background="@drawable/list_selector"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/card"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
app:cardCornerRadius="4dp"
|
||||||
|
app:cardElevation="4dp">
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||||
android:id="@+id/card"
|
android:id="@+id/imageView_cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="4dp"
|
android:scaleType="centerCrop"
|
||||||
app:cardCornerRadius="4dp"
|
android:orientation="horizontal"
|
||||||
app:cardElevation="4dp"
|
tools:ignore="ContentDescription" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
</com.google.android.material.card.MaterialCardView>
|
||||||
android:id="@+id/imageView_cover"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
<TextView
|
||||||
|
android:id="@+id/textView_title"
|
||||||
<TextView
|
style="@style/TextAppearance.AppCompat.Body2"
|
||||||
android:id="@+id/textView_title"
|
android:layout_width="match_parent"
|
||||||
style="@style/TextAppearance.AppCompat.Body1"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:ellipsize="end"
|
||||||
android:layout_height="wrap_content"
|
android:lineSpacingExtra="-2dp"
|
||||||
android:ellipsize="end"
|
android:maxLines="2"
|
||||||
android:lineSpacingExtra="-2dp"
|
android:padding="4dp"
|
||||||
android:maxLines="2"
|
android:elegantTextHeight="false"
|
||||||
android:padding="4dp"
|
tools:text="Sample name" />
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/card"
|
|
||||||
tools:text="Sample name" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</FrameLayout>
|
</LinearLayout>
|
||||||
@ -1,40 +1,43 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/navigation_header"
|
android:id="@+id/navigation_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
<ImageView
|
||||||
|
android:id="@+id/imageView_logo"
|
||||||
|
android:layout_width="@dimen/nav_header_logo_size"
|
||||||
|
android:layout_height="@dimen/nav_header_logo_size"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginStart="@dimen/margin_normal"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:contentDescription="@string/app_name"
|
||||||
|
android:src="@drawable/ic_totoro" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:layout_alignTop="@id/imageView_logo"
|
||||||
android:orientation="horizontal">
|
android:layout_alignBottom="@id/imageView_logo"
|
||||||
|
android:layout_marginStart="@dimen/nav_item_horizontal_padding"
|
||||||
<ImageView
|
android:layout_toEndOf="@id/imageView_logo"
|
||||||
android:layout_width="@dimen/nav_header_logo_size"
|
android:gravity="center_vertical"
|
||||||
android:layout_height="@dimen/nav_header_logo_size"
|
android:singleLine="true"
|
||||||
android:layout_marginStart="@dimen/margin_normal"
|
android:text="@string/app_name"
|
||||||
android:layout_marginTop="24dp"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_totoro" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/nav_item_horizontal_padding"
|
|
||||||
android:text="@string/app_name"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divider"
|
android:id="@+id/divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
|
android:layout_below="@id/imageView_logo"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
android:background="?android:attr/listDivider" />
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
Loading…
Reference in New Issue