<?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-7394806078619892233</id><updated>2024-09-01T14:05:17.018-07:00</updated><category term="Android"/><category term="Java"/><title type='text'> Android and Java</title><subtitle type='html'> This Blog Content Android And Java Application Program which is develop by me.&#xa;&#xa;All iz well</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-380684924303067666</id><published>2013-03-21T05:13:00.002-07:00</published><updated>2013-03-21T05:16:51.886-07:00</updated><title type='text'>Audio Recording in Android</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;u&gt;Simple State Diagram for Media Recorder...&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7irfpYvMSFJ4N2X0lkawnRY5Tx0pqRdOE1jGV6ueplX1t3nj8207HazqQp1-j4wZr0Vm5DN9kQYOLaHKsCu3ae91cXIAXmxzAKcZxPL5AVVifwbRRe2sr8h1I96hZEpfN1LG818FGk70/s1600/mediarecorde.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7irfpYvMSFJ4N2X0lkawnRY5Tx0pqRdOE1jGV6ueplX1t3nj8207HazqQp1-j4wZr0Vm5DN9kQYOLaHKsCu3ae91cXIAXmxzAKcZxPL5AVVifwbRRe2sr8h1I96hZEpfN1LG818FGk70/s1600/mediarecorde.png&quot; height=&quot;319&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Here&amp;nbsp;Sequence of Method call is as per state diagram of media Recorder .... Otherwise Invalid sate call Error will be Occur........&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;b&gt;1) Also her two permission add in Android manifest file&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2) This is java file coding&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;audiorecording.java&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package com.example.recording;&lt;br /&gt;
&lt;br /&gt;
import java.io.File;&lt;br /&gt;
import java.io.FileDescriptor;&lt;br /&gt;
&lt;br /&gt;
import android.media.MediaRecorder;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.os.Environment;&lt;br /&gt;
import android.provider.MediaStore;&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.app.AlertDialog;&lt;br /&gt;
import android.app.Dialog;&lt;br /&gt;
import android.content.DialogInterface;&lt;br /&gt;
import android.view.Menu;&lt;br /&gt;
import android.view.MenuItem;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
import android.support.v4.app.NavUtils;&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; O@K Tech....&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public class audiorecording extends Activity implements OnClickListener {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;Button start,stop,frmt; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private MediaRecorder rcorder = null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;private int opfrmt[] = {MediaRecorder.OutputFormat.MPEG_4,MediaRecorder.OutputFormat.THREE_GPP};&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;private int curfrmt = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;private String filextsn[] = {&quot;.mp4&quot;,&quot;.3gp&quot;};&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.activity_recording);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start = (Button)findViewById(R.id.button1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stop = (Button)findViewById(R.id.button2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; frmt = (Button)findViewById(R.id.button3);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stop.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; frmt.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public boolean onCreateOptionsMenu(Menu menu) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getMenuInflater().inflate(R.menu.activity_recording, menu);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;switch (v.getId()) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;case R.id.button1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;Recoding start&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;startrecording();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;case R.id.button2:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;Recoding stop&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;stoprecording();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;case R.id.button3:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;format check&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;showDialog(1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;break;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;default:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private void stoprecording() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;stop recoding method&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(rcorder != null)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;rcorder.stop();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;rcorder.reset();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;rcorder.release();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;rcorder = null;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private void startrecording() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;startrecoding method&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;rcorder = new MediaRecorder();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; rcorder.setAudioSource(MediaRecorder.AudioSource.MIC);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; rcorder.setOutputFormat(opfrmt[curfrmt]);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; rcorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; rcorder.setOutputFile(getfilepath());&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; rcorder.prepare();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; rcorder.start();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (Exception e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String getfilepath() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;getfile path method&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String filepath = Environment.getExternalStorageDirectory().getAbsolutePath();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;File file = new File(filepath, &quot;recodingfile&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(!file.exists())&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;file.mkdir();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return(file.getAbsolutePath() + &quot;/&quot; + System.currentTimeMillis() + filextsn[curfrmt]);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; @Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;protected Dialog onCreateDialog(int id) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; System.out.println(&quot;oncreate dialog&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; AlertDialog.Builder albuilddlg = new AlertDialog.Builder(this);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; String frmt[] = {&quot;mp4&quot;,&quot;3gp&quot;};&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; albuilddlg.setTitle(&quot;Select Format.....&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; albuilddlg.setSingleChoiceItems(frmt, curfrmt, new DialogInterface.OnClickListener() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;public void onClick(DialogInterface dialog, int which) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; curfrmt = which;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;});&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return albuilddlg.create();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
3).Xml file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; xmlns:tools=&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;match_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;match_parent&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignParentBottom=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignParentLeft=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Start&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button2&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignParentBottom=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_toRightOf=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Stop&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button3&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignParentBottom=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_toRightOf=&quot;@+id/button2&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Change Format&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;ImageView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/imageView1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_above=&quot;@+id/button2&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_centerHorizontal=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginBottom=&quot;138dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:src=&quot;@drawable/audio&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/RelativeLayout&amp;gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
&lt;a href=&quot;https://docs.google.com/file/d/0B2B2Mim6OpFfU3RRS1pvZEZUek0/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;Download This Project click here....&lt;/b&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
out put of this porgram&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhPg-pEqbJHXqPPa-CuJPXehQpESaB1pp8B1kqNrmh1jNquQmXaA1ep_hup-rCJcPbKtZimQ5Rk4h9eb8ncSTU3XnIcCh18kG9XT_XuDfTAQZg-okcMdoV10XhJDOAwT8aCo7XaHQ41CQ/s1600/output.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhPg-pEqbJHXqPPa-CuJPXehQpESaB1pp8B1kqNrmh1jNquQmXaA1ep_hup-rCJcPbKtZimQ5Rk4h9eb8ncSTU3XnIcCh18kG9XT_XuDfTAQZg-okcMdoV10XhJDOAwT8aCo7XaHQ41CQ/s1600/output.png&quot; height=&quot;320&quot; width=&quot;197&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
All iz well&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
OAK Tech.......&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/380684924303067666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2013/03/audio-recording-in-android.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/380684924303067666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/380684924303067666'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2013/03/audio-recording-in-android.html' title='Audio Recording in Android'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7irfpYvMSFJ4N2X0lkawnRY5Tx0pqRdOE1jGV6ueplX1t3nj8207HazqQp1-j4wZr0Vm5DN9kQYOLaHKsCu3ae91cXIAXmxzAKcZxPL5AVVifwbRRe2sr8h1I96hZEpfN1LG818FGk70/s72-c/mediarecorde.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-1345742158918556663</id><published>2013-01-08T02:57:00.001-08:00</published><updated>2013-01-08T02:57:08.227-08:00</updated><title type='text'>How To Make Jar file From .java File</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;u&gt;Follow the Below Steps for Make .jar file from Java&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
Creating a jar File in Command Prompt&lt;br /&gt;
&lt;br /&gt;
Start Command Prompt.&lt;br /&gt;
Navigate to the folder that holds your class files:&lt;br /&gt;
C:\&amp;gt;cd \mywork&lt;br /&gt;
Compile your class(es):&lt;br /&gt;
C:\mywork&amp;gt; javac *.java&lt;br /&gt;
Create a manifest file:&lt;br /&gt;
C:\mywork&amp;gt; echo Main-Class: DanceStudio &amp;gt;manifest.txt&lt;br /&gt;
Create a jar file:&lt;br /&gt;
C:\mywork&amp;gt; jar cvfm DanceStudio.jar manifest.txt *.class&lt;br /&gt;
Test your jar:&lt;br /&gt;
C:\mywork&amp;gt; DanceStudio.jar&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/1345742158918556663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2013/01/how-to-make-jar-file-from-java-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/1345742158918556663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/1345742158918556663'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2013/01/how-to-make-jar-file-from-java-file.html' title='How To Make Jar file From .java File'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-1938153095689895155</id><published>2013-01-05T21:14:00.000-08:00</published><updated>2013-01-05T21:17:53.811-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Calculator in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This is One simple calculator using java swing so.. enjoy it....&lt;br /&gt;
&lt;br /&gt;
her all buttons and textbox are put in panel so every row in calculator its separate on panel.&lt;br /&gt;
This calculator made by me during 7th semester.&lt;br /&gt;
&lt;br /&gt;
Realy java is my favourite Language . so&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Steps for run Below code:-&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;1) Copy below code in notepade&lt;br /&gt;
&amp;nbsp;2) Save this file as cal.java&lt;br /&gt;
&amp;nbsp;3) open cmd and goto path of cal.java&lt;br /&gt;
&amp;nbsp;4) Now Firts compile it using below command&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; javac cal.java&lt;br /&gt;
&amp;nbsp;5) and run it using following cammand&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java cal.java&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
File : cal.java&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;import java.awt.event.*;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;import javax.swing.*;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;import javax.swing.event.*;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;import java.awt.*;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;import java.applet.*;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;/*&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;lt;applet code=&quot;cal&quot; width=250 height=300&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;lt;/applet&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;*/&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;class calc extends JFrame implements ActionListener &amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;{ &amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;FlowLayout fl;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;GridLayout gr;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; JPanel p1,p2,p3,p4,p5,p6,p7,p8,p9;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;JButton b[],plus,eql,minus,mul,div,ce;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;JTextField t1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;int a,c,r=0;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;String s=&quot;&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;public calc()&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gr = new GridLayout(8,1);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setLayout(gr);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;fl = new FlowLayout(0);&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p1 = new JPanel();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;p1.setLayout(fl);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;t1 = new JTextField(15);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p1.add(t1);&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add(p1);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b = new JButton[10];&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for(int i=0;i&amp;lt;10;i++)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;b[i] = new JButton( &amp;nbsp; &amp;nbsp;String.valueOf(i) &amp;nbsp; &amp;nbsp;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p3 = new JPanel();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p3.setLayout(fl);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;plus = new JButton(&quot;+&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;plus.addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p3.add(plus);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ce = new JButton(&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp;CE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ce.addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p3.add(ce);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add(p3);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p4 = new JPanel();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p4.setLayout(fl);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mul = new JButton(&quot;* &quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mul.addActionListener(this);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p4.add(mul);&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;div = new JButton(&quot;/ &quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;div.addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p4.add(div);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;minus = new JButton(&quot; -&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;minus.addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p4.add(minus);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add(p4);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p5 = new JPanel();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p5.setLayout(fl);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p5.add( &amp;nbsp;b[7] &amp;nbsp;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[7].addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p5.add( &amp;nbsp;b[8] &amp;nbsp;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[8].addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p5.add( &amp;nbsp;b[9] &amp;nbsp;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[9].addActionListener(this); &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add(p5);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p6 = new JPanel();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p6.setLayout(fl);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p6.add(b[4]);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[4].addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p6.add(b[5]);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[5].addActionListener(this);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p6.add(b[6]);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[6].addActionListener(this);&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add(p6);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p7 = new JPanel();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p7.setLayout(fl);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p7.add(b[1]);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[1].addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p7.add(b[2]);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[2].addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p7.add(b[3]);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[3].addActionListener(this);&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add(p7);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p8 = new JPanel();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;p8.setLayout(fl);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p8.add(b[0]);&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b[0].addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;eql = new JButton(&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;eql.addActionListener(this);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p8.add(eql);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add(p8);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setTitle(&quot;O@K Tech. RVS&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setLocation(100,100);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setSize(200,300);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;setVisible(true);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setDefaultCloseOperation(EXIT_ON_CLOSE);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void actionPerformed(ActionEvent e)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for(int i=0; i&amp;lt;b.length; i++)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(e.getSource() == b[i])&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;switch(i)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 0:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;0&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 1:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;1&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 2:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;2&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 3:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;3&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 4:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;4&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 5:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;5&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 6:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;6&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 7:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;7&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 8:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=s+&quot;8&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;case 9:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;s=&quot;9&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;t1.setText(s);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(e.getSource() == plus)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;a=Integer.parseInt(s);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;s=&quot;&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;t1.setText(&quot;&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;r=1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else if(e.getSource() == minus)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;a=Integer.parseInt(s);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;s=&quot;&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;t1.setText(&quot;&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;r=2;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else if(e.getSource() == mul)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;a=Integer.parseInt(s);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;s=&quot;&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;t1.setText(&quot;&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;r=3;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else if(e.getSource() == div)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;a=Integer.parseInt(s);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;s=&quot;&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;t1.setText(&quot;&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;r=4;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else if(e.getSource() == ce)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;s=&quot;&quot;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;t1.setText(&quot;&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else if(e.getSource() == eql)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;switch(r)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 1:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;c = a + Integer.parseInt(t1.getText());&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 2:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;c = a - Integer.parseInt(t1.getText());&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 3:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;c = a * Integer.parseInt(t1.getText());&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;break;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 4:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;c = a / Integer.parseInt(t1.getText());&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;break;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;t1.setText(&quot;&quot;+c);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;public class cal&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;public static void main(String args[])&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;calc cl = new calc();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Output of Program:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3ggv0oQccIqkpkMYsAey7FlAjGcFiXntQOP8ajpd2krZ5n0tCBdCav3sCaXIMoRqlOqDV4hQ2cyzg0STmoMxBU_9_YOusO_KI68fsXoImslm8eW96uFpO4z2pPLiPKMdVH0k6HjtVhIA/s1600/Untitled2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;56&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3ggv0oQccIqkpkMYsAey7FlAjGcFiXntQOP8ajpd2krZ5n0tCBdCav3sCaXIMoRqlOqDV4hQ2cyzg0STmoMxBU_9_YOusO_KI68fsXoImslm8eW96uFpO4z2pPLiPKMdVH0k6HjtVhIA/s320/Untitled2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy-Z68fT5BCtssPR5vHnJlhCm4yRspHaxmSd7KL8SAww4Qqm6IWuzAEEM-R21LI6UeQDr7TYp4yrXRSBqDs61zfKIbBd9Sh_-C1gK18ZPm7OqZpUNHbTqNLM3JVvly4_zVB_3B26gK-_c/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy-Z68fT5BCtssPR5vHnJlhCm4yRspHaxmSd7KL8SAww4Qqm6IWuzAEEM-R21LI6UeQDr7TYp4yrXRSBqDs61zfKIbBd9Sh_-C1gK18ZPm7OqZpUNHbTqNLM3JVvly4_zVB_3B26gK-_c/s1600/Untitled.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://docs.google.com/open?id=0B2B2Mim6OpFfc0NNMjJxcEM5RWc&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Download .jar file&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/1938153095689895155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2013/01/calculator-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/1938153095689895155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/1938153095689895155'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2013/01/calculator-in-java.html' title='Calculator in Java'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3ggv0oQccIqkpkMYsAey7FlAjGcFiXntQOP8ajpd2krZ5n0tCBdCav3sCaXIMoRqlOqDV4hQ2cyzg0STmoMxBU_9_YOusO_KI68fsXoImslm8eW96uFpO4z2pPLiPKMdVH0k6HjtVhIA/s72-c/Untitled2.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Surendranagar, Gujarat, India</georss:featurename><georss:point>22.7302078 71.63766940000005</georss:point><georss:box>22.671624299999998 71.556988400000051 22.7887913 71.718350400000048</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-1887229356512265875</id><published>2012-09-14T02:53:00.000-07:00</published><updated>2012-09-14T02:53:34.758-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Text To Speech Application in Android </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This Application Convert Text into Speech.... Enjoy it.....&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;https://docs.google.com/open?id=0B2B2Mim6OpFfY3hUV1ZIMWhKbDQ&quot; target=&quot;_blank&quot;&gt;Download Code (Click Here....)&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;&lt;a href=&quot;https://docs.google.com/open?id=0B2B2Mim6OpFfZVcyVjAtbEZWQ1E&quot; target=&quot;_blank&quot;&gt;Download .apk File For Android(2.2 upto) Mobile (Click Here...)&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Show in Bellow Code For TextToSpeech.java&lt;br /&gt;
&lt;br /&gt;
here use TextToSpeech Class for Access the functionality of conversion of text to speech...&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;setLanguage(Locale.ENGLISH);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; method is use for set language like us , uk etc.&lt;br /&gt;
&lt;br /&gt;
Also Call &lt;b&gt;shutdown() &lt;/b&gt;&amp;nbsp;method in &lt;b&gt;onDestroy() &lt;/b&gt;for release All TextToSpeech Objects.&lt;br /&gt;
&lt;br /&gt;
Show in Bellow .java code&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;1) First Create One XML file in which one TextView ,one EditText and one Button Show in Bellow Code&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; xmlns:tools=&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;match_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;match_parent&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/textView1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignParentTop=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_centerHorizontal=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginTop=&quot;88dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Text To Speech&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tools:context=&quot;.TextToSpeech&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;EditText&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/editText1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_below=&quot;@+id/textView1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_centerHorizontal=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginTop=&quot;47dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:ems=&quot;10&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_below=&quot;@+id/editText1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_centerHorizontal=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginTop=&quot;62dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;TextToSpeech Button&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/RelativeLayout&amp;gt;&lt;br /&gt;
&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;2)&amp;nbsp;TextToSpeech.java&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package com.example.texttospeech;&lt;br /&gt;
&lt;br /&gt;
import java.util.Locale;&lt;br /&gt;
&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.content.Intent;&lt;br /&gt;
import android.speech.tts.TextToSpeech.OnInitListener;&lt;br /&gt;
import android.util.Log;&lt;br /&gt;
import android.view.Menu;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
import android.widget.EditText;&lt;br /&gt;
import android.widget.Toast;&lt;br /&gt;
// O@K Tech.&lt;br /&gt;
public class TextToSpeech extends Activity {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EditText mSpeechText;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Button mSubmit;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;android.speech.tts.TextToSpeech ttos;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.activity_text_to_speech);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mSpeechText = (EditText)findViewById(R.id.editText1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mSubmit = (Button)findViewById(R.id.button1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mSubmit.setOnClickListener(new OnClickListener() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;@Override&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;speakEditText();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;});&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttos = new android.speech.tts.TextToSpeech(this,new OnInitListener() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;public void onInit(int status) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt; if(status == android.speech.tts.TextToSpeech.SUCCESS){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; int langSet = ttos.setLanguage(Locale.ENGLISH);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; if(langSet == android.speech.tts.TextToSpeech.LANG_NOT_SUPPORTED || langSet == android.speech.tts.TextToSpeech.LANG_MISSING_DATA){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;Log.e(&quot;TextToSpeech&quot;, &quot;Language is Not Support.&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;// Below Three Line is Optional so Comment it.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Intent inSp = new Intent();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;inSp.setAction(android.speech.tts.TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;startActivity(inSp);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; }&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; else{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt; mSubmit.setEnabled(true);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt; speakEditText();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; }&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt; }&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt; else{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; Log.e(&quot;TextToSpeech&quot;, &quot;TextToSpeech is not Init....&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt; }&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;});&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; protected void speakEditText() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; String txt = mSpeechText.getText().toString();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; ttos.speak(txt, android.speech.tts.TextToSpeech.QUEUE_FLUSH, null);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; Toast.makeText(this, &quot;Call SpeakEdit Method&quot;, Toast.LENGTH_LONG).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void onDestroy() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(ttos != null){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;ttos.stop();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;ttos.shutdown();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;super.onDestroy();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;3) OutPut Show in Bellow image..................&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyEC_xvPTfr8ndFXspbVmopsQb-mmou81wYK9nyNZWxdYORIiKV_DfLMMkl58Zk7E5anUwtUdn7tfx42eLvaI0L9blJuv2tZFqMeDShVLpOZHRSTn3UIQ8aryezYJay4FmBFmRQgwL920/s1600/Screenshot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyEC_xvPTfr8ndFXspbVmopsQb-mmou81wYK9nyNZWxdYORIiKV_DfLMMkl58Zk7E5anUwtUdn7tfx42eLvaI0L9blJuv2tZFqMeDShVLpOZHRSTn3UIQ8aryezYJay4FmBFmRQgwL920/s320/Screenshot.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.ravice.co.cc/&quot; target=&quot;_blank&quot;&gt;All iZ Well&lt;/a&gt;&lt;/b&gt;&lt;/h2&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/1887229356512265875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/09/text-to-speech-application-in-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/1887229356512265875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/1887229356512265875'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/09/text-to-speech-application-in-android.html' title='Text To Speech Application in Android '/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyEC_xvPTfr8ndFXspbVmopsQb-mmou81wYK9nyNZWxdYORIiKV_DfLMMkl58Zk7E5anUwtUdn7tfx42eLvaI0L9blJuv2tZFqMeDShVLpOZHRSTn3UIQ8aryezYJay4FmBFmRQgwL920/s72-c/Screenshot.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Ahmedabad, Gujarat, India</georss:featurename><georss:point>23.0395677 72.566004499999963</georss:point><georss:box>22.9220977 72.441739499999969 23.1570377 72.690269499999957</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-3581726169407028204</id><published>2012-09-12T05:59:00.001-07:00</published><updated>2012-09-12T06:01:15.612-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Animation Demo in Android(Tween Animation)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This Animation Demo.....&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt; &lt;a href=&quot;https://docs.google.com/open?id=0B2B2Mim6OpFfcUgtWW9tVGh4SVE&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Download This Code Click Here......&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; text-align: -webkit-auto;&quot;&gt;The view animation framework supports both tween and frame by frame animations, which can both be declared in XML. The following sections describe how to use both methods.&lt;/span&gt;&lt;br /&gt;
&lt;h3 id=&quot;Tween&quot; style=&quot;background-color: #f9f9f9; color: #333333; font-family: Roboto, sans-serif; font-size: 18px; line-height: 20px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; text-align: -webkit-auto;&quot;&gt;Tween animation&lt;/h3&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;An animation defined in XML that performs transitions such as rotating, fading, moving, and stretching on a graphic.&lt;/div&gt;&lt;dl class=&quot;xml&quot; style=&quot;background-color: #f9f9f9; text-align: -webkit-auto;&quot;&gt;&lt;dt style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;file location:&lt;/dt&gt;
&lt;dd style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;res/anim/&lt;em&gt;filename&lt;/em&gt;.xml&lt;/code&gt; The filename will be used as the resource ID.&lt;/dd&gt;
&lt;dt style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;compiled resource datatype:&lt;/dt&gt;
&lt;dd style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;Resource pointer to an&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/Animation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Animation&lt;/a&gt;&lt;/code&gt;.&lt;/dd&gt;
&lt;dt style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;resource reference:&lt;/dt&gt;
&lt;dd style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;In Java:&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;R.anim.&lt;em&gt;filename&lt;/em&gt;&lt;/code&gt; In XML:&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;@[&lt;em&gt;package&lt;/em&gt;:]anim/&lt;em&gt;filename&lt;/em&gt;&lt;/code&gt;&lt;/dd&gt;
&lt;dt style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;syntax:&lt;/dt&gt;
&lt;dd style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;pre class=&quot;stx prettyprint&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f7f7f7; background-image: initial; background-origin: initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #006600; font-size: 1em; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace; margin-bottom: 1em; margin-top: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;xml version&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; encoding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/resources/animation-resource.html#set-element&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;set&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;xmlns:android&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:interpolator&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;@[package:]anim/&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;interpolator_resource&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:shareInterpolator&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;[&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; | &lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;false&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;] &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/resources/animation-resource.html#alpha-element&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;alpha&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:fromAlpha&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:toAlpha&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/resources/animation-resource.html#scale-element&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;scale&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:fromXScale&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:toXScale&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:fromYScale&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:toYScale&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:pivotX&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:pivotY&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/resources/animation-resource.html#translate-element&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;translate&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:fromXDelta&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:toXDelta&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:fromYDelta&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:toYDelta&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/resources/animation-resource.html#rotate-element&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;rotate&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:fromDegrees&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:toDegrees&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:pivotX&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;color: #882288;&quot;&gt;android:pivotY&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;float&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;atv&quot; style=&quot;color: #008800;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/resources/animation-resource.html#set-element&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;set&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
        ...
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;lt;/set&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #000088;&quot;&gt;&amp;lt;/set&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;margin-top: 10px;&quot;&gt;The file must have a single root element: either an&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;alpha&amp;gt;&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;scale&amp;gt;&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;rotate&amp;gt;&lt;/code&gt;, or&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;set&amp;gt;&lt;/code&gt;element that holds a group (or groups) of other animation elements (even nested&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;set&amp;gt;&lt;/code&gt;&amp;nbsp;elements).&lt;/div&gt;&lt;/dd&gt;
&lt;dt style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;elements:&lt;/dt&gt;
&lt;dd style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;dl class=&quot;tag-list&quot;&gt;&lt;dt id=&quot;set-element&quot;&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;set&amp;gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;A container that holds other animation elements (&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;alpha&amp;gt;&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;scale&amp;gt;&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;rotate&amp;gt;&lt;/code&gt;) or other&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;set&amp;gt;&lt;/code&gt;&amp;nbsp;elements. Represents an&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/AnimationSet.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;AnimationSet&lt;/a&gt;&lt;/code&gt;.
&lt;div class=&quot;caps&quot; style=&quot;margin-top: 10px;&quot;&gt;attributes:&lt;/div&gt;&lt;dl class=&quot;atn-list&quot;&gt;&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:interpolator&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Interpolator resource&lt;/em&gt;. An&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/Interpolator.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Interpolator&lt;/a&gt;&lt;/code&gt;&amp;nbsp;to apply on the animation. The value must be a reference to a resource that specifies an interpolator (not an interpolator class name). There are default interpolator resources available from the platform or you can create your own interpolator resource. See the discussion below for more about&amp;nbsp;&lt;a href=&quot;http://developer.android.com/guide/topics/resources/animation-resource.html#Interpolators&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Interpolators&lt;/a&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:shareInterpolator&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Boolean&lt;/em&gt;. &quot;true&quot; if you want to share the same interpolator among all child elements.&lt;/dd&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt id=&quot;alpha-element&quot;&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;alpha&amp;gt;&lt;/code&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;A fade-in or fade-out animation. Represents an&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/AlphaAnimation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;AlphaAnimation&lt;/a&gt;&lt;/code&gt;.&lt;br /&gt;
&lt;div class=&quot;caps&quot; style=&quot;margin-top: 10px;&quot;&gt;attributes:&lt;/div&gt;&lt;dl class=&quot;atn-list&quot;&gt;&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:fromAlpha&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. Starting opacity offset, where 0.0 is transparent and 1.0 is opaque.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:toAlpha&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. Ending opacity offset, where 0.0 is transparent and 1.0 is opaque.&lt;/dd&gt;&lt;/dl&gt;&lt;div style=&quot;margin-top: 10px;&quot;&gt;For more attributes supported by&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;alpha&amp;gt;&lt;/code&gt;, see the&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/Animation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Animation&lt;/a&gt;&lt;/code&gt;&amp;nbsp;class reference (of which, all XML attributes are inherrited by this element).&lt;/div&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt id=&quot;scale-element&quot;&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;scale&amp;gt;&lt;/code&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;A resizing animation. You can specify the center point of the image from which it grows outward (or inward) by specifying&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;pivotX&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;pivotY&lt;/code&gt;. For example, if these values are 0, 0 (top-left corner), all growth will be down and to the right. Represents a&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/ScaleAnimation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;ScaleAnimation&lt;/a&gt;&lt;/code&gt;.&lt;br /&gt;
&lt;div class=&quot;caps&quot; style=&quot;margin-top: 10px;&quot;&gt;attributes:&lt;/div&gt;&lt;dl class=&quot;atn-list&quot;&gt;&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:fromXScale&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. Starting X size offset, where 1.0 is no change.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:toXScale&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. Ending X size offset, where 1.0 is no change.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:fromYScale&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. Starting Y size offset, where 1.0 is no change.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:toYScale&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. Ending Y size offset, where 1.0 is no change.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:pivotX&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. The X coordinate to remain fixed when the object is scaled.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:pivotY&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. The Y coordinate to remain fixed when the object is scaled.&lt;/dd&gt;&lt;/dl&gt;&lt;div style=&quot;margin-top: 10px;&quot;&gt;For more attributes supported by&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;scale&amp;gt;&lt;/code&gt;, see the&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/Animation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Animation&lt;/a&gt;&lt;/code&gt;&amp;nbsp;class reference (of which, all XML attributes are inherrited by this element).&lt;/div&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt id=&quot;translate-element&quot;&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;A vertical and/or horizontal motion. Supports the following attributes in any of the following three formats: values from -100 to 100 ending with &quot;%&quot;, indicating a percentage relative to itself; values from -100 to 100 ending in &quot;%p&quot;, indicating a percentage relative to its parent; a float value with no suffix, indicating an absolute value. Represents a&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/TranslateAnimation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;TranslateAnimation&lt;/a&gt;&lt;/code&gt;.&lt;br /&gt;
&lt;div class=&quot;caps&quot; style=&quot;margin-top: 10px;&quot;&gt;attributes:&lt;/div&gt;&lt;dl class=&quot;atn-list&quot;&gt;&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:fromXDelta&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float or percentage&lt;/em&gt;. Starting X offset. Expressed either: in pixels relative to the normal position (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5&quot;&lt;/code&gt;), in percentage relative to the element width (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%&quot;&lt;/code&gt;), or in percentage relative to the parent width (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%p&quot;&lt;/code&gt;).&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:toXDelta&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float or percentage&lt;/em&gt;. Ending X offset. Expressed either: in pixels relative to the normal position (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5&quot;&lt;/code&gt;), in percentage relative to the element width (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%&quot;&lt;/code&gt;), or in percentage relative to the parent width (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%p&quot;&lt;/code&gt;).&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:fromYDelta&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float or percentage&lt;/em&gt;. Starting Y offset. Expressed either: in pixels relative to the normal position (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5&quot;&lt;/code&gt;), in percentage relative to the element height (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%&quot;&lt;/code&gt;), or in percentage relative to the parent height (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%p&quot;&lt;/code&gt;).&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:toYDelta&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float or percentage&lt;/em&gt;. Ending Y offset. Expressed either: in pixels relative to the normal position (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5&quot;&lt;/code&gt;), in percentage relative to the element height (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%&quot;&lt;/code&gt;), or in percentage relative to the parent height (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%p&quot;&lt;/code&gt;).&lt;/dd&gt;&lt;/dl&gt;&lt;div style=&quot;margin-top: 10px;&quot;&gt;For more attributes supported by&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;, see the&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/Animation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Animation&lt;/a&gt;&lt;/code&gt;&amp;nbsp;class reference (of which, all XML attributes are inherrited by this element).&lt;/div&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt id=&quot;rotate-element&quot;&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;rotate&amp;gt;&lt;/code&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;A rotation animation. Represents a&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/RotateAnimation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;RotateAnimation&lt;/a&gt;&lt;/code&gt;.&lt;br /&gt;
&lt;div class=&quot;caps&quot; style=&quot;margin-top: 10px;&quot;&gt;attributes:&lt;/div&gt;&lt;dl class=&quot;atn-list&quot;&gt;&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:fromDegrees&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. Starting angular position, in degrees.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:toDegrees&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float&lt;/em&gt;. Ending angular position, in degrees.&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:pivotX&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float or percentage&lt;/em&gt;. The X coordinate of the center of rotation. Expressed either: in pixels relative to the object&#39;s left edge (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5&quot;&lt;/code&gt;), in percentage relative to the object&#39;s left edge (such as&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%&quot;&lt;/code&gt;), or in percentage relative to the parent container&#39;s left edge (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%p&quot;&lt;/code&gt;).&lt;/dd&gt;
&lt;dt&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;android:pivotY&lt;/code&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;em&gt;Float or percentage&lt;/em&gt;. The Y coordinate of the center of rotation. Expressed either: in pixels relative to the object&#39;s top edge (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5&quot;&lt;/code&gt;), in percentage relative to the object&#39;s top edge (such as&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%&quot;&lt;/code&gt;), or in percentage relative to the parent container&#39;s top edge (such as&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&quot;5%p&quot;&lt;/code&gt;).&lt;/dd&gt;&lt;/dl&gt;&lt;div style=&quot;margin-top: 10px;&quot;&gt;For more attributes supported by&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&amp;lt;rotate&amp;gt;&lt;/code&gt;, see the&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/animation/Animation.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Animation&lt;/a&gt;&lt;/code&gt;&amp;nbsp;class reference (of which, all XML attributes are inherrited by this element).&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;example:&lt;/dt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;dd style=&quot;margin-bottom: 10px; margin-left: 30px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;pp&gt;&lt;span style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;XML file saved at&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color: #006600; font-family: Roboto, sans-serif; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace; line-height: 19px;&quot;&gt;res/anim/&lt;/code&gt;&lt;span style=&quot;color: #006600; font-family: &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;property.xml:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pp&gt;&lt;br /&gt;
&lt;div style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-top: 10px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot;prettyprint&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f7f7f7; background-image: initial; background-origin: initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace; margin-bottom: 1em; margin-top: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;&lt;span style=&quot;color: #000088; font-family: Roboto, sans-serif; font-size: 1em; line-height: 19px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;set xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    android:shareInterpolator=&quot;false&quot;&amp;gt;
    &amp;lt;scale
        android:interpolator=&quot;@android:anim/accelerate_decelerate_interpolator&quot;
        android:fromXScale=&quot;1.0&quot;
        android:toXScale=&quot;1.4&quot;
        android:fromYScale=&quot;1.0&quot;
        android:toYScale=&quot;0.6&quot;
        android:pivotX=&quot;50%&quot;
        android:pivotY=&quot;50%&quot;
        android:fillAfter=&quot;false&quot;
        android:duration=&quot;700&quot; /&amp;gt;
    &amp;lt;set
        android:interpolator=&quot;@android:anim/accelerate_interpolator&quot;
        android:startOffset=&quot;700&quot;&amp;gt;
        &amp;lt;scale
            android:fromXScale=&quot;5.6&quot;
            android:toXScale=&quot;2&quot;
            android:fromYScale=&quot;5.0&quot;
            android:toYScale=&quot;0.0&quot;
            android:pivotX=&quot;25%&quot;
            android:pivotY=&quot;50%&quot;
            android:duration=&quot;500&quot; /&amp;gt;
        &amp;lt;rotate
            android:fromDegrees=&quot;0&quot;
            android:toDegrees=&quot;-90&quot;
            android:toYScale=&quot;0.0&quot;
            android:pivotX=&quot;50%&quot;
            android:pivotY=&quot;50%&quot;
            android:duration=&quot;700&quot; /&amp;gt;
    &amp;lt;/set&amp;gt;
&amp;lt;/set&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-top: 10px;&quot;&gt;This application code will apply the animation to an&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/ImageView.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;ImageView&lt;/a&gt;&lt;/code&gt;&amp;nbsp;and start the animation:&lt;/div&gt;&lt;pre class=&quot;prettyprint&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f7f7f7; background-image: initial; background-origin: initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace; margin-bottom: 1em; margin-top: 1em; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;&lt;span style=&quot;color: #660066;&quot;&gt;import android.os.Bundle;
import android.animation.AnimatorInflater;
import android.animation.AnimatorSet;
import android.app.Activity;
import android.view.Menu;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;
//O@K Tech..
public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.animator);
        ImageView img = (ImageView)findViewById(R.id.imageView1);
        Animation amnt = AnimationUtils.loadAnimation(this,R.anim.property);
        img.startAnimation(amnt);
       
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}&lt;/span&gt;&lt;/pre&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/3581726169407028204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/09/animation-demo-in-androidtween-animation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/3581726169407028204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/3581726169407028204'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/09/animation-demo-in-androidtween-animation.html' title='Animation Demo in Android(Tween Animation)'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-7539027492054982237</id><published>2012-09-11T04:55:00.004-07:00</published><updated>2012-09-11T05:04:01.654-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Android Tab Layout Application</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;Hello This Android Tab Layout Application.............. Enjoy it..............&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://docs.google.com/open?id=0B2B2Mim6OpFfcnJTNUQ3eVNHTVk&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;Download This Code Click here&lt;/b&gt;&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;
1) &amp;nbsp;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;In this post we need&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;background-color: #f6ffc7; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px; text-align: justify;&quot;&gt;three separate activities for three tab screens&lt;/em&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;. So let’s get started by creating a simple project by opening eclipse IDE.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp;Create a new project&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;File -&amp;gt; New -&amp;gt; Android Project&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp;and give activity name as&amp;nbsp;&lt;b&gt;MainActivity&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;2)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;Now open your&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;activity_main.xml&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;&amp;nbsp;under&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;res -&amp;gt; layout&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;&amp;nbsp;folder and type the following code.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;lt;TabHost&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@android:id/tabhost&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignParentLeft=&quot;true&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignParentTop=&quot;true&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;LinearLayout&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:orientation=&quot;vertical&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;TabWidget&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@android:id/tabs&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/TabWidget&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;FrameLayout&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@android:id/tabcontent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;match_parent&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/FrameLayout&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp;&amp;lt;/TabHost&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;3)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp;Now we need 3 activities and 3 xml layouts for three tabs. So create three activities by right click on your package folder and create classes and name them as&lt;/span&gt;&lt;em style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px;&quot;&gt;Music.java,&lt;/em&gt;&lt;em style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px;&quot;&gt;Photo.java&lt;/em&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;and video&lt;/span&gt;&lt;em style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px;&quot;&gt;.java&lt;/em&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;. Type the following code respectively.&lt;/span&gt;&lt;/div&gt;&lt;strong style=&quot;background-color: white; font-family: &#39;Maven Pro&#39;, sans-serif; font-size: 14px; line-height: 20px; text-align: justify;&quot;&gt;Right Click on package folder -&amp;gt; New -&amp;gt; Class&lt;/strong&gt;&lt;br /&gt;
&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;&lt;b style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;u&gt;Music.java&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.app.Activity;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.os.Bundle;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;//O@K Tech&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;public class Music extends Activity {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void onCreate(Bundle savedInstanceState) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&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;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;super.onCreate(savedInstanceState);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setContentView(R.layout.music_layout);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&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&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;u&gt;&lt;b&gt;Photo.java&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.app.Activity;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.os.Bundle;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;//O@K Tech&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;public class Photo extends Activity {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-size: 14px; line-height: 20px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; @Override&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void onCreate(Bundle savedInstanceState) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&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;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;super.onCreate(savedInstanceState);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setContentView(R.layout.photo_layout);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; }&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;video.java&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.app.Activity;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.os.Bundle;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;public class video extends Activity{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-size: 14px; line-height: 20px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void onCreate(Bundle savedInstanceState) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&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;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;super.onCreate(savedInstanceState);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setContentView(R.layout.video);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&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&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;4) &amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;Now create 3 xml layouts by&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;right clicking on res/layout -&amp;gt; New -&amp;gt; Android XML&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;File and name them as&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;background-color: white; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px;&quot;&gt;photo_layout.xml&lt;/em&gt;&lt;span style=&quot;background-color: white;&quot;&gt;, music&lt;/span&gt;&lt;em style=&quot;background-color: white; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px;&quot;&gt;_layout.xml&lt;/em&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;background-color: white; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px;&quot;&gt;video.xml&lt;/em&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;and type the following code in respective files.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;music_layout.xml&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/textView1&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Play Music.... &quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textAppearance=&quot;?android:attr/textAppearanceLarge&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;u&gt;&lt;b&gt;photo_layout.xml&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;TextView&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/textView1&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Hello Photo view&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textAppearance=&quot;?android:attr/textAppearanceLarge&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;u&gt;&lt;b&gt;video.xml&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/textView1&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Video................&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textAppearance=&quot;?android:attr/textAppearanceLarge&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;5)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;Now open&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;MainActivity&lt;/b&gt;&lt;strong style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;.java&lt;/strong&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp;and type the following code. In the following code we are creating three&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;font-size: 14px; line-height: 20px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px;&quot;&gt;TabSepcs&lt;/em&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp;and adding them to&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;font-size: 14px; line-height: 20px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; padding-top: 0px;&quot;&gt;TabHost&lt;/em&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;u&gt;&lt;b style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;MainActivity&lt;/b&gt;&lt;strong style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;.java&lt;/strong&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;package com.example.tagdemo;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.os.Bundle;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.app.Activity;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.app.TabActivity;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.content.Intent;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.view.Menu;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.widget.TabHost;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;import android.widget.TabHost.TabSpec;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;// O@K Tech......&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;public class MainActivity extends TabActivity {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.activity_main);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;helloo&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @SuppressWarnings(&quot;deprecation&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;TabHost tbh = getTabHost();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TabSpec tabspecmusic = tbh.newTabSpec(&quot;Music&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tabspecmusic.setIndicator(&quot;Music&quot;,getResources().getDrawable(R.drawable.ic_launcher));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Intent imusic = new Intent(this, Music.class);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tabspecmusic.setContent(imusic);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TabSpec tabspecphoto = tbh.newTabSpec(&quot;Photo&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tabspecphoto.setIndicator(&quot;Photo&quot;,getResources().getDrawable(R.drawable.ic_action_search));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Intent iphoto = new Intent(this,Photo.class);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tabspecphoto.setContent(iphoto);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TabSpec tabspecv = tbh.newTabSpec(&quot;video&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tabspecv.setIndicator(&quot;video&quot;,getResources().getDrawable(R.drawable.ic_action_search));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Intent iv = new Intent(this,video.class);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tabspecv.setContent(iv);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tbh.addTab(tabspecmusic);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tbh.addTab(tabspecphoto);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tbh.addTab(tabspecv);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; public boolean onCreateOptionsMenu(Menu menu) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getMenuInflater().inflate(R.menu.activity_main, menu);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;6)&amp;nbsp;Now everything is ready and before running your project make sure that you an entry of new activity name in&amp;nbsp;&lt;strong&gt;AndroidManifest.xml&lt;/strong&gt;&amp;nbsp;file. Open you AndroidManifest.xml file and modify the code as below&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; package=&quot;com.example.tagdemo&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; android:versionCode=&quot;1&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; android:versionName=&quot;1.0&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;uses-sdk&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:minSdkVersion=&quot;8&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:targetSdkVersion=&quot;15&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;application&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:icon=&quot;@drawable/ic_launcher&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:theme=&quot;@style/AppTheme&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;activity&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.MainActivity&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/title_activity_main&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;activity&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.Music&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/title_activity_main&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;activity&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.Photo&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/title_activity_main&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;activity&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.video&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/title_activity_main&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/application&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;Output of Above code in Emulator :-&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTAiQ1kZLwIyHv3OyAOMB0ucLx1Qy4ouwN6xRtWotdhJTch7TFYmOd08PIMRTEIrJF6WaSZcVSq0EeUFeDRcXzPHYBi0Nn_Zc6JpTbNiVr19s6qp07SJzf7YEWdWYopbMggx6tR-7-L_Q/s1600/opt.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTAiQ1kZLwIyHv3OyAOMB0ucLx1Qy4ouwN6xRtWotdhJTch7TFYmOd08PIMRTEIrJF6WaSZcVSq0EeUFeDRcXzPHYBi0Nn_Zc6JpTbNiVr19s6qp07SJzf7YEWdWYopbMggx6tR-7-L_Q/s320/opt.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;sub-content&quot; style=&quot;background-color: white; margin-bottom: 10px; margin-left: 25px; margin-top: 10px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;sub-content&quot; style=&quot;background-color: white; margin-bottom: 10px; margin-left: 25px; margin-top: 10px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;sub-content&quot; style=&quot;background-color: white; margin-bottom: 10px; margin-left: 25px; margin-top: 10px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Maven Pro&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/7539027492054982237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/09/android-tab-layout-application.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/7539027492054982237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/7539027492054982237'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/09/android-tab-layout-application.html' title='Android Tab Layout Application'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTAiQ1kZLwIyHv3OyAOMB0ucLx1Qy4ouwN6xRtWotdhJTch7TFYmOd08PIMRTEIrJF6WaSZcVSq0EeUFeDRcXzPHYBi0Nn_Zc6JpTbNiVr19s6qp07SJzf7YEWdWYopbMggx6tR-7-L_Q/s72-c/opt.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-1114341936745537383</id><published>2012-09-06T05:49:00.000-07:00</published><updated>2012-09-06T05:49:39.357-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Login Application using Database with dialog demo</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Follow Below Steps for make simple login applicaiton in Android using database with Dialog demo.&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/u&gt; &lt;u&gt;&lt;b&gt;1)DataBaseDemoActivity.java&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This file diplay login page and trasfer two edit text data into second activity........&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package database.co.in;&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.content.Intent;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
import android.widget.EditText;&lt;br /&gt;
&lt;br /&gt;
public class DataBaseDemoActivity extends Activity implements OnClickListener {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Called when the activity is first created. */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EditText mtxt_email, mtxt_password;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Button mLogin;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.main);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mtxt_email = (EditText)findViewById(R.id.editEmail_id);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mtxt_password = (EditText)findViewById(R.id.editPassword);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mLogin = (Button)findViewById(R.id.button1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mLogin.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String email = mtxt_email.getText().toString();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String password = mtxt_password.getText().toString();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;Email id:-&quot;+email);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;Password:-&quot;+password);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; Intent dbintent = new Intent(this.getApplicationContext(),DbEntry.class);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; dbintent.putExtra(&quot;p_email&quot;, email);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; dbintent.putExtra(&quot;p_password&quot;, password);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; startActivity(dbintent);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;2)main.xml&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This is login page gui.. also this file need one header.xml which include externally.......&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:orientation=&quot;vertical&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:background=&quot;@drawable/apple1&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;RelativeLayout&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/textEmail_id&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_centerHorizontal=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginTop=&quot;69dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Email ID&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textSize=&quot;20dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:gravity=&quot;center|left&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textColor=&quot;@android:color/holo_purple&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EditText&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/editEmail_id&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;35dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignLeft=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignRight=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_below=&quot;@+id/textEmail_id&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginTop=&quot;10dp&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/textPassword&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignLeft=&quot;@+id/textEmail_id&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_below=&quot;@+id/editEmail_id&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Password&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textSize=&quot;20dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textColor=&quot;@android:color/holo_purple&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EditText&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/editPassword&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;35dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignLeft=&quot;@+id/editEmail_id&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_alignRight=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_below=&quot;@+id/textPassword&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginTop=&quot;10dp&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;requestFocus /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/EditText&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_below=&quot;@+id/editPassword&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_centerHorizontal=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginTop=&quot;24dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:background=&quot;@drawable/login&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;include layout=&quot;@layout/header&quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/RelativeLayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;3) header.xml&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:orientation=&quot;vertical&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/textView2&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_marginLeft=&quot;35dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Welcome To @pple&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textSize=&quot;25dp&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:textColor=&quot;@android:color/holo_purple&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;4)&amp;nbsp;DbEntry.java&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;Below code for database logic..... and show Dialog in second page check. it&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package database.co.in;&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.app.Dialog;&lt;br /&gt;
import android.content.Context;&lt;br /&gt;
import android.content.Intent;&lt;br /&gt;
import android.database.sqlite.SQLiteDatabase;&lt;br /&gt;
import android.database.sqlite.SQLiteDatabase.CursorFactory;&lt;br /&gt;
import android.database.sqlite.SQLiteOpenHelper;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.widget.Toast;&lt;br /&gt;
&lt;br /&gt;
public class DbEntry extends Activity {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SQLiteDatabase db;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; @Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected void onCreate(Bundle savedInstanceState) {&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;super.onCreate(savedInstanceState);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;All iz well. &quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Intent getdbintent = getIntent();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String email = getdbintent.getStringExtra(&quot;p_email&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String password = getdbintent.getStringExtra(&quot;p_password&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;db = openOrCreateDatabase(&quot;login.db&quot;,SQLiteDatabase.CREATE_IF_NECESSARY&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;,null);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String createTable = &quot;CREATE TABLE IF NOT EXISTS info (&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + &quot;Emailid TEXT,&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + &quot;PassWord TEXT);&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;db.execSQL(createTable);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String insertData = &quot;INSERT or replace INTO info (Emailid, PassWord) VALUES(&#39;&quot;+email+&quot;&#39;,&#39;&quot;+password+&quot;&#39;)&quot; ; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;db.execSQL(insertData);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;db.close();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;All iz well.database has benn insert successfully. &amp;nbsp;&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Toast.makeText(getApplicationContext(), &quot;welcome to o@k Tech&quot;+email+&quot;Password+&quot;+password, Toast.LENGTH_LONG).show();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;showDialog(1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;protected Dialog onCreateDialog(int i) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Dialog dialog = null;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;switch (i) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;case 1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;dialog = new Dialog(this);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;dialog.setTitle(&quot;Welcome to O@k Tech...... &amp;nbsp;....&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;dialog.setContentView(R.layout.dialog);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;break;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;default:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return dialog;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;&lt;u&gt;5) dialog.xml&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;This file content only one button which is display on dialog box .&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Thanx to Login.........&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;b&gt;&lt;u&gt;6) AndroidManiFest.xml&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; package=&quot;database.co.in&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; android:versionCode=&quot;1&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; android:versionName=&quot;1.0&quot; &amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;lt;uses-sdk android:minSdkVersion=&quot;15&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;lt;application&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:icon=&quot;@drawable/ic_launcher&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot; &amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;activity&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.DataBaseDemoActivity&quot; &amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter &amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;activity&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.DbEntry&quot; &amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter &amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/application&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;lt;/manifest&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output and Require Backgroud images for this project.......:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIOEYi7jUXxFqKCgu4eX_oMHDMDco0HUNqK2K-OUQs_mCDXWzKeVz6TuLZSYbz3SOrA2HQujYaTCzHlBoNgF-2miBEYW5zj_cufulaQC9IVk3ZQeYQyZItrYEl_kGjhrvk0xrCtTXL6qA/s1600/apple1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIOEYi7jUXxFqKCgu4eX_oMHDMDco0HUNqK2K-OUQs_mCDXWzKeVz6TuLZSYbz3SOrA2HQujYaTCzHlBoNgF-2miBEYW5zj_cufulaQC9IVk3ZQeYQyZItrYEl_kGjhrvk0xrCtTXL6qA/s320/apple1.png&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5jVLuii2H_BMvKTIoC_QA_H1u7Zpf-IeorGBOqL3ZyAWgB1tqFVZ6jLPZbvrq0p0GWHzQXiwwuqAarfkATPIn3kLpjzWH66JyoIVoEXRnIVas7eFIB_zKEz81PVN5DWyvAv3bq-VbmgA/s1600/login.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5jVLuii2H_BMvKTIoC_QA_H1u7Zpf-IeorGBOqL3ZyAWgB1tqFVZ6jLPZbvrq0p0GWHzQXiwwuqAarfkATPIn3kLpjzWH66JyoIVoEXRnIVas7eFIB_zKEz81PVN5DWyvAv3bq-VbmgA/s1600/login.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;Application Output:-&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkOVUMR-GWu0lgZPB6Rubg4voX8xKH_AsRFlPa4C9w22rzNB5uSFgyrQppuOEBRJhgnMlx4X_0An9RWnLLGOYSu6ogLqgfV3HGR7fXW889NhEbxOk2L3Qmyf6PC0SZvTDlFSaSknBulbE/s1600/output.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkOVUMR-GWu0lgZPB6Rubg4voX8xKH_AsRFlPa4C9w22rzNB5uSFgyrQppuOEBRJhgnMlx4X_0An9RWnLLGOYSu6ogLqgfV3HGR7fXW889NhEbxOk2L3Qmyf6PC0SZvTDlFSaSknBulbE/s320/output.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/1114341936745537383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/09/login-application-using-database-with.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/1114341936745537383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/1114341936745537383'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/09/login-application-using-database-with.html' title='Login Application using Database with dialog demo'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIOEYi7jUXxFqKCgu4eX_oMHDMDco0HUNqK2K-OUQs_mCDXWzKeVz6TuLZSYbz3SOrA2HQujYaTCzHlBoNgF-2miBEYW5zj_cufulaQC9IVk3ZQeYQyZItrYEl_kGjhrvk0xrCtTXL6qA/s72-c/apple1.png" height="72" width="72"/><thr:total>6</thr:total><georss:featurename>Ahmedabad, Gujarat, India</georss:featurename><georss:point>23.0395677 72.566004499999963</georss:point><georss:box>22.9220977 72.441739499999969 23.1570377 72.690269499999957</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-5529818689180088110</id><published>2012-08-27T06:29:00.001-07:00</published><updated>2012-08-27T06:38:06.583-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Camara Application in Android(Use Hardware Camara)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;hi ....&lt;br /&gt;
write Following code in your project&lt;br /&gt;
&lt;br /&gt;
first create camaratest android project.......&lt;br /&gt;
this example for take image and view in below image view check it........ and enjoy&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;1)&amp;nbsp;CamaratestActivity.java&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;package com.in.test;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.graphics.Bitmap;&lt;br /&gt;
import android.graphics.BitmapFactory;&lt;br /&gt;
import android.hardware.Camera;&lt;br /&gt;
import android.hardware.Camera.PictureCallback;&lt;br /&gt;
import android.hardware.Camera.ShutterCallback;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.os.Handler;&lt;br /&gt;
import android.view.SurfaceHolder;&lt;br /&gt;
import android.view.SurfaceView;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
import android.widget.ImageView;&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp;* O@K tech...&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public class CamaratestActivity extends Activity implements SurfaceHolder.Callback ,OnClickListener {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Camera camera;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SurfaceView surfaceview;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SurfaceHolder mHolder ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Button btnSnap;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ImageView mPic;&lt;br /&gt;
/** Called when the activity is first created. */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.main);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; surfaceview = (SurfaceView)findViewById(R.id.surfaceView1);// view camera view in main xml.... check it&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mHolder = surfaceview.getHolder();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mHolder.addCallback(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;btnSnap = (Button)findViewById(R.id.button1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;btnSnap.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mPic = (ImageView)findViewById(R.id.imageView1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void surfaceChanged(SurfaceHolder holder, int format, int width,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;int height) {&lt;br /&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; &amp;nbsp; &amp;nbsp; System.out.println(&quot;surfacechanged is called&quot;);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&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;try{&lt;br /&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;camera.setPreviewDisplay(mHolder);&lt;br /&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;Camera.Parameters parameter = camera.getParameters();&lt;br /&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;camera.setParameters(parameter);&lt;br /&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;camera.startPreview();&lt;br /&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;br /&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;br /&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;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;// TODO: handle exception&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void surfaceCreated(SurfaceHolder holder) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;surfacreate is called&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;camera = Camera.open();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;catch (Exception e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;Error:&quot;+e);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void surfaceDestroyed(SurfaceHolder holder) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(&quot;surfacedestroy is called&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;camera.stopPreview();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;camera.release();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;camera = null;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;br /&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;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;camera.takePicture(shutter, raw, postview, jpeg);// this class for take pic .&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Handler handler=new Handler();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;handler.postDelayed(new Runnable() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void run() {&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;camera.startPreview();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}, 1000);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//camera.startPreview();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;ShutterCallback shutter = new ShutterCallback() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void onShutter() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;Shuttercallback picature call back.....&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;} ;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PictureCallback raw = new PictureCallback() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;public void onPictureTaken(byte[] data, Camera camera) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;System.out.println(&quot;raw &amp;nbsp;.. picature call back.....&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;};&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PictureCallback jpeg = new PictureCallback() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;public void onPictureTaken(byte[] data, Camera camera) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp;System.out.println(&quot;jpeg picature call back.....&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp;Bitmap btmCamerapic = BitmapFactory.decodeByteArray(data,0,data.length);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp;mPic.setImageBitmap(btmCamerapic);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;};&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;PictureCallback postview = new PictureCallback() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;@Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;public void onPictureTaken(byte[] data, Camera camera) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;System.out.println(&quot;postview... picature call back.....&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;};&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;2)main.xml&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:orientation=&quot;vertical&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Snap Card...&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;FrameLayout android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;250dp&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;RelativeLayout android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;android:layout_height=&quot;fill_parent&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;SurfaceView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/surfaceView1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;250dp&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:gravity=&quot;bottom&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Snap&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/RelativeLayout&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/FrameLayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ImageView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:id=&quot;@+id/imageView1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;3) &amp;nbsp;AndroidManifest.xml&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; package=&quot;com.in.test&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionCode=&quot;1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionName=&quot;1.0&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;uses-sdk android:minSdkVersion=&quot;15&quot; /&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;uses-feature android:name=&quot;android.hardware.camera&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;uses-feature android:name=&quot;android.hardware.camera.autofocus&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;application&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:icon=&quot;@drawable/camera&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;activity&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.CamaratestActivity&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/manifest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;All iz well&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Output&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLQcyYnM3EQRGFKX4ra4dnOWRMDcwss2uBlqHKWgV12wG9A_Xx3FbfdVHTBqzfBrnnQNZ0iWJ5-0sYgf4_r5UfzyNtPmmhCr6ei5OVTYC3trFyTshvq__1unueMjXTzoT1Cl_p-0bNTtM/s1600/output.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLQcyYnM3EQRGFKX4ra4dnOWRMDcwss2uBlqHKWgV12wG9A_Xx3FbfdVHTBqzfBrnnQNZ0iWJ5-0sYgf4_r5UfzyNtPmmhCr6ei5OVTYC3trFyTshvq__1unueMjXTzoT1Cl_p-0bNTtM/s320/output.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/5529818689180088110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/camara-application-in-androiduse.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/5529818689180088110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/5529818689180088110'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/camara-application-in-androiduse.html' title='Camara Application in Android(Use Hardware Camara)'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLQcyYnM3EQRGFKX4ra4dnOWRMDcwss2uBlqHKWgV12wG9A_Xx3FbfdVHTBqzfBrnnQNZ0iWJ5-0sYgf4_r5UfzyNtPmmhCr6ei5OVTYC3trFyTshvq__1unueMjXTzoT1Cl_p-0bNTtM/s72-c/output.jpg" height="72" width="72"/><thr:total>6</thr:total><georss:featurename>Ahmedabad, Gujarat, India</georss:featurename><georss:point>23.0395677 72.566004499999963</georss:point><georss:box>22.9220977 72.441739499999969 23.1570377 72.690269499999957</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-7005014353655055304</id><published>2012-08-24T05:42:00.000-07:00</published><updated>2012-08-24T05:42:35.919-07:00</updated><title type='text'>Media Player Programming in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Hi Friends.&lt;br /&gt;
&lt;br /&gt;
This is Small Media Player (Start and Stop) Application&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;1) First Create Android Project.(mediap)&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;2) Create raw &amp;nbsp;Folder in res Folder&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGKbjeIa5v8QE_XuMoCi6PwZoOjN5XSpvJ0tq8-Er9hk87O48q9jeyeAkYfIX6tsxVR2igTsnCSfG_G9_vcHhkdAaY-aF-Z1NQcTowBoGam4-DaC5_LQ8InMbBj_fw6pg-TFG6nW4YV_M/s1600/raw.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGKbjeIa5v8QE_XuMoCi6PwZoOjN5XSpvJ0tq8-Er9hk87O48q9jeyeAkYfIX6tsxVR2igTsnCSfG_G9_vcHhkdAaY-aF-Z1NQcTowBoGam4-DaC5_LQ8InMbBj_fw6pg-TFG6nW4YV_M/s320/raw.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;now copy paste one .mp3 file in raw folder show in above image &lt;b&gt;res/raw/a.mp3&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;3) Now Edit main.xml &amp;nbsp;see in Bellow&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;main.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:orientation=&quot;vertical&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;@string/hello&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;LinearLayout&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:orientation=&quot;horizontal&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/Start&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Start&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/Stop&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;Stop&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;4) Now Create Following Activity&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;package media.p.in;&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.media.MediaPlayer;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.View;&lt;br /&gt;
import android.view.View.OnClickListener;&lt;br /&gt;
import android.widget.Button;&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp;* O@K Tech : Sukhadiya Raviraj&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public class MediapActivity extends Activity implements OnClickListener {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MediaPlayer mPlayer;// Media Player Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Button start,stop;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.main);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mPlayer = MediaPlayer.create(this, R.raw.a);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start = (Button)findViewById(R.id.Start);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stop = (Button)findViewById(R.id.Stop);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stop.setOnClickListener(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;if(start.isPressed())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; mPlayer.start();// this method for Start Song&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(stop.isPressed())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; mPlayer.stop();//this method for Stop Song&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; mPlayer.reset();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Here MediaPlayer Object create and give the path of .mp3 file in create() method and use stop() and start() method for start and stop music .&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;5) &amp;nbsp;AndroidManifest.xml&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; package=&quot;media.p.in&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionCode=&quot;1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionName=&quot;1.0&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;uses-sdk android:minSdkVersion=&quot;15&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;application&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:icon=&quot;@drawable/ic_launcher&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;activity&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.MediapActivity&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/manifest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Now Run in Emulator . and see below Out put&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0mITsJvcfE9lqVhr-SEvDygE3AN8QEGjqXPZMxcjZ-rirCjVmPChdGlyz_-Ce9hZKsnvrmEg4CUZ6LcCtl4UMUjXKvyiT1hh5LY9ih-o-6_By6lc419YgnA8L01hBJa9Mac8UiyIA05E/s1600/output.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0mITsJvcfE9lqVhr-SEvDygE3AN8QEGjqXPZMxcjZ-rirCjVmPChdGlyz_-Ce9hZKsnvrmEg4CUZ6LcCtl4UMUjXKvyiT1hh5LY9ih-o-6_By6lc419YgnA8L01hBJa9Mac8UiyIA05E/s320/output.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;Click on Start and Stop Button for Start and Stop Music.......&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;All iz Well&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/7005014353655055304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/media-player-programming-in-android.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/7005014353655055304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/7005014353655055304'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/media-player-programming-in-android.html' title='Media Player Programming in Android'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGKbjeIa5v8QE_XuMoCi6PwZoOjN5XSpvJ0tq8-Er9hk87O48q9jeyeAkYfIX6tsxVR2igTsnCSfG_G9_vcHhkdAaY-aF-Z1NQcTowBoGam4-DaC5_LQ8InMbBj_fw6pg-TFG6nW4YV_M/s72-c/raw.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-2197058337917916152</id><published>2012-08-21T05:25:00.002-07:00</published><updated>2012-08-21T05:30:06.111-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>How to add a menu in a programmatic manner in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Hello Friends.&lt;br /&gt;
&lt;br /&gt;
Follow Below Step for Create Programmatic Menu in Android.&lt;br /&gt;
Here Use&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu)&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;onCreateOptionsMenu(Menu menu)&lt;/a&gt; Override method.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;1) First Create Simple Android Project (menudemo)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;2) Now edit string.xml(Path:- res/values/string.xml)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;resources&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;string name=&quot;hello&quot;&amp;gt;Hello World, MenudemoActivity!&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;string name=&quot;app_name&quot;&amp;gt;Menudemo&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;string name=&quot;HomeOption&quot;&amp;gt;Home&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;string name=&quot;Oak&quot;&amp;gt;a@k&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/resources&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here above Code for Manualy create String Home and a@k.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3) Edit &amp;nbsp;MenudemoActivity.java (this is Android Activity)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;import android.app.Activity;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.view.Menu;&lt;br /&gt;
import android.view.MenuInflater;&lt;br /&gt;
import android.view.MenuItem;&lt;br /&gt;
&lt;br /&gt;
public class MenudemoActivity extends Activity {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Called when the activity is first created. */&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;int id_menu = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.main);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public boolean onCreateOptionsMenu(Menu menu) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// TODO Auto-generated method stub&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;menu.add(R.string.HomeOption);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;menu.add(R.string.Oak);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;menu.add(&quot;Welcome&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return super.onCreateOptionsMenu(menu);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here in Above Code &amp;nbsp;onCreateOptionsMenu(Menu menu)&amp;nbsp;&amp;nbsp;override method use for create menu. then use add method for add string from string.xml or manualy like &quot;welcome&quot;&lt;br /&gt;
&lt;b&gt;4) Now Run Android Application.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;See in Emulator after Run project Click on Menu Button and See Below Output.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqlHo4hnVHUSpsFHY22pm1lXMgqWgDiFf2nKD1nq6M__S03cIMZXWAoccjGYkQr3MsLXZI1-DRAeRdjVYMVq5TUCvi_OPcstZlVEN5-Lex6FZbGt1lTT7lmpJ-UL4U97fiFDbHtxZ-o-M/s1600/menu.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqlHo4hnVHUSpsFHY22pm1lXMgqWgDiFf2nKD1nq6M__S03cIMZXWAoccjGYkQr3MsLXZI1-DRAeRdjVYMVq5TUCvi_OPcstZlVEN5-Lex6FZbGt1lTT7lmpJ-UL4U97fiFDbHtxZ-o-M/s320/menu.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/2197058337917916152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/how-to-add-menu-in-programmatic-manner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/2197058337917916152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/2197058337917916152'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/how-to-add-menu-in-programmatic-manner.html' title='How to add a menu in a programmatic manner in Android'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqlHo4hnVHUSpsFHY22pm1lXMgqWgDiFf2nKD1nq6M__S03cIMZXWAoccjGYkQr3MsLXZI1-DRAeRdjVYMVq5TUCvi_OPcstZlVEN5-Lex6FZbGt1lTT7lmpJ-UL4U97fiFDbHtxZ-o-M/s72-c/menu.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Ahmedabad, Gujarat, India</georss:featurename><georss:point>23.0395677 72.566004499999963</georss:point><georss:box>22.9220977 72.441739499999969 23.1570377 72.690269499999957</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-916125494957787753</id><published>2012-08-20T05:56:00.000-07:00</published><updated>2012-08-20T05:56:19.119-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Create Simple Widget in Android </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Hi .&lt;br /&gt;
Here we Discuss about how to create Simple Widget in android...&lt;br /&gt;
Here use &lt;a href=&quot;http://developer.android.com/reference/android/appwidget/AppWidgetProvider.html&quot; target=&quot;_blank&quot;&gt;AppWidgetProvider&lt;/a&gt; class .&lt;br /&gt;
&lt;h1 itemprop=&quot;name&quot; style=&quot;background-color: #f9f9f9; color: #333333; font-family: Roboto, sans-serif; font-size: 22px; line-height: 32px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;First Create Simple android project name is widget.&lt;/span&gt;&lt;/h1&gt;&lt;br /&gt;
&lt;b&gt;1) res/layout/main.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
android:orientation=&quot;vertical&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_gravity=&quot;center&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:background=&quot;@android:color/holo_orange_light&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;Button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:id=&quot;@+id/button1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;welcome&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;lt;TextView android:id=&quot;@+id/widget_textview&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_gravity=&quot;center_horizontal|center&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_marginTop=&quot;5dip&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:padding=&quot;10dip&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:text=&quot;Welcome Oak Tech.&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:textColor=&quot;@android:color/black&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;2)&amp;nbsp;AndroidManifest.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; package=&quot;widget.co.in&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionCode=&quot;1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionName=&quot;1.0&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;uses-sdk android:minSdkVersion=&quot;15&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;application&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:icon=&quot;@drawable/ic_launcher&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;!-- Broadcast Receiver that will process AppWidget updates --&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;receiver android:name=&quot;.WidgetActivity&quot; android:label=&quot;@string/app_name&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.appwidget.action.APPWIDGET_UPDATE&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;br /&gt;
&amp;lt;meta-data android:name=&quot;android.appwidget.provider&quot;&lt;br /&gt;
android:resource=&quot;@xml/welcome&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/receiver&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/manifest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3) &amp;nbsp;create xml folder in res . res/xml/welcome.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;this .xml file create&amp;nbsp;appwidget-provider tag for view widget.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;appwidget-provider xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:minWidth=&quot;146dip&quot;&lt;br /&gt;
android:minHeight=&quot;72dip&quot;&lt;br /&gt;
android:updatePeriodMillis=&quot;10000&quot;&lt;br /&gt;
android:initialLayout=&quot;@layout/main&quot;&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;4) Create Following Activity.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;WidgetActivity.java&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import java.text.SimpleDateFormat;&lt;br /&gt;
import java.util.Date;&lt;br /&gt;
import java.util.Locale;&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.appwidget.AppWidgetManager;&lt;br /&gt;
import android.appwidget.AppWidgetProvider;&lt;br /&gt;
import android.content.ComponentName;&lt;br /&gt;
import android.content.Context;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.text.format.DateFormat;&lt;br /&gt;
import android.widget.RemoteViews;&lt;br /&gt;
&lt;br /&gt;
public class WidgetActivity extends AppWidgetProvider {&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;5) Run Above Application and see in console&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Uploading widget.apk onto device &#39;emulator-5554&#39;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Installing widget.apk...&lt;br /&gt;
&amp;nbsp;Success!&lt;br /&gt;
&amp;nbsp;/widget/bin/widget.apk installed on device&lt;br /&gt;
&amp;nbsp;Done!&lt;br /&gt;
&lt;br /&gt;
6) &lt;b&gt;Now Goto Emulator and Open widget (long press left click on home screen) . and See Widget window and longpress on widget icon for our application.&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; see Button and Textview in widget window.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;output:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipMqI1we8ho0-APA76deAXhbA0Mn15ao22E0YNqTugnTmgVXbXlwG0fcQDknCHb1_nQlHDkVwG6f1K6exOP8thRqbE9LyTqbqX99PW5ss72lD7wZPwIZgkQ1UF8tpjxKMTXs9-SCoLvdg/s1600/Untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipMqI1we8ho0-APA76deAXhbA0Mn15ao22E0YNqTugnTmgVXbXlwG0fcQDknCHb1_nQlHDkVwG6f1K6exOP8thRqbE9LyTqbqX99PW5ss72lD7wZPwIZgkQ1UF8tpjxKMTXs9-SCoLvdg/s320/Untitled.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/916125494957787753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/create-simple-widget-in-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/916125494957787753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/916125494957787753'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/create-simple-widget-in-android.html' title='Create Simple Widget in Android '/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipMqI1we8ho0-APA76deAXhbA0Mn15ao22E0YNqTugnTmgVXbXlwG0fcQDknCHb1_nQlHDkVwG6f1K6exOP8thRqbE9LyTqbqX99PW5ss72lD7wZPwIZgkQ1UF8tpjxKMTXs9-SCoLvdg/s72-c/Untitled.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Ahmedabad, Gujarat, India</georss:featurename><georss:point>23.0395677 72.566004499999963</georss:point><georss:box>22.9220977 72.441739499999969 23.1570377 72.690269499999957</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-2868808965318414669</id><published>2012-08-20T05:34:00.000-07:00</published><updated>2012-08-20T05:34:51.800-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>WebApp in Android </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;First Create Simple Android Project(webapp).&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; We need WebView in xml for Develop WebApp in Android . So Following Step are Create simple &amp;nbsp; WebApp in android.&lt;br /&gt;
&lt;b&gt;1) res/layout/main.xml&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; paste following code in main.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;WebView &amp;nbsp;xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:id=&quot;@+id/webview&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2)webapp.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;following Activity is open google.com page in webview.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.webkit.WebView;&lt;br /&gt;
&lt;br /&gt;
import org.apache.cordova.*;&lt;br /&gt;
&lt;br /&gt;
public class webapp extends Activity {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; @Override&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onCreate(Bundle savedInstanceState) {&lt;br /&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;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;super.onCreate(savedInstanceState);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setContentView(R.layout.main);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;WebView wb = (WebView)findViewById(R.id.webview);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;b&gt;&lt;u&gt;wb.loadUrl(&quot;http://www.google.com&quot;);&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
3) Run the Above Application and output is.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgKadKiWN26ryhRf7eXQTH_rJRSS4p1v3nCf0HtViOUYaMu2aoF9TiCQ9hDqrw-ltV9LBNWdFQqLXZLG_RehjrWAezdfA9mdzCX3szI382VotIR9djKOKvhngdmhk-LyWOwse05liIUI0/s1600/google.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgKadKiWN26ryhRf7eXQTH_rJRSS4p1v3nCf0HtViOUYaMu2aoF9TiCQ9hDqrw-ltV9LBNWdFQqLXZLG_RehjrWAezdfA9mdzCX3szI382VotIR9djKOKvhngdmhk-LyWOwse05liIUI0/s320/google.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/2868808965318414669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/webapp-in-android.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/2868808965318414669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/2868808965318414669'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/webapp-in-android.html' title='WebApp in Android '/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgKadKiWN26ryhRf7eXQTH_rJRSS4p1v3nCf0HtViOUYaMu2aoF9TiCQ9hDqrw-ltV9LBNWdFQqLXZLG_RehjrWAezdfA9mdzCX3szI382VotIR9djKOKvhngdmhk-LyWOwse05liIUI0/s72-c/google.jpg" height="72" width="72"/><thr:total>2</thr:total><georss:featurename>Ahmedabad, Gujarat, India</georss:featurename><georss:point>23.0395677 72.566004499999963</georss:point><georss:box>22.9220977 72.441739499999969 23.1570377 72.690269499999957</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-5400436492173626787</id><published>2012-08-20T05:22:00.000-07:00</published><updated>2012-08-20T05:22:13.170-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Android HelloWorld Example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;After install android Create New Android Helloworld Application.&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;1)&amp;nbsp;&lt;/u&gt;HelloWorld.java&lt;/b&gt;&lt;br /&gt;
package co.in.helloworld;&lt;br /&gt;
&lt;br /&gt;
import android.app.Activity;&lt;br /&gt;
import android.os.Bundle;&lt;br /&gt;
import android.util.Log;&lt;br /&gt;
&lt;br /&gt;
public class HelloWorld &amp;nbsp;extends Activity {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Called when the activity is first created. */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.main);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Hello World......&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2) res/layout/main.xml&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:orientation=&quot;vertical&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;TextView&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:text=&quot;@string/hello&quot; /&amp;gt; (We can write own text in between &quot; &quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3) res/values/string.xml(Optional step)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;resources&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;string name=&quot;hello&quot;&amp;gt;Hello World, HelloWorldActivity!&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;string name=&quot;app_name&quot;&amp;gt;HelloWorld&amp;lt;/string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/resources&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4) AndroidManifest.xml&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; package=&quot;co.in.helloworld&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionCode=&quot;1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; android:versionName=&quot;1.0&quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;uses-sdk android:minSdkVersion=&quot;15&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;application&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:icon=&quot;@drawable/ic_launcher&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;activity&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:label=&quot;@string/app_name&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; android:name=&quot;.HelloWorldActivity&quot; &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;intent-filter &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/intent-filter&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/activity&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/manifest&amp;gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;b&gt;5) Run Android Application and Got Output in Emulator.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhamrhxLl0Oyc2VmZtHyAu7JrnMOP0Mp6TC8Pmcaa5j8bCNgCdGy90KlyfKm8ZXtI_W_yqt0fx6dD2ZzgeIDTza1YdTG61w5lrnUbRLEtwiWY00YsGkDiP7go3_s1K_PKS3wwnvroBPy-I/s1600/Helloword.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhamrhxLl0Oyc2VmZtHyAu7JrnMOP0Mp6TC8Pmcaa5j8bCNgCdGy90KlyfKm8ZXtI_W_yqt0fx6dD2ZzgeIDTza1YdTG61w5lrnUbRLEtwiWY00YsGkDiP7go3_s1K_PKS3wwnvroBPy-I/s320/Helloword.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/5400436492173626787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/android-helloworld-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/5400436492173626787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/5400436492173626787'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/android-helloworld-example.html' title='Android HelloWorld Example'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhamrhxLl0Oyc2VmZtHyAu7JrnMOP0Mp6TC8Pmcaa5j8bCNgCdGy90KlyfKm8ZXtI_W_yqt0fx6dD2ZzgeIDTza1YdTG61w5lrnUbRLEtwiWY00YsGkDiP7go3_s1K_PKS3wwnvroBPy-I/s72-c/Helloword.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394806078619892233.post-2458841388884612260</id><published>2012-08-06T04:00:00.000-07:00</published><updated>2012-08-06T04:00:59.298-07:00</updated><title type='text'>Android Activity</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div itemprop=&quot;articleBody&quot; style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#setContentView(android.view.View)&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;setContentView(View)&lt;/a&gt;&lt;/code&gt;. While activities are often presented to the user as full-screen windows, they can also be used in other ways: as floating windows (via a theme with&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/R.attr.html#windowIsFloating&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;windowIsFloating&lt;/a&gt;&lt;/code&gt;&amp;nbsp;set) or embedded inside of another activity (using&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/ActivityGroup.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;ActivityGroup&lt;/a&gt;&lt;/code&gt;). There are two methods almost all subclasses of Activity will implement:&lt;/div&gt;&lt;ul style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onCreate(Bundle)&lt;/a&gt;&lt;/code&gt;&amp;nbsp;is where you initialize your activity. Most importantly, here you will usually call&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#setContentView(int)&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;setContentView(int)&lt;/a&gt;&lt;/code&gt;&amp;nbsp;with a layout resource defining your UI, and using&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#findViewById(int)&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;findViewById(int)&lt;/a&gt;&lt;/code&gt;&amp;nbsp;to retrieve the widgets in that UI that you need to interact with programmatically.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onPause()&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onPause()&lt;/a&gt;&lt;/code&gt;&amp;nbsp;is where you deal with the user leaving your activity. Most importantly, any changes made by the user should at this point be committed (usually to the&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/content/ContentProvider.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;ContentProvider&lt;/a&gt;&lt;/code&gt;&amp;nbsp;holding the data).&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;To be of use with&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/content/Context.html#startActivity(android.content.Intent)&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Context.startActivity()&lt;/a&gt;&lt;/code&gt;, all activity classes must have a corresponding&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/R.styleable.html#AndroidManifestActivity&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;&amp;lt;activity&amp;gt;&lt;/a&gt;&lt;/code&gt;&amp;nbsp;declaration in their package&#39;s&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;AndroidManifest.xml&lt;/code&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;Topics covered here:&lt;/div&gt;&lt;ol style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#Fragments&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Fragments&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Activity Lifecycle&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Configuration Changes&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#StartingActivities&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Starting Activities and Getting Results&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#SavingPersistentState&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Saving Persistent State&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#Permissions&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Permissions&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#ProcessLifecycle&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Process Lifecycle&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;special reference&quot; style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; text-align: -webkit-auto;&quot;&gt;&lt;h3 style=&quot;color: #333333; font-size: 18px; line-height: 20px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;Developer Guides&lt;/h3&gt;&lt;div style=&quot;margin-bottom: 15px;&quot;&gt;The Activity class is an important part of an application&#39;s overall lifecycle, and the way activities are launched and put together is a fundamental part of the platform&#39;s application model. For a detailed perspective on the structure of an Android application and how activities behave, please read the&amp;nbsp;&lt;a href=&quot;http://developer.android.com/guide/topics/fundamentals.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Application Fundamentals&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Tasks and Back Stack&lt;/a&gt;&amp;nbsp;developer guides.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px;&quot;&gt;You can also find a detailed discussion about how to create activities in the&amp;nbsp;&lt;a href=&quot;http://developer.android.com/guide/topics/fundamentals/activities.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Activities&lt;/a&gt;&amp;nbsp;developer guide.&lt;/div&gt;&lt;/div&gt;&lt;a href=&quot;&quot; name=&quot;Fragments&quot; style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; text-align: -webkit-auto;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;h3 style=&quot;background-color: #f9f9f9; color: #333333; font-family: Roboto, sans-serif; font-size: 18px; line-height: 20px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; text-align: -webkit-auto;&quot;&gt;Fragments&lt;/h3&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;Starting with&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#HONEYCOMB&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;HONEYCOMB&lt;/a&gt;&lt;/code&gt;, Activity implementations can make use of the&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Fragment.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;Fragment&lt;/a&gt;&lt;/code&gt;&amp;nbsp;class to better modularize their code, build more sophisticated user interfaces for larger screens, and help scale their application between small and large screens.&lt;a href=&quot;&quot; name=&quot;ActivityLifecycle&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: #f9f9f9; color: #333333; font-family: Roboto, sans-serif; font-size: 18px; line-height: 20px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; text-align: -webkit-auto;&quot;&gt;Activity Lifecycle&lt;/h3&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;Activities in the system are managed as an&amp;nbsp;&lt;em&gt;activity stack&lt;/em&gt;. When a new activity is started, it is placed on the top of the stack and becomes the running activity -- the previous activity always remains below it in the stack, and will not come to the foreground again until the new activity exits.&lt;/div&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;An activity has essentially four states:&lt;/div&gt;&lt;ul style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;If an activity in the foreground of the screen (at the top of the stack), it is&amp;nbsp;&lt;em&gt;active&lt;/em&gt;&amp;nbsp;or&amp;nbsp;&lt;em&gt;running&lt;/em&gt;.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;If an activity has lost focus but is still visible (that is, a new non-full-sized or transparent activity has focus on top of your activity), it is&amp;nbsp;&lt;em&gt;paused&lt;/em&gt;. A paused activity is completely alive (it maintains all state and member information and remains attached to the window manager), but can be killed by the system in extreme low memory situations.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;If an activity is completely obscured by another activity, it is&amp;nbsp;&lt;em&gt;stopped&lt;/em&gt;. It still retains all state and member information, however, it is no longer visible to the user so its window is hidden and it will often be killed by the system when memory is needed elsewhere.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;If an activity is paused or stopped, the system can drop the activity from memory by either asking it to finish, or simply killing its process. When it is displayed again to the user, it must be completely restarted and restored to its previous state.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;The following diagram shows the important state paths of an Activity. The square rectangles represent callback methods you can implement to perform operations when the Activity moves between states. The colored ovals are major states the Activity can be in.&lt;/div&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;&lt;img alt=&quot;State diagram for an Android Activity Lifecycle.&quot; border=&quot;0&quot; src=&quot;http://developer.android.com/images/activity_lifecycle.png&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; margin-bottom: 15px; max-width: 100%; vertical-align: middle;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;There are three key loops you may be interested in monitoring within your activity:&lt;/div&gt;&lt;ul style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;The&amp;nbsp;&lt;b style=&quot;font-weight: bold;&quot;&gt;entire lifetime&lt;/b&gt;&amp;nbsp;of an activity happens between the first call to&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onCreate(Bundle)&lt;/a&gt;&lt;/code&gt;&amp;nbsp;through to a single final call to&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onDestroy()&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onDestroy()&lt;/a&gt;&lt;/code&gt;. An activity will do all setup of &quot;global&quot; state in onCreate(), and release all remaining resources in onDestroy(). For example, if it has a thread running in the background to download data from the network, it may create that thread in onCreate() and then stop the thread in onDestroy().&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;The&amp;nbsp;&lt;b style=&quot;font-weight: bold;&quot;&gt;visible lifetime&lt;/b&gt;&amp;nbsp;of an activity happens between a call to&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onStart()&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onStart()&lt;/a&gt;&lt;/code&gt;&amp;nbsp;until a corresponding call to&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onStop()&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onStop()&lt;/a&gt;&lt;/code&gt;. During this time the user can see the activity on-screen, though it may not be in the foreground and interacting with the user. Between these two methods you can maintain resources that are needed to show the activity to the user. For example, you can register a&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/content/BroadcastReceiver.html&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;BroadcastReceiver&lt;/a&gt;&lt;/code&gt;&amp;nbsp;in onStart() to monitor for changes that impact your UI, and unregister it in onStop() when the user no longer sees what you are displaying. The onStart() and onStop() methods can be called multiple times, as the activity becomes visible and hidden to the user.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;The&amp;nbsp;&lt;b style=&quot;font-weight: bold;&quot;&gt;foreground lifetime&lt;/b&gt;&amp;nbsp;of an activity happens between a call to&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onResume()&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onResume()&lt;/a&gt;&lt;/code&gt;&amp;nbsp;until a corresponding call to&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onPause()&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onPause()&lt;/a&gt;&lt;/code&gt;. During this time the activity is in front of all other activities and interacting with the user. An activity can frequently go between the resumed and paused states -- for example when the device goes to sleep, when an activity result is delivered, when a new intent is delivered -- so the code in these methods should be fairly lightweight.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px; text-align: -webkit-auto;&quot;&gt;The entire lifecycle of an activity is defined by the following Activity methods. All of these are hooks that you can override to do appropriate work when the activity changes state. All activities will implement&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onCreate(Bundle)&lt;/a&gt;&lt;/code&gt;&amp;nbsp;to do their initial setup; many will also implement&amp;nbsp;&lt;code style=&quot;color: #006600; font-size: 1em; font-weight: bold; font: normal normal normal 14px/1.5 &#39;courier new&#39;, courier, monospace;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html#onPause()&quot; style=&quot;color: #258aaf; text-decoration: none;&quot;&gt;onPause()&lt;/a&gt;&lt;/code&gt;&amp;nbsp;to commit changes to data and otherwise prepare to stop interacting with the user. You should always call up to your superclass when implementing these methods.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sukhadiyaraviraj.blogspot.com/feeds/2458841388884612260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/android-activity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/2458841388884612260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394806078619892233/posts/default/2458841388884612260'/><link rel='alternate' type='text/html' href='http://sukhadiyaraviraj.blogspot.com/2012/08/android-activity.html' title='Android Activity'/><author><name>Sukhadiya Raviraj</name><uri>http://www.blogger.com/profile/07056276194529712639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIsz7f8nUQFUXWlPTaGXNZc27GrSBR7_nnd1rL31-OcXh7q0Kfbxnf3-TbiHp7ZoGcz-HtAdXeK66zIZcvDDXwA_jCcFftJlXLeUgr4VeEZhssx_HNGYfBPfs9Pt5mRg/s220/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>