Is it possible to use something other than a listview as sliding drawer in drawerlayout

后端 未结 4 1592
陌清茗
陌清茗 2020-12-13 00:36

I would like to have for example a LinearLayout or a RelativeLayout sliding from the left of the screen instead of a lone ListView.

4条回答
  •  清歌不尽
    2020-12-13 01:04

    Yes it is possible to have any view as the sliding part of a drawer layout. I prefer declaring a FrameLayout as the drawer and replacing it with my fragment, and it runs just fine.

    The error you are getting is probably due to some other reason in the Java part of your implementation.

提交回复
热议问题