2012-08-10 118 views
0

enter image description here滾動視圖和擴展列表視圖

我在那裏的項目工作的看法一樣約前五視圖靜態及以下,我有擴展列表(即9:00-10:30)如果點擊上我會打開插槽我可以默認滾動可擴展列表來查看插槽,但我的設備有非常少的空間滾動。由於整個屏幕不滾動,我保持滾動整個佈局。幫助任何一個。我做了很多場景,但我沒有得到這個。如果想滾動整個視圖,我應該做什麼。可以從這個幫助任何人。預先感謝。

回答

0
you take that time in spinner , so that you can see the entire view 
+0

09:00-10:30是可擴張的列表視圖。 – Sri 2012-08-10 10:28:34

0

當你的第一個5次都是靜態的,你可以使用ListViewaddHeaderView方法在列表視圖頂部添加所有靜態視圖。 查看this for addHeaderView。希望這可以幫助。

編輯:添加報頭以ListView的

LayoutInflater layoutInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); 

View view = layoutInflater.inflate(R.layout.xml_file, null); 
listview.addHeaderView(view); 

listview.setAdapter(adapter); 
+0

如何添加5個靜態視圖到列表視圖 – Sri 2012-08-14 11:21:28

+0

您是否已經通過該鏈接?如果你沒有,請通過該鏈接。它關於ListView的頁眉和頁腳視圖。 – Braj 2012-08-14 11:24:35

+0

我經歷了那一次,但我越來越classCast Excepiton我加入像expandableListView.addHeaderView(edtContactNo); \t \t expandableListView.addHeaderView(tV_existingPatient); – Sri 2012-08-14 11:49:35