Back to project page introToDroid4ed.
The source code is released under:
GNU General Public License
If you think the Android project introToDroid4ed 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.navigation; /*from ww w . j a v a2s .co m*/ import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class FirstChildActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_first_child); getActionBar().setDisplayHomeAsUpEnabled(true); Button lateral = (Button) findViewById(R.id.lateral); lateral.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(v.getContext(), SecondChildActivity.class); startActivity(intent); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.settings, menu); return true; } }