当前位置: 代码迷 >> Android >> spinner不弹出列表解决办法
  详细解决方案

spinner不弹出列表解决办法

热度:103   发布时间:2016-04-28 04:52:17.0
spinner不弹出列表
条件:HTC t328w android 4.0.3
效果:无法上传图片
布局:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

         <TextView
             android:id="@+id/tvline"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/tvNameLine"
             android:textColor="#000000" />
   
            <Spinner
                android:id="@+id/spTravel"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:prompt="@string/titleLine"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="#000000" />
        
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

         <TextView
             android:id="@+id/tvtype"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/tvCarType"
             android:textColor="#000000" />
   
            <Spinner
                android:id="@+id/spCarType"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />        
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >            

    <TextView
        android:id="@+id/car"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/tvNameCar"
        android:textColor="#000000" />

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >

    <EditText
        android:id="@+id/editCar"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:ems="10"
        android:hint="@string/hintCar"
        android:inputType="text"
        android:textColor="#000000" >

        <!-- <requestFocus />  -->
    </EditText>
</LinearLayout>
</LinearLayout>
</LinearLayout>
代码:
public class FillSpinner  extends Activity
{
public SQLiteDatabase tripDB;
  相关解决方案