This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnCreate(Bundle bundle) | |
{ | |
//... | |
//Add a header view to the NavigationView | |
ConfigureNavigationViewHeader(); | |
} | |
private void ConfigureNavigationViewHeader() | |
{ | |
View viewHeader = LayoutInflater.Inflate(Resource.Layout.mainActivity_navigationView_header, null); | |
ImageView imageviewUserAvatar = viewHeader.FindViewById<ImageView>(Resource.Id.mainActivity_navigationView_header_imageview_userAvatar); | |
TextView textviewUserPseudo = viewHeader.FindViewById<TextView>(Resource.Id.mainActivity_navigationView_header_textview_UserPseudo); | |
TextView textviewUserDesc = viewHeader.FindViewById<TextView>(Resource.Id.mainActivity_navigationView_header_textview_UserDesc); | |
imageviewUserAvatar.SetImageResource(Resource.Drawable.photo_profil); | |
textviewUserPseudo.Text = "Maxime Esprit"; | |
textviewUserDesc.Text = "A passionate mobile apps developer"; | |
m_navigationView.AddHeaderView(viewHeader); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment