Hi all,
     I am new to android development and I cannot seem to get a spinner to 
work as I expect.  I was hoping to set a prompt that reads "Select a Year". 
 I can get my values to show up but my prompt doesn't ever show up.  I 
attempted to set it in both the java code and in the XML but neither seem 
to have an effect.  Below is my code.  Any help would be appreciated.

Thanks,
Craig


<?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout 
xmlns:android="http://schemas.android.com/apk/res/android";
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <Spinner
            android:id="@+id/band"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:layout_marginTop="16dp"
            android:prompt="@string/band_prompt"/>

        <Spinner
            android:id="@+id/spinner1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:layout_below="@+id/spinner1"
            android:layout_marginTop="45dp" 
            android:entries="@array/year_array"
            android:prompt="@string/year_prompt"/>

    </RelativeLayout>


    <string name="year_prompt">Select A Year</string>
    <string-array name="year_array">
        <item >2000</item>
        <item >2001</item>
        <item >2002</item>
        <item >2003</item>
        <item >2004</item>
        <item >2005</item>
    </string-array>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to