我在我的項目中使用了StickyListHeaders庫。我在應用程序中添加了節標題,它也起作用。但是對於某些情況,我想隱藏節標題。 我如何做到這一點請指導我。 謝謝。在StickyListHeaders中隱藏節標題
0
A
回答
0
in getHeaderView - set HeaderView.Visibility(View.GONE);
0
我有同樣的問題。 header.setVisibility(View.GONE)不起作用。
解決辦法是:
佈局頭視圖必須與layout_height = 「WRAP_CONTENT」
,然後,此佈局的內容,可以setVisibility(View.GONE)
0
我用相同適配器兩個佈局
佈局與頭
<se.emilsjolander.stickylistheaders.StickyListHeadersListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white" />
佈局而不頭
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/listview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
onCreateView:上任務結果
if (needHeader) {
mainView = inflater.inflate(R.layout.ly_list_with_header, null);
stickyListHeadersListView = (StickyListHeadersListView) mainView.findViewById(R.id.listview);
} else {
mainView = inflater.inflate(R.layout.ly_without_header, null);
listView = (ListView) mainView.findViewById(R.id.listview);
}
:
if (needHeader) {
stickyListHeadersListView.setAdapter(adapter);
} else {
listView.setAdapter(adapter);
}
相關問題
- 1. 添加子章節標題中StickyListHeaders
- 2. Drupal:隱藏節點標題
- 3. 在iframe中隱藏標題
- 4. 動態隱藏TableView節標題
- 5. UIView隱藏在表格中的節標題
- 6. 隱藏標題欄
- 7. 隱藏ListView標題/隱藏單個分隔符在列表中
- 8. 如何在SimpleForm中隱藏組標題
- 9. 如何在LongListSelector中隱藏組標題?
- 10. 在jQuery Mobile中隱藏標題
- 11. 在UITabllView中隱藏區域標題
- 12. 在powershell中隱藏標題欄
- 13. 在drupal 7中隱藏Webform標題
- 14. 在Seaborn中隱藏軸標題
- 15. 在Devexpress gridcontrol中隱藏標題
- 16. 在畫面視圖中隱藏標題
- 17. 如果在iframe中隱藏標題
- 18. 在jqgrid標題中隱藏文本
- 19. 在jqgrid中隱藏子網格標題
- 20. 在IE8中隱藏標題元素
- 21. 如何隱藏UITableViewcell中的所有節標題(分組樣式)?
- 22. 標題欄如何隱藏?
- 23. 隱藏TabLayoutPanel或TabPanel標題
- 24. jtable標題隱藏/無列
- 25. 使用jQuery隱藏標題
- 26. 隱藏WordPress頁面標題
- 27. 從UINavigationBar隱藏標題?
- 28. 隱藏部分的標題
- 29. 隱藏標題文字(Wordpress)
- 30. 隱藏的jQuery標題