12
A
回答
12
整件事是一個單一的9貼片PNG圖像。我之前通過替換圖像修改了spinners的整個外觀。看到這個頁面:http://androiddrawableexplorer.appspot.com/
具體看btn_dropdown_normal.9,btn_dropdown_pressed.9,btn_dropdown_selected.9和btn_dropdown_disabled.9
你只需要提供自己的這些圖像的版本。
0
此外,您還可以將您的「微調欄」佈局中的FrameLayout,再加上真正的微調,但設置爲不可見:
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="32dip"
>
<Spinner
android:id="@+id/theSpinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="32dip"
android:background="@drawable/my_background"
android:padding="6dip"
android:clickable="true"
android:onClick="spinnerBarReplacementClicked"
>
<ImageView
android:id="@+id/replacementSelectImg"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/my_drawable"
/>
<TextView
android:id="@+id/replacementSelectText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="4dip"
android:layout_toLeftOf="@id/replacementSelectImg"
android:textColor="#000000"
android:textSize="14sp"
android:ellipsize="marquee"
android:singleLine="true"
/>
</RelativeLayout>
</FrameLayout>
,並通過從佈局的點擊到真正的微調
private Spinner mSpinner;
mSpinner = (Spinner) findViewById(R.id.theSpinner);
public void spinnerBarReplacementClicked(View pV){
mSpinner.performClick();
}
相關問題
- 1. 使用微調器更改佈局
- 2. Android微調器佈局
- 3. 更改設計控制器的佈局
- 4. Android:自定義微調器佈局
- 5. Android微調器自定義佈局
- 6. 的Android微調佈局
- 7. 微調器,Onitemselected,佈局
- 8. Android設計佈局
- 9. 設計佈局android
- 10. Android佈局設計
- 11. Android佈局更改
- 12. 更改設計的默認佈局
- 13. 實時更改設計佈局?
- 14. Android中的微調器設計
- 15. Android支持設計微調器
- 16. 爲android設計更好的佈局?
- 17. Android的佈局中的佈局設計
- 18. Android:所選微調器更改事件
- 19. 在android中更改微調器樣式
- 20. 更改微調器數據,android?
- 21. Mono for Android - 佈局設計器問題
- 22. 佈局在Android API微調> = 7
- 23. 在android xml佈局中的微調框
- 24. Android微調佈局......這很瘋狂?
- 25. 更改Android微調背景
- 26. 響應式網頁設計(更改調整大小的佈局)
- 27. Android XML佈局設計
- 28. 佈局設計在android
- 29. Android佈局設計師
- 30. 佈局設計幫助Android
就是這樣?非常感謝你! – LambergaR 2010-01-14 22:12:21
如何改變這從android.jar.Can你給我任何想法? 謝謝 – BIBEKRBARAL 2010-02-21 11:29:50
您的鏈接導致404錯誤。 -1 – 2012-04-23 17:19:16