如何在导航抽屉内添加带有节和标题的列表

时间:2013-10-23 09:31:31

标签: android android-listview

如何在导航栏中添加包含节和标题的列表?它尝试了以下结构。

<LinearLayout>

   <TextView>Add Topics</TextView>

   <TextView>Recent Topics</TextView>

   <ListFragment>Recent Topics list items<ListFragment>

   <TextView>My Topics</TextView>

   <ListFragment>My Topics list items<ListFragment>

</LinearLayout>

但是我无法生成像最新的youtube应用程序导航抽屉这样的列表结构。

基本上我需要在naviagation抽屉里面跟随结构。

  List Item 1 (on click change fragment in home page of application)

  List Item 2 (Disable on click - It will act as Header)

      Inner List Item 1  (on click change fragment in home page of application)
      Inner List Item 2  (on click change fragment in home page of application)
      Inner List Item 3  (on click change fragment in home page of application)
      Inner List Item 4  (on click change fragment in home page of application)
      Inner List Item 5  (on click change fragment in home page of application)

   List Item 3 (Disable on click - It will act as Header)

      Inner List Item 1  (on click change fragment in home page of application)
      Inner List Item 2  (on click change fragment in home page of application)
      Inner List Item 3  (on click change fragment in home page of application)
      Inner List Item 4  (on click change fragment in home page of application)
      Inner List Item 5  (on click change fragment in home page of application)

如何实现这样的布局?

0 个答案:

没有答案