1

Is it possible to check whether a fragment has already been loaded into a FrameLayout before adding it?

4

1 回答 1

1
Fragment a = getSupportFragmentManager().findFragmentById(R.id.FrameLayout);

if(a == null)
    FrameLayout is empty
于 2015-11-08T17:55:25.750 回答