-
Notifications
You must be signed in to change notification settings - Fork 696
Open
Description
if(fragment!=null){
if(currentFragment==null || !currentFragment.getClass().getName().equals(fragment.getClass().getName()) )
{
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container,fragment)
.commit();
currentFragment=fragment;
}
}
判断加个fragment!=null 非空判断防止空指针
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels