2012-05-02 56 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试试吧,任何堆栈回复我 –