Computer scienceMobileAndroidUser InterfaceUI componentsContainers

LinearLayout in Action

Lines

Report a typo

We want a nice layout that looks like this:
Vertical list of two items with divider before first item and between them

But something is missing in its code! Fill in the missing line to make dividers looks like in the screenshot:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:divider="@drawable/divider"
    ____________________
    >

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="8dp"
        android:textAppearance="?android:textAppearanceLarge"
        android:text="Thing #1" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="8dp"
        android:textAppearance="?android:textAppearanceLarge"
        android:text="Thing #2" />

</LinearLayout>


Enter a short text
___

Create a free account to access the full topic