Simplify layouts - [2/2]
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="true"
|
||||
android:paddingBottom="@dimen/height_bottom_adj"
|
||||
app:itemSpacing="@dimen/margin_normal"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:stackFromEnd="false"
|
||||
tools:listitem="@layout/view_download" />
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/padding_large"
|
||||
android:paddingStart="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="@drawable/divider"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/padding_large"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:showDividers="middle">
|
||||
@@ -155,12 +155,9 @@
|
||||
android:id="@+id/epoxy_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_normal"
|
||||
android:layout_marginBottom="@dimen/margin_normal"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/padding_large"
|
||||
android:paddingEnd="@dimen/padding_large"
|
||||
android:padding="@dimen/padding_medium"
|
||||
app:itemSpacing="@dimen/margin_small"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/view_screenshot" />
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="@drawable/divider"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/padding_large"
|
||||
android:paddingStart="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:showDividers="middle">
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="@drawable/divider"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/padding_large"
|
||||
android:paddingStart="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:showDividers="middle">
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
android:id="@+id/txt_permission_count"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/padding_xsmall"
|
||||
android:paddingEnd="@dimen/padding_xsmall"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Line1"
|
||||
tools:text="16 permissions" />
|
||||
</LinearLayout>
|
||||
@@ -27,7 +27,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="@drawable/divider"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/padding_large"
|
||||
android:paddingStart="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:showDividers="middle">
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="@drawable/divider"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/padding_large"
|
||||
android:paddingStart="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:showDividers="middle">
|
||||
|
||||
|
||||
@@ -22,33 +22,20 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/padding_xsmall"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/txt_title"
|
||||
style="@style/AuroraTextStyle.Subtitle.Alt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toStartOf="@id/img_action"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/padding_xsmall"
|
||||
android:background="?colorAccent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_title"
|
||||
style="@style/AuroraTextStyle.Subtitle.Alt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/padding_normal"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
tools:text="Header" />
|
||||
</LinearLayout>
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
tools:text="Header" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_action"
|
||||
@@ -56,11 +43,10 @@
|
||||
android:layout_height="@dimen/icon_size_category"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/margin_small"
|
||||
android:padding="@dimen/padding_xsmall"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:visibility="invisible"
|
||||
android:contentDescription="@string/expand"
|
||||
android:padding="@dimen/padding_xsmall"
|
||||
android:visibility="invisible"
|
||||
app:srcCompat="@drawable/ic_arrow_right"
|
||||
app:tint="?android:textColorPrimary" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -20,15 +20,14 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/padding_xsmall">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_icon"
|
||||
android:layout_width="@dimen/icon_size"
|
||||
android:layout_height="@dimen/icon_size"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginStart="@dimen/padding_xsmall"
|
||||
android:layout_marginEnd="@dimen/padding_xsmall" />
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_name"
|
||||
@@ -38,7 +37,7 @@
|
||||
android:layout_alignStart="@id/img_icon"
|
||||
android:layout_alignEnd="@id/img_icon"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:layout_marginTop="@dimen/margin_xsmall"
|
||||
android:maxLines="2"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Line2"
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="@dimen/margin_xxsmall"
|
||||
android:paddingBottom="@dimen/margin_xxsmall">
|
||||
android:padding="@dimen/padding_xxsmall">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img"
|
||||
@@ -38,7 +36,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_normal"
|
||||
android:layout_marginEnd="@dimen/margin_normal"
|
||||
android:layout_toEndOf="@id/img"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Line1"
|
||||
tools:text="Title" />
|
||||
|
||||
@@ -18,99 +18,101 @@
|
||||
-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:paddingStart="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small">
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_xsmall"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:paddingBottom="@dimen/padding_xsmall">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_download"
|
||||
android:layout_width="@dimen/icon_size_medium"
|
||||
android:layout_height="@dimen/icon_size_medium"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/margin_small"
|
||||
android:src="@drawable/bg_placeholder" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_title"
|
||||
style="@style/AuroraTextStyle.Line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_small"
|
||||
android:layout_toEndOf="@id/img_download"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="App Name" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_status"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/txt_title"
|
||||
android:layout_alignStart="@id/txt_title"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="Status" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress_download"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/txt_status"
|
||||
android:layout_alignStart="@id/txt_title"
|
||||
android:indeterminate="false"
|
||||
android:max="100"
|
||||
android:paddingTop="@dimen/padding_xxsmall"
|
||||
android:paddingBottom="@dimen/padding_xxsmall"
|
||||
app:indicatorColor="@color/colorAccent"
|
||||
app:trackColor="@android:color/darker_gray"
|
||||
app:trackCornerRadius="10dp"
|
||||
tools:progress="75" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/img_download"
|
||||
android:divider="@drawable/divider_alt"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="middle">
|
||||
android:layout_below="@id/progress_download"
|
||||
android:layout_alignStart="@id/txt_title"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_title"
|
||||
style="@style/AuroraTextStyle.Line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="App Name" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_status"
|
||||
android:id="@+id/txt_progress"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="Status" />
|
||||
tools:text="75%" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress_download"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:indeterminate="false"
|
||||
android:max="100"
|
||||
app:indicatorColor="@color/colorAccent"
|
||||
app:trackColor="@android:color/darker_gray"
|
||||
app:trackCornerRadius="10dp"
|
||||
tools:progress="75" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_eta"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="center"
|
||||
tools:text="15 sec" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_progress"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="75%" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_eta"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="center"
|
||||
tools:text="15 sec" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_speed"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewEnd"
|
||||
tools:text="1.5Mb/s" />
|
||||
</LinearLayout>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_speed"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewEnd"
|
||||
tools:text="1.5Mb/s" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -21,13 +21,14 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/padding_xsmall">
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_xsmall"
|
||||
android:paddingEnd="@dimen/padding_small">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_small"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Line1"
|
||||
|
||||
@@ -21,33 +21,24 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/padding_normal"
|
||||
android:paddingEnd="@dimen/padding_normal"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_xsmall"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:paddingBottom="@dimen/padding_xsmall">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_title"
|
||||
style="@style/AuroraTextStyle.Line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="2"
|
||||
tools:ignore="UselessParent">
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_title"
|
||||
style="@style/AuroraTextStyle.Line1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_subtitle"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textAlignment="viewEnd"
|
||||
tools:text="Subtitle" />
|
||||
</LinearLayout>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_subtitle"
|
||||
style="@style/AuroraTextStyle.Line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/txt_title"
|
||||
tools:text="Subtitle" />
|
||||
</RelativeLayout>
|
||||
@@ -24,51 +24,48 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/padding_xsmall"
|
||||
android:paddingEnd="@dimen/padding_xsmall">
|
||||
android:padding="@dimen/padding_xsmall">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img"
|
||||
android:layout_width="@dimen/icon_size_small"
|
||||
android:layout_height="@dimen/icon_size_small"
|
||||
android:layout_marginStart="@dimen/margin_xxsmall"
|
||||
android:layout_marginEnd="@dimen/margin_normal" />
|
||||
android:layout_marginEnd="@dimen/margin_small" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_review"
|
||||
android:layout_width="match_parent"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_author"
|
||||
style="@style/TextAppearance.Aurora.Line1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/img"
|
||||
android:orientation="vertical">
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
android:textSize="14sp"
|
||||
tools:text="Author Name" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_author"
|
||||
style="@style/TextAppearance.Aurora.Line1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
android:textSize="14sp"
|
||||
tools:text="Author Name" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_time"
|
||||
style="@style/TextAppearance.Aurora.Line3"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/txt_author"
|
||||
android:layout_alignStart="@id/txt_author"
|
||||
android:layout_alignEnd="@id/txt_author"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="Date" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_time"
|
||||
style="@style/TextAppearance.Aurora.Line3"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="Date" />
|
||||
|
||||
<RatingBar
|
||||
android:id="@+id/rating"
|
||||
style="@style/Widget.AppCompat.RatingBar.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:numStars="5" />
|
||||
</LinearLayout>
|
||||
<RatingBar
|
||||
android:id="@+id/rating"
|
||||
style="@style/Widget.AppCompat.RatingBar.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/txt_time"
|
||||
android:layout_alignStart="@id/txt_author"
|
||||
android:numStars="5" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_comment"
|
||||
|
||||
Reference in New Issue
Block a user