<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2354683670428034657</id><updated>2024-10-06T20:57:15.897-07:00</updated><category term="android"/><category term="android app"/><category term="android develop"/><category term="android tutorial"/><category term="basic android"/><category term="a"/><category term="android clicker"/><category term="android counter"/><category term="basic android app"/><category term="counter"/><category term="counter clicker"/><title type='text'>Mass Destruction Android</title><subtitle type='html'>Android tutorials</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://md-android.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2354683670428034657/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://md-android.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>vyppN</name><uri>http://www.blogger.com/profile/18303705882641189214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='19' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjASZEtR7pgRkHo_WuKeEvZmhFRYNg2re_of2DNTaSRSyx5pZvnMYPa7RCzODm1jcYAoCMs77EKo0hJ724Rjq36IYG_LT7uNT6p6gl7FhhQiuifNjmSe2TerW14q5DxeWA/s220/chefdick_big.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2354683670428034657.post-9107463707249598264</id><published>2011-12-20T06:01:00.000-08:00</published><updated>2011-12-20T10:11:28.897-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="android app"/><category scheme="http://www.blogger.com/atom/ns#" term="android clicker"/><category scheme="http://www.blogger.com/atom/ns#" term="android counter"/><category scheme="http://www.blogger.com/atom/ns#" term="android develop"/><category scheme="http://www.blogger.com/atom/ns#" term="android tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="basic android"/><category scheme="http://www.blogger.com/atom/ns#" term="basic android app"/><category scheme="http://www.blogger.com/atom/ns#" term="counter"/><category scheme="http://www.blogger.com/atom/ns#" term="counter clicker"/><title type='text'>Create a simple Android Counter Clicker App</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifqxLXs_vA2_KwFaY2s1NtDUgdMbMYrLspoz92m0WmbnckHU3JD6B4UJ5Q5Jr-WSKrk4pxK6s0NbkvSkBwMEUTurGGqm6M_wpjWXwBDsfU5Zdqnlo98G4BKgWWMB8SG4GtoTO8g2uQoioW/s1600/tally-counter-scenic.jpg&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5688211531278877394&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifqxLXs_vA2_KwFaY2s1NtDUgdMbMYrLspoz92m0WmbnckHU3JD6B4UJ5Q5Jr-WSKrk4pxK6s0NbkvSkBwMEUTurGGqm6M_wpjWXwBDsfU5Zdqnlo98G4BKgWWMB8SG4GtoTO8g2uQoioW/s400/tally-counter-scenic.jpg&quot; style=&quot;cursor: pointer; display: block; height: 400px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #009900; font-size: 180%;&quot;&gt;Hello&lt;/span&gt; my friends! Today I will show you how to create a simple counter clicker app for android. The counter clicker is use for count the number of something such as people in concert, cars on the road, etc. This app is easy to create and you can improve your better user interface by yourself. Then, here we go!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;First, start eclipse and create a new android project named &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #009900;&quot;&gt;counterClicker&lt;/span&gt;&quot; and set it to &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;Android 2.2 or API level 8&lt;/span&gt;. Next, set the package to &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #009900;&quot;&gt;my.test.counter&lt;/span&gt;&quot;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_a0qmXjcY-TEzmC3i2hcMoQDkRZjP8K7uSVaRlLsmMret_1GdAvIuSojB5wlUVb_dzUNmolmewgVoUHEojTFxCoU0GetzLRaJbyOrYwHxYNCYp_XYhFjXxszY5YBwSCG8O3tX_Yiam_VO/s1600/Screen-Shot-2011-12-20-at-9.13.11-PM.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5688214148486963522&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_a0qmXjcY-TEzmC3i2hcMoQDkRZjP8K7uSVaRlLsmMret_1GdAvIuSojB5wlUVb_dzUNmolmewgVoUHEojTFxCoU0GetzLRaJbyOrYwHxYNCYp_XYhFjXxszY5YBwSCG8O3tX_Yiam_VO/s400/Screen-Shot-2011-12-20-at-9.13.11-PM.png&quot; style=&quot;cursor: pointer; display: block; height: 222px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;Next, open &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;/res/layout/main.xml&lt;/span&gt; and edit code like this: (You can enlarge this picture by clicking on it.)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Attention:&lt;/span&gt;&lt;/b&gt; Oh! my friends!! I forget to change the button text. So, in this below xml code, change the first button (id:button2) from &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #00cccc;&quot;&gt;android:text&lt;/span&gt;=&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;&quot;Button&quot;&lt;/span&gt;&quot; to &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #33ccff;&quot;&gt;android:text&lt;/span&gt;=&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;&quot;Count&quot;&lt;/span&gt;&quot; and the second button (id:button1) from &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #33ccff;&quot;&gt;android:text&lt;/span&gt;=&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;&quot;Button&quot;&lt;/span&gt;&quot; to &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #33ccff;&quot;&gt;android:text&lt;/span&gt;=&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;&quot;Clear&quot;&lt;/span&gt;&quot;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnocawVkUxP34T6dbBokbcF93d829mLOdX55D5TExRZ1m4_DPqZwKL9N0XGQmPBUuwLXMcryvHHVf0BUeRFz5dhzh83a8VqTNEIFxQlaVrtlS1FKSLcJrXJl9AKiBqFGFKEcTBz2WalZqC/s1600/xml.jpg&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5688232015618803106&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnocawVkUxP34T6dbBokbcF93d829mLOdX55D5TExRZ1m4_DPqZwKL9N0XGQmPBUuwLXMcryvHHVf0BUeRFz5dhzh83a8VqTNEIFxQlaVrtlS1FKSLcJrXJl9AKiBqFGFKEcTBz2WalZqC/s400/xml.jpg&quot; style=&quot;cursor: pointer; display: block; height: 300px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Next,&lt;b&gt; open CounterClickerActivity.java and edit the code:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
(look at &lt;a href=&quot;http://md-android.blogspot.com/2011/12/create-your-beyond-first-android-app.html&quot;&gt;This Tutorial&lt;/a&gt; to find how to add sound to the project with MediaPlayer object)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #9a1867;&quot;&gt;package&lt;/span&gt; my.test.counter;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #9a1867;&quot;&gt;import&lt;/span&gt; android.app.Activity;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #9a1867;&quot;&gt;import&lt;/span&gt; android.media.MediaPlayer;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #9a1867;&quot;&gt;import&lt;/span&gt; android.os.Bundle;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #9a1867;&quot;&gt;import&lt;/span&gt; android.view.View;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #9a1867;&quot;&gt;import&lt;/span&gt; android.widget.Button;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #9a1867;&quot;&gt;import&lt;/span&gt; android.widget.TextView;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #9a1867;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #9a1867;&quot;&gt;class&lt;/span&gt; CounterClickerActivity &lt;span style=&quot;color: #9a1867;&quot;&gt;extends&lt;/span&gt; Activity {&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;private&lt;/span&gt; TextView &lt;span style=&quot;color: #0023c7;&quot;&gt;txt1&lt;/span&gt;, &lt;span style=&quot;color: #0023c7;&quot;&gt;txt2&lt;/span&gt;, &lt;span style=&quot;color: #0023c7;&quot;&gt;txt3&lt;/span&gt;, &lt;span style=&quot;color: #0023c7;&quot;&gt;txt4&lt;/span&gt;;&lt;/div&gt;
&lt;div style=&quot;color: #0023c7; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; Button &lt;/span&gt;btnCount&lt;span style=&quot;color: black;&quot;&gt;, &lt;/span&gt;btnClear&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #9a1867; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;private&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;int&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;i1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;i2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;i3&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;i4&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;private&lt;/span&gt; MediaPlayer &lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt;;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #4975c7; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;/** Called when the activity is first created. */&lt;/div&gt;
&lt;div style=&quot;color: #777777; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;@Override&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #9a1867;&quot;&gt;void&lt;/span&gt; onCreate(Bundle savedInstanceState) {&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #0023c7;&quot;&gt;main&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt1&lt;/span&gt; = (TextView) findViewById(R.id.&lt;span style=&quot;color: #0023c7;&quot;&gt;txt1&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt2&lt;/span&gt; = (TextView) findViewById(R.id.&lt;span style=&quot;color: #0023c7;&quot;&gt;txt2&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt3&lt;/span&gt; = (TextView) findViewById(R.id.&lt;span style=&quot;color: #0023c7;&quot;&gt;txt3&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt4&lt;/span&gt; = (TextView) findViewById(R.id.&lt;span style=&quot;color: #0023c7;&quot;&gt;txt4&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;btnCount&lt;/span&gt; = (Button) findViewById(R.id.&lt;span style=&quot;color: #0023c7;&quot;&gt;button2&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;btnCount&lt;/span&gt;.setOnClickListener(&lt;span style=&quot;color: #9a1867;&quot;&gt;new&lt;/span&gt; View.OnClickListener() {&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #777777; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;@Override&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #9a1867;&quot;&gt;void&lt;/span&gt; onClick(View v) {&lt;/div&gt;
&lt;div style=&quot;color: #429073; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;// &lt;span style=&quot;color: #8dafc9;&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;countingNumber();&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;});&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;btnClear&lt;/span&gt; = (Button) findViewById(R.id.&lt;span style=&quot;color: #0023c7;&quot;&gt;button1&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;btnClear&lt;/span&gt;.setOnClickListener(&lt;span style=&quot;color: #9a1867;&quot;&gt;new&lt;/span&gt; View.OnClickListener() {&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #777777; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;@Override&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #9a1867;&quot;&gt;void&lt;/span&gt; onClick(View v) {&lt;/div&gt;
&lt;div style=&quot;color: #429073; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;// &lt;span style=&quot;color: #8dafc9;&quot;&gt;TODO&lt;/span&gt; Auto-generated method stub&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;clearingNumber();&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;});&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #9a1867;&quot;&gt;void&lt;/span&gt; countingNumber() {&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt; != &lt;span style=&quot;color: #9a1867;&quot;&gt;null&lt;/span&gt;) &lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt;.release();&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;try&lt;/span&gt; {&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt; = MediaPlayer.create(&lt;span style=&quot;color: #9a1867;&quot;&gt;this&lt;/span&gt;, R.raw.&lt;span style=&quot;color: #0023c7;&quot;&gt;stapler&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt;.start();&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} &lt;span style=&quot;color: #9a1867;&quot;&gt;catch&lt;/span&gt; (Exception e) {&lt;/div&gt;
&lt;div style=&quot;color: #429073; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;// &lt;span style=&quot;color: #8dafc9;&quot;&gt;TODO&lt;/span&gt;: handle exception&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;e.printStackTrace();&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;if&lt;/span&gt;(!(&lt;span style=&quot;color: #0023c7;&quot;&gt;i1&lt;/span&gt;==9 &amp;amp;&amp;amp; &lt;span style=&quot;color: #0023c7;&quot;&gt;i2&lt;/span&gt;==9 &amp;amp;&amp;amp; &lt;span style=&quot;color: #0023c7;&quot;&gt;i3&lt;/span&gt;==9 &amp;amp;&amp;amp; &lt;span style=&quot;color: #0023c7;&quot;&gt;i4&lt;/span&gt;==9))&lt;span style=&quot;color: #0023c7;&quot;&gt;i4&lt;/span&gt;++;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #0023c7;&quot;&gt;i4&lt;/span&gt;&amp;gt;9) {&lt;span style=&quot;color: #0023c7;&quot;&gt;i3&lt;/span&gt;++;&lt;span style=&quot;color: #0023c7;&quot;&gt;i4&lt;/span&gt;=0;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #0023c7;&quot;&gt;i3&lt;/span&gt;&amp;gt;9) {&lt;span style=&quot;color: #0023c7;&quot;&gt;i2&lt;/span&gt;++;&lt;span style=&quot;color: #0023c7;&quot;&gt;i3&lt;/span&gt;=0;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #0023c7;&quot;&gt;i2&lt;/span&gt;&amp;gt;9) {&lt;span style=&quot;color: #0023c7;&quot;&gt;i1&lt;/span&gt;++;&lt;span style=&quot;color: #0023c7;&quot;&gt;i2&lt;/span&gt;=0;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt4&lt;/span&gt;.setText((&lt;span style=&quot;color: #0023c7;&quot;&gt;i4&lt;/span&gt;%10)+&lt;span style=&quot;color: #382ffa;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt3&lt;/span&gt;.setText((&lt;span style=&quot;color: #0023c7;&quot;&gt;i3&lt;/span&gt;%10)+&lt;span style=&quot;color: #382ffa;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt2&lt;/span&gt;.setText((&lt;span style=&quot;color: #0023c7;&quot;&gt;i2&lt;/span&gt;%10)+&lt;span style=&quot;color: #382ffa;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt1&lt;/span&gt;.setText((&lt;span style=&quot;color: #0023c7;&quot;&gt;i1&lt;/span&gt;%10)+&lt;span style=&quot;color: #382ffa;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #9a1867;&quot;&gt;void&lt;/span&gt; clearingNumber() {&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt; != &lt;span style=&quot;color: #9a1867;&quot;&gt;null&lt;/span&gt;) &lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt;.release();&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #9a1867;&quot;&gt;try&lt;/span&gt; {&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt; = MediaPlayer.create(&lt;span style=&quot;color: #9a1867;&quot;&gt;this&lt;/span&gt;, R.raw.&lt;span style=&quot;color: #0023c7;&quot;&gt;stapler&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;mp&lt;/span&gt;.start();&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} &lt;span style=&quot;color: #9a1867;&quot;&gt;catch&lt;/span&gt; (Exception e) {&lt;/div&gt;
&lt;div style=&quot;color: #429073; font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;// &lt;span style=&quot;color: #8dafc9;&quot;&gt;TODO&lt;/span&gt;: handle exception&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;e.printStackTrace();&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;i1&lt;/span&gt;=0;&lt;span style=&quot;color: #0023c7;&quot;&gt;i2&lt;/span&gt;=0;&lt;span style=&quot;color: #0023c7;&quot;&gt;i3&lt;/span&gt;=0;&lt;span style=&quot;color: #0023c7;&quot;&gt;i4&lt;/span&gt;=0;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt1&lt;/span&gt;.setText(&lt;span style=&quot;color: #0023c7;&quot;&gt;i1&lt;/span&gt;+&lt;span style=&quot;color: #382ffa;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt2&lt;/span&gt;.setText(&lt;span style=&quot;color: #0023c7;&quot;&gt;i2&lt;/span&gt;+&lt;span style=&quot;color: #382ffa;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt3&lt;/span&gt;.setText(&lt;span style=&quot;color: #0023c7;&quot;&gt;i3&lt;/span&gt;+&lt;span style=&quot;color: #382ffa;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #0023c7;&quot;&gt;txt4&lt;/span&gt;.setText(&lt;span style=&quot;color: #0023c7;&quot;&gt;i4&lt;/span&gt;+&lt;span style=&quot;color: #382ffa;&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, serif; font-size: medium; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial; font-size: 130%;&quot;&gt;OK!!! It&#39;s done! Now, run the project and test it. Click on Count Button to increase the number and Clear Button to reset the counter. Have fun!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 16px;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYqNaNY3RmXOwwb-wjd4zGfEOqF_iR6LfFpC0zU7JAy66a3l76maXLsWyxbTrtIUQndOZr2EGVGtDWCa95jFSDEvshL6esa8sroY0Jr9z0QBnA4zO9viqSirVGU2NxlQT1_aOKT1nadI2r/s1600/run.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5688244668621494130&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYqNaNY3RmXOwwb-wjd4zGfEOqF_iR6LfFpC0zU7JAy66a3l76maXLsWyxbTrtIUQndOZr2EGVGtDWCa95jFSDEvshL6esa8sroY0Jr9z0QBnA4zO9viqSirVGU2NxlQT1_aOKT1nadI2r/s400/run.png&quot; style=&quot;cursor: pointer; display: block; height: 300px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial; font-size: 180%;&quot;&gt;&lt;b&gt;-&lt;a href=&quot;http://www.facebook.com/KUMAUZAKI&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3366ff;&quot;&gt;vyppN&lt;/span&gt;&lt;/a&gt;-&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 16px;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://md-android.blogspot.com/feeds/9107463707249598264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://md-android.blogspot.com/2011/12/create-android-counter-clicker-app.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2354683670428034657/posts/default/9107463707249598264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2354683670428034657/posts/default/9107463707249598264'/><link rel='alternate' type='text/html' href='http://md-android.blogspot.com/2011/12/create-android-counter-clicker-app.html' title='Create a simple Android Counter Clicker App'/><author><name>vyppN</name><uri>http://www.blogger.com/profile/18303705882641189214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='19' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjASZEtR7pgRkHo_WuKeEvZmhFRYNg2re_of2DNTaSRSyx5pZvnMYPa7RCzODm1jcYAoCMs77EKo0hJ724Rjq36IYG_LT7uNT6p6gl7FhhQiuifNjmSe2TerW14q5DxeWA/s220/chefdick_big.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifqxLXs_vA2_KwFaY2s1NtDUgdMbMYrLspoz92m0WmbnckHU3JD6B4UJ5Q5Jr-WSKrk4pxK6s0NbkvSkBwMEUTurGGqm6M_wpjWXwBDsfU5Zdqnlo98G4BKgWWMB8SG4GtoTO8g2uQoioW/s72-c/tally-counter-scenic.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2354683670428034657.post-993546963080344792</id><published>2011-12-19T23:49:00.000-08:00</published><updated>2011-12-20T10:11:53.436-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="a"/><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="android app"/><category scheme="http://www.blogger.com/atom/ns#" term="android develop"/><category scheme="http://www.blogger.com/atom/ns#" term="android tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="basic android"/><title type='text'>Create Your Beyond First Android App (Part 2)</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgyGfvuzVg2HK2iWXyu-vW96E5dJXk7hKweepzOL0EQ_qu4pdDmbRMadJksmFWyQdmJivs3Too17_6lWq0Zg4fsHKCm_WTKiWNKVFeYEucGVesRFq4unbm_YBCeH4eSVCZ_THzkNr7RWDP/s1600/android-vpn.jpg&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5688121961945646898&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgyGfvuzVg2HK2iWXyu-vW96E5dJXk7hKweepzOL0EQ_qu4pdDmbRMadJksmFWyQdmJivs3Too17_6lWq0Zg4fsHKCm_WTKiWNKVFeYEucGVesRFq4unbm_YBCeH4eSVCZ_THzkNr7RWDP/s400/android-vpn.jpg&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 250px; margin: 0px auto 10px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #33ccff; font-size: 180%;&quot;&gt;Hello&lt;/span&gt; again! Welcome to part 2 of this tutorial. Now, we will learn about Connecting UI control, Intent, Thread, and MediaPlayer&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #009900; font-size: 130%;&quot;&gt;1. Connect UI to Code&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt; If you want to take control with your Button, TextView, EditText, etc. You can use this instantiate:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;Object UI name = (Object UI)findViewById(resource);&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;example:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Button  myButton = (Button)findViewById(R.id.button1);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The example means that when you want to connect an UI component. You must create an Object to connect with your UI base on your component type. From the example: I want to connect button1 to code. So, I create a Button object named myButton that refers to the button1.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;Note: You can explore the resource name in /gen/your package/R.java (Click on the triangle)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Look for the code from part1, I use Button to create Intent to navigate to another activity and run a new Thread to play sound at the same time.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;b&gt;btnCon = (Button)findViewById(R.id.btnCon);&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;btnCon.setOnClickListener(new View.OnClickListener() {&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;@Override&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;public void onClick(View v) {&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;// TODO Auto-generated method stub&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;});&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;I call the method &lt;i&gt;setOnClickListener()&lt;/i&gt; from Button object and set listener to detect clicking for my btnCon button and then eclipse does auto implement &lt;i&gt;onClick()&lt;/i&gt; method for me to take control the button.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #009900; font-size: 130%;&quot;&gt;2. Intent&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Intent is the Navigator between two Activities. When Intent started, it stops current activity and calls new activity to display. When back button pressed it stops and destroys the new activity and restarts the previous activity to show again.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;From part one when button was clicked:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Intent i = new Intent(getApplicationContext(),HelloAgain.class);&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;startActivity(i);&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt; This will create an Intent name i and navigate to &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;HelloAgain.class&lt;/span&gt;&lt;/i&gt; but it’s not fired yet then I use method &lt;i&gt;startActivity(i)&lt;/i&gt; to fire the activity i to start HelloAgain Activity&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #009900; font-size: 130%;&quot;&gt;3.Thread&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;At the same time with 2. I create a new Thread to play a sound. Thread is the thing that run method or make method works. In Java the method &lt;i&gt;main()&lt;/i&gt; was run by main thread, but we can create a new thread to parallel run another method at the same time with &lt;i&gt;main() &lt;/i&gt;method. This is useful with a method that consume time to wait. Imagine to when you make your breakfast if you cooking like a single thread program you may follow this &lt;i&gt;step -- make toasts -- wait -- boil eggs -- wait -- boil water -- wait -- make coffee&lt;/i&gt;, so on. But if you do it in Multi-Thread &lt;i&gt;you can make toasts, boil water and egg in the same time&lt;/i&gt; and only wait for make a coffee.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;new Thread(new Runnable() {&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;public void run() {&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;      &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}).start();&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;To start a new thread I create a runnable thread and call &lt;i&gt;start()&lt;/i&gt; method to start a new thread. you can add method in &lt;i&gt;run()&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;color: #009900; font-size: 130%; letter-spacing: 0px;&quot;&gt;&lt;b&gt;4. Media Player&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Like it’s name, Media Player is for play medias. It can play both video and audio but at this time I will only show you only audio playing.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;MediaPlayer mp = MediaPlayer.create(getApplicationContext(), R.raw.ring);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Simple to use, I create an Object in MediaPlayer type and name it as mp. Next, I connect it to resource file in &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;/res/raw/ring.mp3&lt;/span&gt;&lt;/i&gt; (eclipse will auto generate code to R.raw.ring) and then, my mp is ready to use&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mp.start();&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;To use the mp, just call &lt;i&gt;start()&lt;/i&gt; method and the sound will be play, nice and easy!!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;note: the code mp.releash(); is use for free resource if mp is already have data. This method uses to free &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;memory for system performance.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 18.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 16.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: 14.0px Arial; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;
&lt;span style=&quot;letter-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;This tutorial is end. If you have any question please fell free to ask me. And... yeah.. sorry to my bad English skill...&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://md-android.blogspot.com/feeds/993546963080344792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://md-android.blogspot.com/2011/12/create-your-beyond-first-android-app_19.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2354683670428034657/posts/default/993546963080344792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2354683670428034657/posts/default/993546963080344792'/><link rel='alternate' type='text/html' href='http://md-android.blogspot.com/2011/12/create-your-beyond-first-android-app_19.html' title='Create Your Beyond First Android App (Part 2)'/><author><name>vyppN</name><uri>http://www.blogger.com/profile/18303705882641189214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='19' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjASZEtR7pgRkHo_WuKeEvZmhFRYNg2re_of2DNTaSRSyx5pZvnMYPa7RCzODm1jcYAoCMs77EKo0hJ724Rjq36IYG_LT7uNT6p6gl7FhhQiuifNjmSe2TerW14q5DxeWA/s220/chefdick_big.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgyGfvuzVg2HK2iWXyu-vW96E5dJXk7hKweepzOL0EQ_qu4pdDmbRMadJksmFWyQdmJivs3Too17_6lWq0Zg4fsHKCm_WTKiWNKVFeYEucGVesRFq4unbm_YBCeH4eSVCZ_THzkNr7RWDP/s72-c/android-vpn.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2354683670428034657.post-6420596174253992839</id><published>2011-12-19T02:13:00.000-08:00</published><updated>2011-12-20T10:14:01.986-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="android app"/><category scheme="http://www.blogger.com/atom/ns#" term="android develop"/><category scheme="http://www.blogger.com/atom/ns#" term="android tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="basic android"/><title type='text'>Create Your Beyond First Android App (Part 1)</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFihpnH7iiGxN5v4GxSBK5dqa9uhpcZz7ZhbF7smRqZOEXqKkrnaghw_4mByB84G_2L1VG6jdeXqDIyid4SFSVhULfu772qhNmLhWDoiM7nohU4WIsiy3-u34wJ1w-fRXHf-1fMUhJzYMH/s1600/Screen+Shot+2011-12-19+at+5.46.10+PM.png&quot;&gt;&lt;img alt=&quot;android&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5687789802535029202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFihpnH7iiGxN5v4GxSBK5dqa9uhpcZz7ZhbF7smRqZOEXqKkrnaghw_4mByB84G_2L1VG6jdeXqDIyid4SFSVhULfu772qhNmLhWDoiM7nohU4WIsiy3-u34wJ1w-fRXHf-1fMUhJzYMH/s400/Screen+Shot+2011-12-19+at+5.46.10+PM.png&quot; style=&quot;cursor: pointer; display: block; height: 229px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXDbwTjIZ4mnKSgciE3pVS7MCseGEwmLwgcqkxPmEKIrzmWd39MYNx5jOciBD9LCLEVzvuIltiaBf8zm7i4yYmNqWnCIv10pe3sXiQk5PzFuwv7mUswSMD2gcC3OJ4mptkqjY60XZ9b2RB/s1600/Screen+Shot+2011-12-19+at+5.46.10+PM.png&quot;&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #33ccff; font-size: large;&quot;&gt;This&lt;/span&gt; is my first article about android application development. When you read the phrase &quot;Your first app&quot;, you&#39;ll say anything in your mind like &quot;I think this must be &quot;Hello World!!&quot; for sure&quot;. Don&#39;t worry about this. The Hello World was boring me too! So, I&#39;ll let get start with a beyond Hello World app. (but it&#39;s still Hello Word lol)&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;In this project we will create an app that contain a Button and a TextView. When you click on the button it&#39;ll change to another screen that have a &quot;Hello My Friend!!&quot; text and play some sound. Interesting?&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600; font-family: &#39;trebuchet ms&#39;;&quot;&gt;Download &lt;b&gt;Android&lt;/b&gt; Sample Code &lt;a href=&quot;http://www.blogger.com/www.massdstudio.com/downloads/android/Hellofriend.zip&quot;&gt;Here&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #33ccff; font-family: &#39;trebuchet ms&#39;; font-size: large;&quot;&gt;&lt;b&gt;This Article You Will Learn:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;How to connect UI to your code&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;How to use Intent to start new Activity&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;How to Multithread programming&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;How to play a sound&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;i&gt;Ok, let&#39;s move on...&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;And... Hey! I&#39;ll never tell you about how to install the Android SDK or Setting up your work environment because you can find it in various site on the internet just ask &lt;a href=&quot;http://www.google.com/&quot; style=&quot;text-decoration: none;&quot;&gt;Google&lt;/a&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt;Using eclipse. First,&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;;&quot;&gt; Create a new Android Project named &quot;HelloFriend&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #009900; font-family: &#39;trebuchet ms&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-text-decorations-in-effect: underline; color: #0000ee; font-family: Georgia, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFihpnH7iiGxN5v4GxSBK5dqa9uhpcZz7ZhbF7smRqZOEXqKkrnaghw_4mByB84G_2L1VG6jdeXqDIyid4SFSVhULfu772qhNmLhWDoiM7nohU4WIsiy3-u34wJ1w-fRXHf-1fMUhJzYMH/s1600/Screen+Shot+2011-12-19+at+5.46.10+PM.png&quot;&gt;&lt;img alt=&quot;android&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5687789802535029202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFihpnH7iiGxN5v4GxSBK5dqa9uhpcZz7ZhbF7smRqZOEXqKkrnaghw_4mByB84G_2L1VG6jdeXqDIyid4SFSVhULfu772qhNmLhWDoiM7nohU4WIsiy3-u34wJ1w-fRXHf-1fMUhJzYMH/s400/Screen+Shot+2011-12-19+at+5.46.10+PM.png&quot; style=&quot;cursor: pointer; display: block; height: 229px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
I use android platform 2.3.3 (API level 10) and set package name to &quot;com.massdstu.hello&quot;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX1mLAXCgh21P3o9eLbGJQtLqAsiXCwfXc-uWJsDl0irIybA5EIFPkun9wSXRJCNV9UQe7A76pgZ98-IRgSbWnw24I9KMGR1CVre-_PzssvQVVFlBZnKmk5bahW7Lu_Y3_0ODK64iXJKq5/s1600/01.png&quot;&gt;&lt;img alt=&quot;android&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5687792362349331874&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX1mLAXCgh21P3o9eLbGJQtLqAsiXCwfXc-uWJsDl0irIybA5EIFPkun9wSXRJCNV9UQe7A76pgZ98-IRgSbWnw24I9KMGR1CVre-_PzssvQVVFlBZnKmk5bahW7Lu_Y3_0ODK64iXJKq5/s400/01.png&quot; style=&quot;cursor: pointer; display: block; height: 229px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
Next, open &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;main.xml &lt;/span&gt;&lt;/i&gt;in Package Explorer and edit code like this below then you will get an UI with one TextView and one Button&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWXqL7R7AirewgxDQOY9uIkHbJewFCm9M1K3jiP5Jd66bBaCiGBuXceVQr03ccE8bnWiVyO_79qhSFGUOd1bxEIZ1l3i3V1E3SPEk8LyXtgP_OiXxTBnVP_4CtdQbsjP_LSZNa8jRxoLaI/s1600/02.png&quot;&gt;&lt;img alt=&quot;android&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5687841926797731490&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWXqL7R7AirewgxDQOY9uIkHbJewFCm9M1K3jiP5Jd66bBaCiGBuXceVQr03ccE8bnWiVyO_79qhSFGUOd1bxEIZ1l3i3V1E3SPEk8LyXtgP_OiXxTBnVP_4CtdQbsjP_LSZNa8jRxoLaI/s400/02.png&quot; style=&quot;cursor: pointer; display: block; height: 181px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
Next, make a copy of &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;main.xml&lt;/span&gt;&lt;/i&gt; and rename it to &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;main2.xml&lt;/span&gt;&lt;/i&gt; in the same folder (/res/layout) and edit code like the below&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBjiKZYwNQ-ghD8EnUx5eD6RyNobctaSpXsSZdm7MNZV4cM1siN8or-g_pryDAGpY-1L2wkPSMkEtIsKbGp-dyTMD75AyeJqHUb1DRL4XWsyncnqKWQ5zcCjCuqfxs-dtNWR79VBZZtOM5/s1600/Screen+Shot+2011-12-19+at+9.33.15+PM.png&quot;&gt;&lt;img alt=&quot;android&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5687847702857951490&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBjiKZYwNQ-ghD8EnUx5eD6RyNobctaSpXsSZdm7MNZV4cM1siN8or-g_pryDAGpY-1L2wkPSMkEtIsKbGp-dyTMD75AyeJqHUb1DRL4XWsyncnqKWQ5zcCjCuqfxs-dtNWR79VBZZtOM5/s400/Screen+Shot+2011-12-19+at+9.33.15+PM.png&quot; style=&quot;cursor: pointer; display: block; height: 157px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Next, Create a class named &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600; font-style: italic;&quot;&gt;&quot;HelloAgain.java&quot; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;and edit code like the below:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD02bNcAThWBO8lNNgjpjhNZIMNkvQnhTYcuLYTP9u4_Nang2bMHfsKOwhn342I9nLIg5AhMS6Id1_8tZyve5BYhp_P-HG1wayIyW-0syuozr-f3AN0fsaNJAjMD6nt66PCrJXeqoSLRlI/s1600/Screen+Shot+2011-12-19+at+9.28.17+PM.png&quot;&gt;&lt;img alt=&quot;android&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5687846406569311986&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD02bNcAThWBO8lNNgjpjhNZIMNkvQnhTYcuLYTP9u4_Nang2bMHfsKOwhn342I9nLIg5AhMS6Id1_8tZyve5BYhp_P-HG1wayIyW-0syuozr-f3AN0fsaNJAjMD6nt66PCrJXeqoSLRlI/s400/Screen+Shot+2011-12-19+at+9.28.17+PM.png&quot; style=&quot;cursor: pointer; display: block; height: 299px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjesJIvqXwdYWiW9dxIFr5fuJWcJj29FyhrO9uvHQNTtsZ0QP39r9kyUUcXxbKidqLRlRLFbGzuWhlhwPRWVZg2rLqnImoVpylhgw6qcHub6Ku7C-qGuhWShyfo1R0iNbx3TMkQeHtVmUGu/s1600/Screen+Shot+2011-12-19+at+9.34.50+PM.png&quot;&gt;&lt;img alt=&quot;android&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5687848076168373922&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjesJIvqXwdYWiW9dxIFr5fuJWcJj29FyhrO9uvHQNTtsZ0QP39r9kyUUcXxbKidqLRlRLFbGzuWhlhwPRWVZg2rLqnImoVpylhgw6qcHub6Ku7C-qGuhWShyfo1R0iNbx3TMkQeHtVmUGu/s400/Screen+Shot+2011-12-19+at+9.34.50+PM.png&quot; style=&quot;cursor: pointer; display: block; height: 212px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This project has more than one activity. So, we must add activity to &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;AndroidManifest.xml&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd7nmwct5RN2Lyiqh2vrl1wkEV7GTK_srHpHB7fyGafAqOXlFaQeBG_oK4Iu6OKUrx5d__LN7ulFlw8RQgXZUm4In-eFe9Pn-weQWzNiKzvwmxYIDJms4Li6ki-3a2VWgPCQdTHBxo0m2u/s1600/Screen+Shot+2011-12-19+at+9.38.38+PM.png&quot;&gt;&lt;img alt=&quot;android&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5687848988757580338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd7nmwct5RN2Lyiqh2vrl1wkEV7GTK_srHpHB7fyGafAqOXlFaQeBG_oK4Iu6OKUrx5d__LN7ulFlw8RQgXZUm4In-eFe9Pn-weQWzNiKzvwmxYIDJms4Li6ki-3a2VWgPCQdTHBxo0m2u/s400/Screen+Shot+2011-12-19+at+9.38.38+PM.png&quot; style=&quot;cursor: pointer; display: block; height: 280px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Ok! it&#39;s nearly done, first, create a folder name it as &quot;raw&quot; under &quot;/res&quot; folder and download &lt;a href=&quot;http://www.massdstudio.com/downloads/sound/ring.mp3&quot;&gt;this sound&lt;/a&gt; and put it in raw folder. &lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Then, open &lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #ff6600;&quot;&gt;HelloFriendActivity.java&lt;/span&gt;&lt;/i&gt; and edit the code:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
package com.massdstu.hello;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
import android.app.Activity;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
import android.content.Intent;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
import android.media.MediaPlayer;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
import android.os.Bundle;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
import android.view.View;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
import android.widget.Button;&lt;/div&gt;
&lt;div style=&quot;font: 11.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 15.0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
public class HellofriendActivity extends Activity {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
/** Called when the activity is first created. */&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Button btnCon;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MediaPlayer mp;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@Override&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
public void onCreate(Bundle savedInstanceState) {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
super.onCreate(savedInstanceState);&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
setContentView(R.layout.main);&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 15px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
btnCon = (Button)findViewById(R.id.btnCon);&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
btnCon.setOnClickListener(new View.OnClickListener() {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 15px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;@Override&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;public void onClick(View v) {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;// TODO Auto-generated method stub&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if (mp != null)&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;    &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mp.release();&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 15px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;new Thread(new Runnable() {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;public void run() {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;try {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;    &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mp =&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;MediaPlayer.create(getApplicationContext(),R.raw.ring);&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;    &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mp.start();&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;    &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;} catch (Exception e) {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;e.printStackTrace();&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;      &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}).start();&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Intent i = new Intent(getApplicationContext(),HelloAgain.class);&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;startActivity(i);&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;});&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 15px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 11px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Yeah!! &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #33ccff; font-size: 180%;&quot;&gt;It&#39;s done!!!&lt;/span&gt; Then, let&#39;s run this application by press Run button or command +  Fn + Shift+ F11 key (in OSX). While application run you&#39;ll see text &quot;Hello World&quot; and a continue button. If you click on the button, you&#39;ll here a ring sound and it&#39;ll bring you to the second screen that have a text &quot;Hello My Friends&quot;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;This is The first part of the project. In the second part I&#39;ll explain you about What you are coding in this app. See you in next part.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
- &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #33ccff;&quot;&gt;&lt;a href=&quot;http://www.facebook.com/KUMAUZAKI&quot; style=&quot;text-decoration: none;&quot;&gt;vyppN&lt;/a&gt;&lt;/span&gt;-&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://md-android.blogspot.com/feeds/6420596174253992839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://md-android.blogspot.com/2011/12/create-your-beyond-first-android-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2354683670428034657/posts/default/6420596174253992839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2354683670428034657/posts/default/6420596174253992839'/><link rel='alternate' type='text/html' href='http://md-android.blogspot.com/2011/12/create-your-beyond-first-android-app.html' title='Create Your Beyond First Android App (Part 1)'/><author><name>vyppN</name><uri>http://www.blogger.com/profile/18303705882641189214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='19' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjASZEtR7pgRkHo_WuKeEvZmhFRYNg2re_of2DNTaSRSyx5pZvnMYPa7RCzODm1jcYAoCMs77EKo0hJ724Rjq36IYG_LT7uNT6p6gl7FhhQiuifNjmSe2TerW14q5DxeWA/s220/chefdick_big.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFihpnH7iiGxN5v4GxSBK5dqa9uhpcZz7ZhbF7smRqZOEXqKkrnaghw_4mByB84G_2L1VG6jdeXqDIyid4SFSVhULfu772qhNmLhWDoiM7nohU4WIsiy3-u34wJ1w-fRXHf-1fMUhJzYMH/s72-c/Screen+Shot+2011-12-19+at+5.46.10+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>