kotovalexarian
/
android
Archived
1
0
Fork 0

Improve article card layout

This commit is contained in:
Alex Kotov 2021-08-17 07:03:33 +05:00
parent de6cced59e
commit 6146013117
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 21 additions and 11 deletions

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:width="2dp" android:color="#cdcdcd"/>
</shape>

View File

@ -2,32 +2,38 @@
<LinearLayout 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:orientation="horizontal"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/article_cover"
app:srcCompat="@drawable/ic_launcher_foreground"/>
android:layout_height="wrap_content"
android:padding="10dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:background="@drawable/border"
tools:ignore="UselessParent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/article_cover"
app:srcCompat="@drawable/ic_launcher_foreground"/>
<TextView
android:id="@+id/rvitem_article_card__title_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
tools:text="Hello, World!"/>
<TextView
android:id="@+id/rvitem_article_card__summary_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a massa nulla."/>
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit."/>
</LinearLayout>