【发布时间】:2013-03-20 04:37:56
【问题描述】:
是否可以在添加之前检查片段是否已经加载到 FrameLayout 中?
【问题讨论】:
-
我想我找到了我要找的东西here
标签: android android-fragments android-framelayout fragmenttransaction
是否可以在添加之前检查片段是否已经加载到 FrameLayout 中?
【问题讨论】:
标签: android android-fragments android-framelayout fragmenttransaction
Fragment a = getSupportFragmentManager().findFragmentById(R.id.FrameLayout);
if(a == null)
FrameLayout is empty
【讨论】: