Creating an XML interface and ListView
Our starting point is the main.xml
sheet; this is where we will be creating the ListView
:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/listView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="10dp" android:layout_marginTop="5dp" android:background="@android:color/transparent" android:cacheColorHint="@android:color/transparent" android:divider="#CCCCCC" android:dividerHeight="1dp" android:paddingLeft="2dp" /> </LinearLayout>
Tip
The main.xml
file should already be ...
Get Xamarin Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.