本文整理匯總了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();");
}