Back to project page Archeology.
The source code is released under:
GNU General Public License
If you think the Android project Archeology listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Chipotle Software(c) 2013//from w w w . ja v a 2 s.com */ package com.chipotle.archeology; import android.app.ActionBar; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.MenuItem; import android.content.Intent; import android.widget.EditText; import android.widget.TextView; import android.support.v4.app.NavUtils; import android.annotation.SuppressLint; import android.os.Build; import java.lang.annotation.Annotation; import java.util.*; public class DisplayMessageActivity extends Activity { @SuppressLint("NewApi") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Get the message from the intent Intent intent = getIntent(); String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE); // Create the text view TextView textView = new TextView(this); textView.setTextSize(40); textView.setText(message); // Set the text view as the activity layout setContentView(textView); // Make sure we're running on Honeycomb or higher to use ActionBar APIs if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // Show the Up button in the action bar. getActionBar().setDisplayHomeAsUpEnabled(true); } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: NavUtils.navigateUpFromSameTask(this); return true; } return super.onOptionsItemSelected(item); } }