L
L
LilSem2017-05-05 00:13:25
Android
LilSem, 2017-05-05 00:13:25

Navigation Drawer, how to change Header?

Android studio has a template for creating Navigation Drawer. I need to change its title programmatically. I have an application when using the methods:

twNavBarName = (TextView) findViewById(R.id.nav_header_tw_name);
twNavBarEmail = (TextView) findViewById(R.id.nav_header_tw_email);
twNavBarName.setText("fdfs");

crashes and logs nothing at all. How to change the headers with the name and email, in the figure they are shown at numbers 1 and 2.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question