本文整理汇总了Java中android.support.v4.app.FragmentManager.enableDebugLogging方法的典型用法代码示例。如果您正苦于以下问题:Java FragmentManager.enableDebugLogging方法的具体用法?Java FragmentManager.enableDebugLogging怎么用?Java FragmentManager.enableDebugLogging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v4.app.FragmentManager
的用法示例。
在下文中一共展示了FragmentManager.enableDebugLogging方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
//started for the first time, reset all counters
fragmentLifecycleActivityInstanceCount = -1;
TestFragment.testFragmentInstanceCount = -1;
}
fragmentLifecycleActivityInstanceCount++;
setContentView(R.layout.activity_fragment_lifecycle);
FragmentManager.enableDebugLogging(true);
Log.v(TAG, "onCreate of " + this);
mSwitchAddToBackStack = (SwitchCompat) findViewById(R.id.switch_add_back_stack);
mSwitchRetainPresenterInstance = (SwitchCompat) findViewById(
R.id.switch_retain_presenter_instance);
final TextView textDontKeepActivities = (TextView) findViewById(
R.id.text_dont_keep_activities);
textDontKeepActivities.setText(
isDontKeepActivities() ? R.string.dont_keep_activities_enabled
: R.string.dont_keep_activities_disabled);
Log.v(TAG, "// A new Activity gets created by the Android Framework.");
Log.v(TAG, "final HostingActivity hostingActivity" + fragmentLifecycleActivityInstanceCount
+ " = new HostingActivity();");
}