The previous approach was to list buttons in a TableLayout. However, this approach does not work well if there are more items than can fit on the screen. To allow scrolling of items, and also a better presentation of said items, use a ListView.
41 lines
1.4 KiB
XML
41 lines
1.4 KiB
XML
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:id="@+id/LinearLayout1"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
|
android:paddingTop="@dimen/activity_vertical_margin"
|
|
tools:context="protect.babymonitor.MonitorActivity" >
|
|
|
|
<TextView
|
|
android:id="@+id/parentDeviceTitle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:text="@string/parentDevice"
|
|
android:textSize="25sp" />
|
|
|
|
<Space
|
|
android:layout_width="match_parent"
|
|
android:layout_height="15dip" />
|
|
|
|
<TextView
|
|
android:id="@+id/selectChildDeviceTitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/selectChildDevice"
|
|
android:textSize="20sp" />
|
|
|
|
<ListView
|
|
android:id="@+id/ServiceTable"
|
|
android:scrollbars="vertical"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="0.32"
|
|
android:padding="10dp" >
|
|
</ListView>
|
|
|
|
</LinearLayout> |