2011-02-08 145 views
4

如何做一個自定義主題android微調對話框?Android的自定義微調對話框

+0

請參閱:http://developer.android.com/resources/tutorials/views/hello-spinner.html。這是Google搜索「Android Spinner Example」的第一場比賽。 – 2011-02-08 15:26:42

回答

2

這個博客有可能涵蓋你的問題的例子:

http://www.mokasocial.com/2011/03/easily-create-a-default-custom-styled-spinner-android/


編輯:

這些博客文章有一個非常類似的答案: http://karanbalkar.com/2013/07/tutorial-39-create-custom-spinner-in-android/ http://stephenpengilley.blogspot.no/2013/01/android-custom-spinner-tutorial.html

定製Android微調器的關鍵是爲微調器行創建自定義資源,然後將該行佈局傳遞到自定義適配器中。在自定義適配器中,可以覆蓋以下兩個功能:

@Override 
public View getDropDownView(int position, View cnvtView, ViewGroup prnt) { 
    // Custom view generation  
} 


@Override 
public View getView(int pos, View cnvtView, ViewGroup prnt) { 
    // Custom view generation 
} 

確定Android微調器如何顯示給用戶。

+0

該鏈接已過期:( – bendaf 2016-02-05 08:09:20