Deleted commented code

This commit is contained in:
hshristov
2015-11-06 10:42:02 +02:00
parent a23d8ad4f0
commit 6b57eeec07

View File

@ -68,134 +68,6 @@ var PageFragmentBody = (<any>android.app.Fragment).extend({
} }
}); });
//class PageFragmentBody extends android.app.Fragment {
// public frame: Frame;
// public entry: definition.BackstackEntry;
// constructor(frame: Frame, entry: definition.BackstackEntry) {
// super();
// this.frame = frame;
// this.entry = entry;
// return global.__native(this);
// }
// onAttach(activity: android.app.Activity) {
// super.onAttach(activity);
// trace.write(this.toString() + ".onAttach();", trace.categories.NativeLifecycle);
// }
// onCreate(savedInstanceState: android.os.Bundle) {
// super.onCreate(savedInstanceState);
// trace.write(this.toString() + ".onCreate(); savedInstanceState: " + savedInstanceState, trace.categories.NativeLifecycle);
// super.setHasOptionsMenu(true);
// }
// onCreateView(inflater: android.view.LayoutInflater, container: android.view.ViewGroup, savedInstanceState: android.os.Bundle): android.view.View {
// trace.write(this.toString() + ".onCreateView(); container: " + container + "; savedInstanceState: " + savedInstanceState, trace.categories.NativeLifecycle);
// if (this[CLEARING_HISTORY]) {
// trace.write(`${this.toString() } wants to create a view, but we are currently clearing history. Returning null.`, trace.categories.NativeLifecycle);
// return null;
// }
// var entry: definition.BackstackEntry = this.entry;
// var page: pages.Page = entry.resolvedPage;
// if (savedInstanceState && savedInstanceState.getBoolean(HIDDEN, false)) {
// // Manually hide the fragment if it was hidden before as Android will not do this every time.
// super.getFragmentManager().beginTransaction().hide(this).commit();
// // As the page will not be added to the frame it won't be attached
// // We should attach it manually so that it creates its nativeView
// page._onAttached(this.getActivity());
// }
// else {
// onFragmentShown(this);
// }
// trace.write(this.toString() + ".onCreateView(); nativeView: " + page._nativeView, trace.categories.NativeLifecycle);
// return page._nativeView;
// }
// onHiddenChanged(hidden: boolean) {
// super.onHiddenChanged(hidden);
// trace.write(this.toString() + ".onHiddenChanged(); hidden: " + hidden, trace.categories.NativeLifecycle);
// if (hidden) {
// onFragmentHidden(this);
// }
// else {
// onFragmentShown(this);
// }
// }
// onActivityCreated(savedInstanceState: android.os.Bundle) {
// super.onActivityCreated(savedInstanceState);
// trace.write(this.toString() + ".onActivityCreated(); savedInstanceState: " + savedInstanceState, trace.categories.NativeLifecycle);
// }
// onSaveInstanceState(outState: android.os.Bundle) {
// super.onSaveInstanceState(outState);
// trace.write(this.toString() + ".onSaveInstanceState();", trace.categories.NativeLifecycle);
// if (this.isHidden()) {
// outState.putBoolean(HIDDEN, true);
// }
// }
// onViewStateRestored(savedInstanceState: android.os.Bundle) {
// super.onViewStateRestored(savedInstanceState);
// trace.write(this.toString() + ".onViewStateRestored(); savedInstanceState: " + savedInstanceState, trace.categories.NativeLifecycle);
// }
// onStart() {
// super.onStart();
// trace.write(this.toString() + ".onStart();", trace.categories.NativeLifecycle);
// }
// onResume() {
// super.onResume();
// trace.write(this.toString() + ".onResume();", trace.categories.NativeLifecycle);
// }
// onPause() {
// super.onPause();
// trace.write(this.toString() + ".onPause();", trace.categories.NativeLifecycle);
// }
// onStop() {
// super.onStop();
// trace.write(this.toString() + ".onStop();", trace.categories.NativeLifecycle);
// }
// onDestroyView() {
// super.onDestroyView();
// trace.write(this.toString() + ".onDestroyView();", trace.categories.NativeLifecycle);
// onFragmentHidden(this);
// }
// onDestroy() {
// super.onDestroy();
// trace.write(this.toString() + ".onDestroy();", trace.categories.NativeLifecycle);
// // Explicitly free resources to allow Java Garbage collector to release resources associated with JavaScript implementations - e.g. large image files.
// // Although we hint the V8 with the externally allocated memory, synchronization between the two GCs is not deterministic without an explicit call.
// // TODO: Revisit this explicit Garbage Collector call when possible.
// utils.GC();
// }
// onDetach() {
// super.onDetach();
// trace.write(this.toString() + ".onDetach();", trace.categories.NativeLifecycle);
// }
// public toString() {
// return `${this.getTag() }[${this.entry.resolvedPage.id}]`;
// }
//}
function onFragmentShown(fragment) { function onFragmentShown(fragment) {
if (fragment[CLEARING_HISTORY]) { if (fragment[CLEARING_HISTORY]) {
trace.write(`${fragment.toString() } has been shown, but we are currently clearing history. Returning.`, trace.categories.NativeLifecycle); trace.write(`${fragment.toString() } has been shown, but we are currently clearing history. Returning.`, trace.categories.NativeLifecycle);