
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.hh.se/ceres/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hh.se/ceres/index.php?action=history&amp;feed=atom&amp;title=Java_Android_Hello_World_Instructions</id>
		<title>Java Android Hello World Instructions - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hh.se/ceres/index.php?action=history&amp;feed=atom&amp;title=Java_Android_Hello_World_Instructions"/>
		<link rel="alternate" type="text/html" href="https://wiki.hh.se/ceres/index.php?title=Java_Android_Hello_World_Instructions&amp;action=history"/>
		<updated>2026-05-10T01:20:17Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.22.6</generator>

	<entry>
		<id>https://wiki.hh.se/ceres/index.php?title=Java_Android_Hello_World_Instructions&amp;diff=3008&amp;oldid=prev</id>
		<title>Slawek: Created page with &quot;* Create a new Android Virtual Device (AVD)  *  Create a new Android application project  *  Run and see the behavior  *  Check out src/com.example..., res/layout and res/valu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hh.se/ceres/index.php?title=Java_Android_Hello_World_Instructions&amp;diff=3008&amp;oldid=prev"/>
				<updated>2014-06-23T09:22:12Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;* Create a new Android Virtual Device (AVD)  *  Create a new Android application project  *  Run and see the behavior  *  Check out src/com.example..., res/layout and res/valu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* Create a new Android Virtual Device (AVD)&lt;br /&gt;
&lt;br /&gt;
*  Create a new Android application project&lt;br /&gt;
&lt;br /&gt;
*  Run and see the behavior&lt;br /&gt;
&lt;br /&gt;
*  Check out src/com.example..., res/layout and res/values&lt;br /&gt;
&lt;br /&gt;
* Make the layout linear and remove the text-box&lt;br /&gt;
&lt;br /&gt;
* Add a button and an edit text with the following spec&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;EditText&lt;br /&gt;
          android:id=&amp;quot;@+id/edit_message&amp;quot;&lt;br /&gt;
          android:layout_width=&amp;quot;wrap_content&amp;quot;&lt;br /&gt;
          android:layout_height=&amp;quot;wrap_content&amp;quot;&lt;br /&gt;
          android:hint=&amp;quot;@string/enter_text&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;Button&lt;br /&gt;
          android:layout_width=&amp;quot;wrap_content&amp;quot;&lt;br /&gt;
          android:layout_height=&amp;quot;wrap_content&amp;quot;&lt;br /&gt;
          android:text=&amp;quot;@string/button_text&amp;quot; /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
* Add a method name (e.g., sendMessage) to handle the OnClick event of the button &lt;br /&gt;
&lt;br /&gt;
  android:onClick=&amp;quot;sendMessage&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
*  Add sendMessage to src/MainActivity&lt;br /&gt;
&lt;br /&gt;
  public void sendMessage(View view) {&lt;br /&gt;
  }&lt;br /&gt;
	&lt;br /&gt;
* Include android.view.View (Ctrl+Shift+o)&lt;br /&gt;
&lt;br /&gt;
* Add to the body of sendMessage: &lt;br /&gt;
&lt;br /&gt;
        	Intent intent = new Intent(this, ShowMessage.class);&lt;br /&gt;
		EditText editText = (EditText) findViewById(R.id.edit_message);&lt;br /&gt;
		String message = editText.getText().toString();&lt;br /&gt;
		intent.putExtra(EXTRA_MESSAGE, message);		&lt;br /&gt;
		startActivity(intent);&lt;br /&gt;
&lt;br /&gt;
and to the class MainActivity:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    public final static String EXTRA_MESSAGE = &amp;quot;com.example.helloworld.MESSAGE&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Add a new activity (New | Other| Activity)&lt;br /&gt;
&lt;br /&gt;
* Add the following declarations to the new activity's onCreate():&lt;br /&gt;
&lt;br /&gt;
    Intent intent = getIntent();&lt;br /&gt;
    String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);&lt;br /&gt;
    &lt;br /&gt;
    TextView textView = new TextView(this);&lt;br /&gt;
    textView.setTextSize(40);&lt;br /&gt;
    textView.setText(message);&lt;br /&gt;
&lt;br /&gt;
== [[PA 8001 Ed 2013|Back to Embedded Systems Programming]] ==&lt;/div&gt;</summary>
		<author><name>Slawek</name></author>	</entry>

	</feed>