如何在Android上的Spinner上设置背景向下箭头上的图像

时间:2014-05-02 09:08:28

标签: android

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg03" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_margin="10dp"
        android:background="@android:color/transparent"
        android:orientation="vertical" >

        <!-- <LinearLayout -->
        <!-- android:id="@+id/layout1" -->
        <!-- android:layout_width="wrap_content" -->
        <!-- android:layout_height="wrap_content" -->
        <!-- android:orientation="horizontal" > -->


        <!-- <TextView -->
        <!-- android:id="@+id/textView1" -->
        <!-- android:layout_width="139dp" -->
        <!-- android:layout_height="match_parent" -->
        <!-- android:text="Country" -->
        <!-- android:textColor="#a9a9a9" -->
        <!-- android:textSize="50px" /> -->

        <Spinner
            android:id="@+id/spinner1"
            android:layout_width="match_parent"
            android:layout_height="44dp"
            android:background="@drawable/round_bg"
            android:spinnerMode="dropdown" />

        <!-- </LinearLayout> -->

        <LinearLayout
            android:id="@+id/layout1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:orientation="horizontal"
            android:weightSum="1" >

            <TextView
                android:id="@+id/codetextview"
                android:layout_width="105dp"
                android:layout_height="match_parent"
                android:layout_marginRight="5dp"
                android:background="@drawable/round_bg"
                android:textColor="#a9a9a9"
                android:textSize="10pt" >
            </TextView>

            <EditText
                android:id="@+id/editText2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/round_bg"
                android:ems="10"
                android:hint="Phone"
                android:inputType="phone"
                android:textColor="#a9a9a9"
                android:textSize="10pt" />
        </LinearLayout>

        <Button
            android:id="@+id/button1"
            android:layout_width="match_parent"
            android:layout_height="53dp"
            android:layout_marginBottom="8dip"
            android:layout_marginTop="10dp"
            android:background="@drawable/next"
            android:textStyle="bold" />
    </LinearLayout>

</RelativeLayout>

Thia是我的Registration.xml当前屏幕就像这个http://snag.gy/5BWnk.jpg根据给定的XML我发布我需要在微调器上设置一个向下箭头,如http://snag.gy/J1WGN.jpg请帮助我尝试但不能了解

1 个答案:

答案 0 :(得分:-1)

您可以像这样设置微调器的背景:

enter image description here