1
我有一個listactivity包含一個列表視圖。我想顯示另一個佈局,其中包含頂部的按鈕和此列表視圖底部的webview,並且總是顯示佈局。我試過,但這個不是我想做的事:如何在列表中顯示另一個佈局
ListView lv =getListView();
LayoutInflater inflater = getLayoutInflater();
ViewGroup header = (ViewGroup)inflater.inflate(R.layout.mylayer, lv, false);
lv.addHeaderView(header, null, false);
這說明我的佈局,但是當我滾動我的列表視圖,不用說,當我滾動我的列表視圖下它已不再是要顯示喜歡它是我的其他listview項目的一部分。