获取NavigationView里面headerLayout布局的部件

我想直接通过 findViewById(R.id.nav_head_root),  findViewById(R.id.every_day_title) 来取到nav_header_main布局里面 id 为 nav_head_root  的  LinerLayout  和  id 为 every_day_title 的  TextView ,却返回null nav_header_main.xml
相关文章
相关标签/搜索