Back to project page 2014-Droid-code.
The source code is released under:
GNU General Public License
If you think the Android project 2014-Droid-code 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.introtoandroid.simplefragments; //www. j a va 2 s . c o m import android.app.Activity; import android.app.FragmentManager; import android.app.FragmentTransaction; import android.content.res.Configuration; import android.os.Bundle; import android.util.Log; public class FieldNoteViewActivity extends Activity { private final static String TAG ="FRAG-FIELDNACTIVITY"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(TAG, "onCreate()"); if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { // If the screen is now in landscape mode, we can show the // dialog in-line so we don't need this activity. finish(); return; } if (savedInstanceState == null) { // During initial setup, plug in the field note fragment. FieldNoteWebViewFragment details = new FieldNoteWebViewFragment(); details.setArguments(getIntent().getExtras()); FragmentManager fm = getFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); ft.add(android.R.id.content, details); ft.commit(); } } // oncreate @Override protected void onStart() { super.onStart(); Log.d(TAG, "onStart()"); } @Override protected void onResume() { super.onResume(); Log.d(TAG, "onResume()"); } @Override protected void onPause() { super.onPause(); Log.d(TAG, "onPause()"); } @Override protected void onStop() { super.onStop(); Log.d(TAG, "onStop()"); } @Override protected void onDestroy() { super.onDestroy(); Log.d(TAG, "onDestroy()"); } @Override protected void onRestart() { super.onRestart(); Log.d(TAG, "onRestart()"); } } //FieldNoteViewActivity class