1

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

Vadim Kotov
  • 7,766
  • 8
  • 46
  • 61
Poonam Anthony
  • 1,618
  • 1
  • 16
  • 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,643
  • 4
  • 28
  • 49