私は三角形のドロップダウン矢印のある四角形の枠線を持つスピナーを作成する必要があります。どのようにそのようなスピナーを作成するには?私は試しましたが、私の実際の出力は期待された出力とは異なります。 ここに出力があります。どのように三角形ドロップダウン矢印の長方形のボックスでスピナーを作成するには?
は、しかし、私の出力は次のようになります。長方形のボックスで画像のドロップダウンでスピナーを作成する方法
?
ここで私が適用したコードです。
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="1dip"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Preferred contact method">
</TextView>
<Spinner
android:id="@+id/account_spinner"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginTop="2dp"
style="@style/Base.Widget.AppCompat.Spinner.Underlined"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Telephone">
</TextView>
<EditText
android:layout_width="match_parent"
android:layout_height="30dp"
android:inputType="phone"
android:ems="10"
android:background="@drawable/edittext_border"
android:id="@+id/editText" />
のEditText border.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#ffffff" />
<stroke
android:width="1dp"
android:color="#000000" />
しかし、どのように三角矢印と外側の長方形の境界線を持つスピナーを申請しますか?
ありがとうございます。
あなたは画像間のすべての空白を削除するには、これを編集することができますか? –