嗨,我遇到问题,抽屉布局没有在三星手机中打开,但切换图标在后退图标中更改。 提前致谢 这是代码,请帮我摆脱它。
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.frameLayout);
if (usersInfo.getIsOwner().equalsIgnoreCase("true") || usersInfo.getIsManager().equalsIgnoreCase("true")) {
if (currentFragment instanceof ReportsMapFragment ||
currentFragment instanceof UsersInfoFragment || currentFragment instanceof MyProfileFragment ||
currentFragment instanceof MyTransactionFragment || currentFragment instanceof AboutUsFragment) {
if (currentFragment instanceof AboutUsFragment)
navigationViewLeft.setCheckedItem(R.id.nav_about_us);
else if (currentFragment instanceof MyTransactionFragment)
navigationViewLeft.setCheckedItem(R.id.nav_transactions);
drawer.openDrawer(GravityCompat.START);
} else {
onBackPressed();
}
} else {
if (currentFragment instanceof ReportDetailMapFragment || currentFragment instanceof MyProfileFragment || currentFragment instanceof AboutUsFragment) {
if (currentFragment instanceof AboutUsFragment)
navigationViewLeft.setCheckedItem(R.id.nav_about_us);
drawer.openDrawer(GravityCompat.START);
} else {
onBackPressed();
}
}
}
});