0
我有我的主要活动中导航视图,并有一些项目,问题是,当我点击项目项目名称字段获取充满蓝色background.How我可以解决导航在Android中单击时查看背景蓝色的项目封面?
代码: -
NavigationView m_Navigation = (NavigationView) findViewById(R.id.nav_view);
m_Navigation.setNavigationItemSelectedListener(this);
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_wallet) {
// Handle the camera action
Intent wallet = new Intent(this, CMyWalletScreen.class);
startActivity(wallet);
} else if (id == R.id.referandEarn) {
Intent refer = new Intent(this, CReferAndEarnScreen.class);
startActivity(refer);
} else if (id == R.id.myProfile) {
Intent profile = new Intent(this, CMyProfile.class);
startActivity(profile);
} else if (id == R.id.setting) {
Intent setting = new Intent(this, CSettingScreen.class);
startActivity(setting);
} else if (id == R.id.LogOut) {
showdialog();
}
m_Drawer.closeDrawer(GravityCompat.START);
return true;
}
样式文件: -
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary</item>
<item name="colorAccent">@color/accent</item>
<item name="android:statusBarColor" tools:ignore="NewApi">@color/primary_dark</item>
</style>
其配置在其样式文件不在这里显示您的'styles.xml'文件? –
我添加了样式文件kinldy视图 – Nitin
添加完整文件,也是颜色?点击时想显示什么颜色? –