Layout for the individual articles

We need a layout to display the information of the articles, so let's create an XML file for that in the layout folder:

Let's make it a LinearLayout with vertical orientation and some padding at the start and end:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:paddingStart="14dp"
android:paddingEnd="14dp"
android:layout_height="wrap_content">

</LinearLayout>

Inside it, we will add three text views; each of them will display some of the article's information:

<TextView
android:id="@+id/title"
android:textSize="20sp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/feed"
android:textSize="12sp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.152.58