Is it possible to check whether a fragment has already been loaded into a FrameLayout before adding it?
Asked
Active
Viewed 1,406 times
1

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 Answers
1
Fragment a = getSupportFragmentManager().findFragmentById(R.id.FrameLayout);
if(a == null)
FrameLayout is empty

monnef
- 3,903
- 5
- 30
- 50

Damel Lambert-Powell
- 97
- 3