Back to project page filemanager.
The source code is released under:
MIT License
If you think the Android project filemanager listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.binkery.app.filemanager; //from www .j a v a 2 s. co m import android.app.Activity; import android.app.Fragment; import android.app.FragmentTransaction; import android.os.Bundle; public abstract class BaseFragment extends Fragment { public void addFragment(BaseFragment fragment) { FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.replace(R.id.container, fragment); ft.addToBackStack(null); ft.commit(); } @Override public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof MainActivity) { ((MainActivity) activity).setOnKeyBackListener(this); } } protected boolean onKeyBack() { return false; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public void onStart() { super.onStart(); } @Override public void onResume() { super.onResume(); } @Override public void onPause() { super.onPause(); } @Override public void onStop() { super.onStop(); } @Override public void onDestroy() { super.onDestroy(); } @Override public void onDetach() { super.onDetach(); } }