DrawerLayout must be measured with MeasureSpec.EXACTLY error

前端 未结 12 2424
独厮守ぢ
独厮守ぢ 2020-12-03 16:54

I am trying to implement a Navigation drawer, but I keep getting this error. I saw the similar questions but did not work for me. I have the following layout activity_main2.

12条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 17:33

    This can also happen if you have set layout_width to wrap_content. In my case it was solved by setting width to match_parent. Hope this helps someone.

提交回复
热议问题