1

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

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Poonam Anthony
  • 1,848
  • 3
  • 17
  • 27
  • I think I've found what I was looking for [here](http://stackoverflow.com/questions/15492717/get-fragment-dynamically-attached-to-framelayout?rq=1) – Poonam Anthony Mar 20 '13 at 05:18

1 Answers1

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

if(a == null)
    FrameLayout is empty
monnef
  • 3,903
  • 5
  • 30
  • 50