mirror of
https://github.com/readrops/Readrops.git
synced 2025-02-10 17:00:50 +01:00
Improving item layout
This commit is contained in:
parent
be1c7ff01f
commit
79e8146758
@ -3,66 +3,61 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="?android:attr/selectableItemBackground">
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:padding="6dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/item_title"
|
android:id="@+id/item_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:text="test title for this textview which is 2 maximum lines"
|
tools:text="test title for this textview which is 2 maximum lines"
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="6dp"
|
||||||
android:minLines="1"
|
android:minLines="1"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_toLeftOf="@id/item_image"
|
android:layout_toLeftOf="@id/item_image"
|
||||||
android:layout_toStartOf="@id/item_image"
|
android:layout_toStartOf="@id/item_image"
|
||||||
android:ellipsize="end"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/item_description"
|
android:id="@+id/item_description"
|
||||||
|
style="@style/TextAppearance.AppCompat.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/item_title"
|
android:layout_below="@id/item_title"
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_toLeftOf="@id/item_image"
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
android:layout_toStartOf="@id/item_image"
|
android:layout_toStartOf="@id/item_image"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_toLeftOf="@id/item_image"
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:minLines="1"
|
|
||||||
android:maxLines="3"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
style="@style/TextAppearance.AppCompat.Small"/>
|
android:maxLines="3"
|
||||||
|
android:minLines="1" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_image"
|
android:id="@+id/item_image"
|
||||||
android:layout_width="150dp"
|
android:layout_width="150dp"
|
||||||
android:layout_height="90dp"
|
android:layout_height="92dp"
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginBottom="12dp"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/layout_end"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/item_image"
|
||||||
|
android:layout_marginTop="12dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_feed_icon"
|
android:id="@+id/item_feed_icon"
|
||||||
android:layout_width="25dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="20dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_below="@id/item_description"
|
|
||||||
android:src="@drawable/ic_rss_feed"
|
android:src="@drawable/ic_rss_feed"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -70,12 +65,9 @@
|
|||||||
android:id="@+id/item_feed_title"
|
android:id="@+id/item_feed_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/item_description"
|
|
||||||
android:layout_toRightOf="@id/item_feed_icon"
|
android:layout_toRightOf="@id/item_feed_icon"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
tools:text="Numerama"/>
|
tools:text="Numerama"/>
|
||||||
|
|
||||||
@ -83,11 +75,11 @@
|
|||||||
android:id="@+id/item_date"
|
android:id="@+id/item_date"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/item_image"
|
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
tools:text="January 10 2019"
|
tools:text="January 10 2019"
|
||||||
/>
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
x
Reference in New Issue
Block a user