As the title says, I want to know if there is any way to control views inside the NavigationView
header? (Except for adding or removing header.)
For exa
Simply try find your view in your activity:
tvUserName = (TextView) findViewById(R.id.tv_username);
It works for me. My header layout is:
My NavigationView in Activity Layout is:
And BTW, I came across problem when inflating LinearLayout, where layout params are not provided:
TextView headerView = (TextView) LayoutInflater.from(this).inflate(R.layout.lay_header, null);
headerView.setText("Your_thoght");
Hope it helps.