2012-05-02 61 views

回答

0

必須創建XML佈局讓所謂行的.xml包含列表組件,

那麼你會吹氣行佈局,

後,可以在裏面對話從XML佈局你想改變列表的高度。

你可以試試這個:

Dialog dialog = new Dialog(context); LayoutInflater inflater = 
    context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
    View v = inflater.inflate 
    (R.layout.row, null, false); dialog .setContentView(v); 
    dialog .show(); 

那麼你的XML佈局:

<TexView 
    android:id="@+id/YOUR LIST" 
    android:layout_width="fill_parent" 
    android:layout_height="your height" > 
    </TextView> 

希望這有助於

+0

@ user1301568 檢查更新答案請 –

+0

劑量這個減少列表項?它似乎可以減少列表視圖。在我嘗試之前,我想知道。 – user1301568

+0

@ user1301568試試吧,任何堆棧回覆我 –