我将以下代码添加到活动扩展 Fragment 实现 NavigationView.OnNavigationItemSelectedListener
当我单击按钮时,该按钮必须请求广告 我收到显示为烤面包的错误。 在将这段代码放入
之前,我并没有出错
@SuppressWarnings("StatementWithEmptyBody")
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.navigation_gift) {
TextView txtEmtiaz = (TextView) rootview.findViewById(R.id.txtEmtiaz);
SharedPreferences sp1 = getActivity().getSharedPreferences("entire", 0);
String oop = sp1.getString("emtiaz", "");
txtEmtiaz.setText(oop);
Log.e("POPI", "txt in Ads fragment Saved :" + txtEmtiaz.getText());
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_help_WITHUS) {
}
return true;
}
错误Toast:hystrix电路短路,并且已打开android