Fragments displayed over each other

前端 未结 5 1673
北荒
北荒 2020-12-31 01:09

I\'ve got an Activity with a DrawerLayout, using the guidelines from http://developer.android.com/training/implementing-navigation/nav-drawer.html.

When I click on a

5条回答
  •  春和景丽
    2020-12-31 01:33

    After about 1 week, I found the solution without adding background color or anything else. Just add this code and fix that bullshit. I hope it will help all of you.

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        container.clearDisappearingChildren();
        return inflater.inflate(R.layout.fragment, container, false);
    }
    

提交回复
热议问题