我正在使用微調控制器,它會像對話框一樣打開。我需要微調打開,如下拉菜單。微調控制器顯示如同對話框
這裏是xml文件
<Spinner
android:id="@+id/sp_countrycode_issue_coupon"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginLeft="3dp"
android:layout_weight="1"
android:background="@drawable/img_small_box_green"
android:dropDownSelector="@drawable/img_small_box_green"
android:gravity="right|center"
android:textAlignment="center" />
下面是代碼
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
this, R.array.country_code,
android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(R.layout.spinner_textview);
sp_country_code.setAdapter(adapter);
我貼我的圖片波紋管像我的觀點和微調顯示視圖。但我需要微調要像第三圖像顯示
您正在測試哪個android版本? – Nirali
目前android 4.1。但是,同樣的事情也會顯示在2.3及以下版本 –