Spinnerxml

This section shows the complete code of the spinner.xml. Create a new XML file in your project named spinner.xml using the instructions outlined earlier in this chapter. Use the following code to model your file.

<?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" >

<Spinner android:id="@+id/testSpinner" android:layout_width="fill_parent"

android:layout_height="wrap_content"

<Button android:id="@+id/enableButton" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Set isEnabled"/>

<Button android:id="@+id/backgroundColorButton" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Change Background Color"/> </LinearLayout>

0 0

Post a comment