Back to project page LearningAndroid2edYamba2.
The source code is released under:
Apache License
If you think the Android project LearningAndroid2edYamba2 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.marakana.android.yamba; /*ww w . ja va 2 s. c o m*/ import android.app.Activity; import android.os.Bundle; public class StatusActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // clk: instead of class extending SubActivity, we extend Activity // and just directly enable Up button for the Action bar here; // also need to declare the parent activity in AndroidManifest.xml // https://developer.android.com/training/basics/actionbar/adding-buttons.html#UpNav getActionBar().setDisplayHomeAsUpEnabled(true); // Check if this activity was created before if (savedInstanceState == null) { // Create a fragment StatusFragment fragment = new StatusFragment(); getFragmentManager() .beginTransaction() .add(android.R.id.content, fragment, fragment.getClass().getSimpleName()).commit(); } } }