您好我的NavigationView有问题。我使用这段代码:
nav = FindViewById<NavigationView>(Resource.Id.nav_view);
View vie = nav.GetHeaderView(0);
TextView title1 = vie.FindViewById<TextView>(Resource.Id.title1);
TextView title2 = vie.FindViewById<TextView>(Resource.Id.title2);
ImageView logo_menu = vie.FindViewById<ImageView>(Resource.Id.imageView1);
title1.Text = MenuLayout.text1;
title1.TextSize = MenuLayout.text1_size;
title1.SetTextColor(MenuLayout.text1_color);
title2.Text = MenuLayout.text2;
title2.TextSize = MenuLayout.text2_size;
title2.SetTextColor(MenuLayout.text2_color);
logo_menu.SetImageBitmap(MenuLayout.menu_Image);
vie.SetBackgroundColor(Android.Graphics.Color.Black);
最后一行不起作用,没有任何变化......如何以编程方式设置标题的背景?我的第二个问题是Navmenu的更改文本和图标项目(我可以在程序工作时更改吗?如何覆盖它)