<?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-7189424393311850640</id><updated>2024-09-05T23:22:14.429-04:00</updated><category term="Android"/><category term="Android programming"/><category term="Android Tutorial"/><category term="Android Activities"/><category term="Android debugging"/><category term="Blogger content width"/><category term="Blogging"/><category term="family"/><category term="life"/><category term="poetry"/><title type='text'>Techno Mudo</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-1979645030552970289</id><published>2012-05-26T15:20:00.004-04:00</published><updated>2012-05-26T16:09:03.574-04:00</updated><title type='text'>Preparing for the Science Fair Judging-Practice Makes Perfect!</title><content type='html'>&lt;ul type=&quot;disc&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;If you can communicate your science fair project well,
     you maximize your chances of winning. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Write up a short &quot;speech&quot; (about 2–5 minutes
     long) summarizing your science fair project. Do not restate your abstract
     word by word. You will give this speech (from memory) when you first meet
     the judges. Include in the speech: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;ul type=&quot;circle&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;How you got the idea. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;How you did the experiment (explain any relevant terms
      along the way). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Your results and conclusions. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Why your science fair project is important in today&#39;s
      society (how will it help people today?). You don&#39;t have to cure cancer.
      Perhaps your work will help a small group of people, but it&#39;s still
      important. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Demonstrate that you understand the theory behind why
      your project turns out the way it does. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;If you can&#39;t fit all of this into your presentation,
      be prepared to discuss each of the above topics separately. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Expect to be interrupted when you talk to the judges.
      You will rarely finish your speech. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Organize a list of questions you think the judges will
     ask you and prepare/practice answers for them. A few common questions are
     listed below. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;ul type=&quot;circle&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;How much help did you receive from others? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;What does your data tell you? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Why is this research important? (Who cares if a rocket
      flies well?) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;What do your graphs represent? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;What does your data tell you? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;What problems did you run into while doing your
      experiment and how did you fix them? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;What are the three most interesting things you learned
      when doing this science fair project? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;What further research do you plan on doing, or would
      do, to this science fair project? (Your future study) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Study your background research as you would for a test.
     In some ways, presenting your science fair project is like taking an exam.
     The better you know your background research, the higher the chance you
     have of winning. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;ul type=&quot;circle&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;This is the part I usually had trouble with: I would
      do the research and understand everything, but then I needed to study it.
      I would eventually learn and remember all the facts I should know, but I
      had to sit myself down and study. Force yourself to pretend there is a
      test the next day on all of the information, and you will be prepared. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Practice explaining your science fair project to others
     and pretend they are judges. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;ul type=&quot;circle&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Practice explaining all graphs, tables, your short
      speech, answers to possible questions judges might ask, etc. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Practice explaining the theory behind your science
      fair project. Theory includes everything from your background research. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Videotaping yourself during practice can also be very
      helpful. Although it can be painful to watch the video, you will see the
      mistakes you made and be able to fix them the next time you speak. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Practice explaining your science fair project in simple
     terms so anyone can understand it. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;ul type=&quot;circle&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Many students do not know how to explain their science
      fair project to the general public. If you can explain your project in
      laymen&#39;s terms, you are one step ahead of everyone else! &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/1979645030552970289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2012/05/preparing-for-science-fair-judging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/1979645030552970289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/1979645030552970289'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2012/05/preparing-for-science-fair-judging.html' title='Preparing for the Science Fair Judging-Practice Makes Perfect!'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-7473921892330665409</id><published>2010-09-24T07:40:00.002-04:00</published><updated>2010-09-24T08:12:47.770-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Tutorial"/><title type='text'>Android Programming Jumpstart – 6</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJyJXAez1qI/AAAAAAAAAHI/PLTEwgBijXg/s1600-h/image%5B4%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px&quot; height=&quot;133&quot; alt=&quot;image&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJyJXp6UgDI/AAAAAAAAAHM/WQ3YqtsmRMc/image_thumb%5B2%5D.png?imgmax=800&quot; width=&quot;123&quot; align=&quot;left&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;br&gt;&amp;nbsp; This is lab 6 in my ongoing series of jumpstart Android programming tutorials.&lt;br&gt;&amp;nbsp; This lab will focus on selectable ListViews. &lt;br&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;br&gt;Here are some terms that you’ll need to understand to work with ListViews:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/content/Context.html&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;Context&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt; &lt;br&gt; &lt;ul&gt; &lt;li&gt;Interface to information about an application environment &lt;li&gt;Typically when a context parameter is needed for your app you will use (this)&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/Adapter.html&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;Adapters&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt; &lt;br&gt; &lt;ul&gt; &lt;li&gt;The bridge between a View and the data for that view&lt;a href=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJyJYA-1B6I/AAAAAAAAAHQ/lg50ukkduz4/s1600-h/image%5B53%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px&quot; height=&quot;116&quot; alt=&quot;image&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJyJYe1J1qI/AAAAAAAAAHU/BVdwEKGT2Yw/image_thumb%5B33%5D.png?imgmax=800&quot; width=&quot;240&quot; align=&quot;right&quot; border=&quot;0&quot;&gt;&lt;/a&gt; &lt;li&gt;Provides access to the data items&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/ArrayAdapter.html&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;ArrayAdapter&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt; &lt;br&gt; &lt;ul&gt; &lt;li&gt;The ArrayAdapter constructor takes three parameters: &lt;br&gt; &lt;ul&gt; &lt;li&gt;The Context to use (this) &lt;li&gt;The resource ID of a view to use &lt;li&gt;The actual array or list of items to show&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;By default, the ArrayAdapter will invoke toString() on the objects in the list and wrap each of those strings in the view designated by the supplied resource. &lt;li&gt;android.R.layout.simple_list_item_1 &lt;br&gt; &lt;ul&gt; &lt;li&gt;a built in resource that turns those strings into TextView objects styled in a particular way.&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Definitions for some built in resources can be found here &lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/R.layout.html&quot;&gt;http://developer.android.com/reference/android/R.layout.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/ui/ui-events.html&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;Listeners&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt; &lt;br&gt; &lt;ul&gt; &lt;li&gt;Interface to setup callbacks for actions on your widgets &lt;li&gt;Use to set up link between a button and onClick&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/ListView.html&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;ListView&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt; &lt;br&gt; &lt;ul&gt; &lt;li&gt;To use you will need to define one in your layout &lt;br&gt; &lt;ul&gt; &lt;li&gt;android.R.layout.simple_list_item_1 &lt;li&gt;android.R.layout.simple_list_item_single_choice &lt;li&gt;android.R.layout.simple_list_item_multiple_choice&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Assign data to it using setAdapter() &lt;li&gt;Assign functionality to catch users selections using a Listener using setOnItemClickListener() &lt;li&gt;If your View is really just your list, you can make things easier on yourself by having your activity extend ListActivity &lt;br&gt; &lt;ul&gt; &lt;li&gt;It will then construct the full screen list for you &lt;li&gt;You must name your ListView @android:id/list&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Check out the two different ways of working with a ListView below.&amp;nbsp; In this first example everything is setup in onCreate().&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJyVu9QoqFI/AAAAAAAAAIA/JB6DUd_AWW8/s1600-h/image%5B22%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px&quot; height=&quot;315&quot; alt=&quot;image&quot; src=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJyVvHjo-7I/AAAAAAAAAIE/V6Fxi3_qaxY/image_thumb%5B15%5D.png?imgmax=800&quot; width=&quot;435&quot; border=&quot;0&quot;&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJyJZBRUFHI/AAAAAAAAAHY/aKBlhA_0hzs/s1600-h/image%5B32%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;480&quot; alt=&quot;image&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJyJZdmcyFI/AAAAAAAAAHc/Zo27FLOOB9M/image_thumb%5B18%5D.png?imgmax=800&quot; width=&quot;468&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;In this example everything we have broken it out. &lt;br&gt;&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJyVvYW3fRI/AAAAAAAAAII/dTvkbR22iM8/s1600-h/image%5B23%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px&quot; height=&quot;327&quot; alt=&quot;image&quot; src=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJyVvwX1xGI/AAAAAAAAAIM/Gi0nLItLisY/image_thumb%5B16%5D.png?imgmax=800&quot; width=&quot;447&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJyJaME4LXI/AAAAAAAAAHg/DeKSkIhgzRc/s1600-h/image%5B37%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;480&quot; alt=&quot;image&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJyJaTTa4dI/AAAAAAAAAHk/Go6y3qFvRgI/image_thumb%5B21%5D.png?imgmax=800&quot; width=&quot;583&quot; border=&quot;0&quot;&gt;&lt;/a&gt; &lt;br&gt;&lt;br&gt;Here are some different types of usage for a ListView.&amp;nbsp; &lt;br&gt;It is quite versatile and can be used for single or multi selections.&lt;br&gt;&lt;a href=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJyJa9XKjrI/AAAAAAAAAHo/khRDlZizWF0/s1600-h/image%5B27%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;381&quot; alt=&quot;image&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJyJbl5r03I/AAAAAAAAAHs/5BcTqmSMeB8/image_thumb%5B15%5D.png?imgmax=800&quot; width=&quot;640&quot; border=&quot;0&quot;&gt;&lt;/a&gt;  </content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/7473921892330665409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-6_24.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/7473921892330665409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/7473921892330665409'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-6_24.html' title='Android Programming Jumpstart – 6'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_6DfCvg4U2wI/TJyJXp6UgDI/AAAAAAAAAHM/WQ3YqtsmRMc/s72-c/image_thumb%5B2%5D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-3457660480109681676</id><published>2010-09-22T22:53:00.004-04:00</published><updated>2010-09-24T08:01:52.329-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Tutorial"/><title type='text'>Android Programming Jumpstart – 5</title><content type='html'>&lt;a href=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJrBBSW6MUI/AAAAAAAAAGg/hjr58CgcsdI/s1600-h/image%5B4%5D.png&quot;&gt;&lt;img align=&quot;left&quot; alt=&quot;image&quot; border=&quot;0&quot; height=&quot;133&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJrBBk5X-nI/AAAAAAAAAGk/64IpZI9AGvs/image_thumb%5B2%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;&quot; title=&quot;image&quot; width=&quot;123&quot; /&gt;&lt;/a&gt; This is lab five in my ongoing series of jumpstart Android programming tutorials.&lt;br /&gt;
This lab will focus on containers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need containers to better organize our widgets&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/LinearLayout.html&quot;&gt;LinearLayout&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Use to lineup contents in rows or columns&lt;/li&gt;
&lt;li&gt;:orientation property - set the value to be horizontal for a row or vertical for a column.&lt;/li&gt;
&lt;li&gt;Fill up the space – widgets inside a LinearLayout must set layout_width and layout_height, by a dimension, wrap_content, or fill_parent&lt;/li&gt;
&lt;li&gt;:layout_weight property – sets what proportion of the free space a widget gets. If there are two widgets and you set one’s weight to 1 and the other one’s to 2, the second will get twice as much of the free space.&lt;/li&gt;
&lt;li&gt;:layout_gravity – alignment - default for LinearLayout is align top left. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;For LL columns values are left, center_horizontal, and right&lt;/li&gt;
&lt;li&gt;For LL rows – default to let the widgets align along their bottom, but you could use center_vertical to center along the row’s vertical midpoint&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;:padding property – use this to insert whitespace between widgets. Using this property will add padding around the widget equally. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;If you need the padding to vary, use android:padding&amp;lt;Left, Right, Top, Bottom&amp;gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/RelativeLayout.html&quot;&gt;RelativeLayout&lt;/a&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/RelativeLayout.html&quot;&gt; &lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Contents are laid out based on their relationship to the other widgets and the parent container&lt;/li&gt;
&lt;li&gt;Alignment is based on total size – includes padding if any&lt;/li&gt;
&lt;li&gt;Set relationships to parent container using: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;android:layout_alignParrent&amp;lt;Top, Bottom, Left, Right&amp;gt;&lt;/li&gt;
&lt;li&gt;android:layout_center&amp;lt;Horizontal, Vertical, InParent&amp;gt;&lt;/li&gt;
&lt;li&gt;These are set using true or false&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Set Relationships to other widgets using: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Referenced widgets need to have an id tag and should be referenced using “@id”&lt;/li&gt;
&lt;li&gt;android:layout_&amp;lt;above, below, toLeftOf, toRightOf&amp;gt;&lt;/li&gt;
&lt;li&gt;android:layout_align&amp;lt;Top, Bottom, Left, Right, Baseline&amp;gt;&lt;/li&gt;
&lt;li&gt;android:layout_toRightOf = &quot;@id/widget_a&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJrBCJFOBMI/AAAAAAAAAGo/wmdKIPAxrhM/s1600-h/image%5B9%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;455&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJrBCfO26sI/AAAAAAAAAGs/LuuCB6D6t6c/image_thumb%5B5%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJrBC0I_MbI/AAAAAAAAAGw/dOW3HW11lRM/s1600-h/image%5B26%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;480&quot; src=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJrBDUuZxPI/AAAAAAAAAG0/b4VtXodixqg/image_thumb%5B16%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;612&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/TableLayout.html&quot;&gt;TableLayout&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Layout a grid just like HTML tables&lt;/li&gt;
&lt;li&gt;TableLayout controls the overall characteristics of the container&lt;/li&gt;
&lt;li&gt;Your widgets go into TableRow containers&lt;/li&gt;
&lt;li&gt;Columns are controlled less directly than in HTML &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Think one column per widget in your widest row&lt;/li&gt;
&lt;li&gt;Widgets can span columns using android:layout_span&lt;/li&gt;
&lt;li&gt;Fills left to right or specify the number using android:layout_column&lt;/li&gt;
&lt;li&gt;Like your wallet – zero based numbering&lt;/li&gt;
&lt;li&gt;Confusingly, Android will let you place widgets between rows without being in a TableRow container, but its width will automatically be set to fill_parent&lt;/li&gt;
&lt;li&gt;Columns size themselves to the width of the widest widget in the column, but you can control this behavior by setting properties on the TableLayout itself using:&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;android:&amp;lt;stretchColumns, shrinkColumns, collapseColumns&amp;gt;&lt;/li&gt;
&lt;li&gt;These take a column number or a comma separated list of column numbers&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/ScrollView.html&quot;&gt;Scrollview&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Given that the Android device will have limited screen area, at some point you will have to use scrolling&lt;/li&gt;
&lt;li&gt;Can only have one child element – but that child can have many elements&lt;/li&gt;
&lt;li&gt;There is a &lt;a href=&quot;http://developer.android.com/reference/android/widget/HorizontalScrollView.html&quot;&gt;HorizontalScrollView&lt;/a&gt;, but generally users mind scrolling up and down less than side to side&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;a href=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJrBDtHaRvI/AAAAAAAAAG4/Bbjp2JpnwyM/s1600-h/image%5B31%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;396&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJrBEEsDF9I/AAAAAAAAAG8/1SZ02aSrzUU/image_thumb%5B19%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Some sample code&lt;br /&gt;
&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJrBErfHuqI/AAAAAAAAAHA/4ACrNzZR9tQ/s1600-h/image%5B37%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;559&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJrBFfOsaAI/AAAAAAAAAHE/GaLXGYUSx9Y/image_thumb%5B23%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;986&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/3457660480109681676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/3457660480109681676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/3457660480109681676'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-5.html' title='Android Programming Jumpstart – 5'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_6DfCvg4U2wI/TJrBBk5X-nI/AAAAAAAAAGk/64IpZI9AGvs/s72-c/image_thumb%5B2%5D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-8178457023987906315</id><published>2010-09-22T22:37:00.004-04:00</published><updated>2012-03-28T09:26:36.991-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Tutorial"/><title type='text'>Android Programming Jumpstart - 4</title><content type='html'>&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJq9R4BGrEI/AAAAAAAAAF8/7_oeZcL48vU/s1600-h/image4.png&quot;&gt;&lt;img align=&quot;left&quot; alt=&quot;image&quot; border=&quot;0&quot; height=&quot;133&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJq9SFQtv3I/AAAAAAAAAGA/bvjpaZj5Ico/image_thumb2.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;&quot; title=&quot;image&quot; width=&quot;123&quot; /&gt;&lt;/a&gt; This is part four of my series on jump-starting your Android programming experience.&amp;nbsp; &lt;br /&gt;
This lab focuses on Android Widgets.&amp;nbsp; The tutorials from here on out will gather speed and expect that you do some research of your own.&amp;nbsp; Not so much spoon feeding from now on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/TextView.html&quot;&gt;TextView&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Can do all the things you would expect, set bold, italic, set color&lt;/li&gt;
&lt;li&gt;Can set the text in code, XML, or via a resource defined elsewhere res/values/strings.xml (@string/hello)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/Button.html&quot;&gt;Button&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Derives from TextView&lt;/li&gt;
&lt;li&gt;Using 1.6 or better now can set the associated method an additional way to the OnClickListener&lt;/li&gt;
&lt;li&gt;In the XML attributes for the button add android:onClick=“functionName”&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Images &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/ImageView.html&quot;&gt;ImageView&lt;/a&gt;, &lt;a href=&quot;http://developer.android.com/reference/android/widget/ImageButton.html&quot;&gt;ImageButton&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In main.xml need to include android:src attribute&lt;/li&gt;
&lt;li&gt;supports common still-image formats PNG, JPG, and GIF&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/EditText.html&quot;&gt;EditText&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Derives from TextView&lt;/li&gt;
&lt;li&gt;Typical Edit box properties &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Also items like autoText, digits, singleLine&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/CheckBox.html&quot;&gt;Checkbox&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Derives from CompoundButton which derives from TextView&lt;/li&gt;
&lt;li&gt;Typical checkbox properties, isChecked, setChecked, toggle&lt;/li&gt;
&lt;li&gt;Can wire up a handler right from the XML just like the button or set up the OnCheckedChangeListener&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/RadioButton.html&quot;&gt;RadioButton&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Derives from CompoundButton which derives from TextView&lt;/li&gt;
&lt;li&gt;Place inside a RadioGroup&lt;/li&gt;
&lt;li&gt;Typical properties, check, clearcheck, getCheckedRadioButtonId&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Useful functions &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;setEnabled, isEnabled, requestFocus, isFocused, getParent, findViewById&lt;/li&gt;
&lt;li&gt;android:autoText - control if the field should provide automatic spelling assistance&lt;/li&gt;
&lt;li&gt;android:capitalize - control if the field should automatically capitalize the first letter of entered text (e.g., first name, city)&lt;/li&gt;
&lt;li&gt;android:digits - configure the field to accept only certain digits&lt;/li&gt;
&lt;li&gt;android:singleLine - control if the field is for single-line input or multiple-line input&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Good Resource &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/resources/tutorials/views/hello-formstuff.html&quot;&gt;http://developer.android.com/resources/tutorials/views/hello-formstuff.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
Use your IDE to try to replicate what I have depicted below.&amp;nbsp; Be creative and use your own names/labels.&lt;br /&gt;
&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJq9SuFEDFI/AAAAAAAAAGE/JiohQwBromI/s1600-h/image22.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;417&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJq9TGAkGzI/AAAAAAAAAGM/J-vSxXmxwvw/image_thumb16.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&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;http://lh6.ggpht.com/_6DfCvg4U2wI/TJq9Thn5yaI/AAAAAAAAAGQ/A1vvzfR2wPo/s1600-h/image27.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;436&quot; src=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJq9USlRtfI/AAAAAAAAAGU/qfmLtecdS80/image_thumb19.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;a href=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJq9UqzxR_I/AAAAAAAAAGY/dDqwPL5ewnY/s1600-h/image32.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;455&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJq9VPVBwuI/AAAAAAAAAGc/O40mB6tEzXw/image_thumb22.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;b&gt;Some sample code for you&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;public class MyWidget101 extends Activity&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;/** Called when the activity is first created. */&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onCreate(Bundle savedInstanceState)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setContentView(R.layout.main);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style=&quot;color: green;&quot;&gt;// end onCreate&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// This is the method wired to my button in main.xml&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void simpleBtnClick(View theButton)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Toast.makeText( getApplicationContext(), &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; &quot;Dude, you clicked my button.&quot;, &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; Toast.LENGTH_SHORT&amp;nbsp; ).show();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// This is the method wired to my checkbox in main.xml&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void simpleCheckbox(View theCheckBox)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// cast the passed in view to a Checkbox&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CheckBox chkbox = (CheckBox)theCheckBox;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// update its text&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( chkbox.isChecked() )&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; chkbox.setText(&quot;Checked&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; chkbox.setText(&quot;Unchecked&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;/* OR we could have done it like this&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (((CheckBox)theCheckBox).isChecked())&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; ((CheckBox)theCheckBox).setText(&quot;1Checked&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; ((CheckBox)theCheckBox).setText(&quot;2Unchecked&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style=&quot;color: green;&quot;&gt;// end simpleCheckbox&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This is the method wired to my radio buttons in main.xml&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void simpleRadioButtonClick(View theButton)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RadioButton rb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = (RadioButton)theButton;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EditText&amp;nbsp;&amp;nbsp;&amp;nbsp; editBox = (EditText)findViewByID(R.id.EditText01);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editBox.setText(rb.getText());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;}&lt;span style=&quot;color: green;&quot;&gt;// end class MyWidget101&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/8178457023987906315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/8178457023987906315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/8178457023987906315'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-4.html' title='Android Programming Jumpstart - 4'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_6DfCvg4U2wI/TJq9SFQtv3I/AAAAAAAAAGA/bvjpaZj5Ico/s72-c/image_thumb2.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-885319726604893562</id><published>2010-09-22T22:04:00.004-04:00</published><updated>2010-09-24T07:56:26.334-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Tutorial"/><title type='text'>Android Programming Jumpstart - 3</title><content type='html'>&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJq1qdBBvwI/AAAAAAAAAFM/9wgdBAQFhjY/s1600-h/image%5B4%5D.png&quot;&gt;&lt;img align=&quot;left&quot; alt=&quot;image&quot; border=&quot;0&quot; height=&quot;133&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJq1qstlu5I/AAAAAAAAAFQ/G1ZZUjPf6QQ/image_thumb%5B2%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;&quot; title=&quot;image&quot; width=&quot;123&quot; /&gt;&lt;/a&gt; This is part three in my series of quick tutorials to get you up and started programming Android applications.&amp;nbsp; &lt;br /&gt;
For this lab we will be looking more into XML defined layouts for your GUIs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;A common approach is to use an XML based file to layout the UI.&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Specifies the relationships of widgets with each other and their containers&lt;/li&gt;
&lt;li&gt;Very similar to laying out a webpage&lt;/li&gt;
&lt;li&gt;Located in res/layout – aka main.xml&lt;/li&gt;
&lt;li&gt;Your layout file will be a tree of XML elements&lt;/li&gt;
&lt;/ul&gt;&lt;strong&gt;Elements attributes AKA properties specify the its look and behavior&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;You can access these elements from your Java code&lt;/li&gt;
&lt;/ul&gt;&lt;strong&gt;Similar to HTML/Javascript programming and you can use third party tools to create the UI layout.&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Eclipse and Motodev&lt;/li&gt;
&lt;li&gt;DroidDraw - &lt;a href=&quot;http://www.droiddraw.org/&quot;&gt;http://www.droiddraw.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;WireframeSketcher - &lt;a href=&quot;http://wireframesketcher.com/index.html&quot;&gt;http://wireframesketcher.com/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Any text editor&lt;/li&gt;
&lt;/ul&gt;Here is a project close to where we left off in part 2.&lt;br /&gt;
&lt;a href=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJq1qy59UpI/AAAAAAAAAFU/I1-gfpqzSv8/s1600-h/image%5B10%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;533&quot; src=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJq1rd2NZgI/AAAAAAAAAFY/OxhMoGOzCpg/image_thumb%5B6%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;639&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
By the by – I have found that Eclipse can be twitchy if you try to run and the main.xml has focus in the IDE…&amp;nbsp; &lt;br /&gt;
My recommendation – don’t build or try to install from the IDE if an XML file has focus.&lt;br /&gt;
&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJq1r-NKhfI/AAAAAAAAAFc/JvMoVXyHy1I/s1600-h/image%5B18%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;558&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJq1sZwnGKI/AAAAAAAAAFg/kLkSmeOcgJU/image_thumb%5B10%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;670&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJq1sswH_oI/AAAAAAAAAFk/qAt96Ddv7JU/s1600-h/image%5B25%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;102&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJq1s95tMnI/AAAAAAAAAFo/dkprvaW5SYs/image_thumb%5B15%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;&quot; title=&quot;image&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;XML element attributes&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;You won’t need to reference all your widgets in your Java code, but using an ID will allow you to do that&amp;nbsp; -&amp;nbsp; @+id/[your ID] – this creates a new ID resource &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;You can then access this later with &lt;a href=&quot;http://developer.android.com/reference/android/view/View.html&quot;&gt;View.findViewById&lt;/a&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/View.html&quot;&gt;()&lt;/a&gt; or &lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html&quot;&gt;Activity.findViewById&lt;/a&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html&quot;&gt;()&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;layout_width, layout_height &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;These can be used to specify the size of your widget. The value could be one of the constants below or an actual dimension. Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters).&lt;/li&gt;
&lt;li&gt;FILL_PARENT – make the view wants to be as big as its parent minus padding&lt;/li&gt;
&lt;li&gt;WRAP_CONTENT – make the view wants to be just big enough to enclose its content plus padding&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;text &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The text value you want displayed. This can be updated during runtime. &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Much more&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt;SetContentView now uses our layout we defined in main.xml&lt;/li&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt;Used findViewById to get the Button instance using the @+id value we defined&lt;/li&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt;Used an anonymous inner class to override the onclick handler &lt;br /&gt;
&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJq1tGgqEzI/AAAAAAAAAFs/NPHeGmtSm-4/s1600-h/image%5B37%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;579&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJq1to8ugWI/AAAAAAAAAFw/BBl1SZlj584/image_thumb%5B25%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;&quot; title=&quot;image&quot; width=&quot;556&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
The complete application – same as what we did in part 2.&lt;br /&gt;
&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJq1uDVJNnI/AAAAAAAAAF0/Olj1IOX8aPo/s1600-h/image%5B43%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;455&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJq1ubEf70I/AAAAAAAAAF4/0s_JJ4_426A/image_thumb%5B29%5D.png?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
In the next lab we will more into the widgets and how to use them.&lt;/li&gt;</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/885319726604893562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/885319726604893562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/885319726604893562'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-3.html' title='Android Programming Jumpstart - 3'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_6DfCvg4U2wI/TJq1qstlu5I/AAAAAAAAAFQ/G1ZZUjPf6QQ/s72-c/image_thumb%5B2%5D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-6727650381168436733</id><published>2010-09-22T21:29:00.006-04:00</published><updated>2010-09-24T07:52:36.315-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Tutorial"/><title type='text'>Android Programming Jumpstart - 1</title><content type='html'>&lt;div class=&quot;ExternalClass62A3247C5E224EF399417E4EB3FCC632&quot;&gt;&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJqtUZaQ_KI/AAAAAAAAADs/IwS94YI4kKY/s1600-h/image%5B3%5D.png&quot;&gt;&lt;img align=&quot;left&quot; alt=&quot;image&quot; border=&quot;0&quot; height=&quot;137&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJqtUtxJZcI/AAAAAAAAADw/npFp6HeSoOc/image_thumb%5B1%5D.png?imgmax=800&quot; style=&quot;border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; margin-left: 0px; margin-right: 0px;&quot; title=&quot;image&quot; width=&quot;127&quot; /&gt;&lt;/a&gt; These series of labs are intended to give interested parties a quick ramp up on programming for the Android environment.&amp;nbsp; I will converting these to a wiki page in the future so that others can add to them.&lt;/div&gt;&lt;div class=&quot;ExternalClass62A3247C5E224EF399417E4EB3FCC632&quot;&gt;I will not be spending much time regarding setting up a tool of choice.&amp;nbsp; I normally use Motodev or Eclipse.&amp;nbsp; The setup for these is already well documented online and the Motodev installer takes care of a lot for you.&amp;nbsp; First lets review some basic terminology that will be used a lot.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;ExternalClass62A3247C5E224EF399417E4EB3FCC632&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;ExternalClass62A3247C5E224EF399417E4EB3FCC632&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;ExternalClass62A3247C5E224EF399417E4EB3FCC632&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Activity.html&quot;&gt;Activities&lt;/a&gt;&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;User interface building block, &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Similar to PC window or dialog&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Short lived, can be shut down anytime&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/providers/content-providers.html&quot;&gt;Content Provider&lt;/a&gt;&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Provide abstraction of data stored on device that is accessible by multiple apps&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Maintain control over how your data is access&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Short lived, can be shut down anytime&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://developer.android.com/reference/android/app/Service.html&quot;&gt;Services&lt;/a&gt;&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Designed to keep running independent of an activity&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Background processing&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;example: music player &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://developer.android.com/reference/android/content/Intent.html&quot;&gt;Intents&lt;/a&gt;&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;System messages, notifying apps of events&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Can respond to and create your own&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/View.html&quot;&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Building block for UIs&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Base class for widgets&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/view/ViewGroup.html&quot;&gt;&lt;strong&gt;ViewGroup&lt;/strong&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Subclass of View&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Base class for layouts, containers for Views or ViewGroups&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;strong&gt;What’s built into the environment&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Storage&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Package data files for things that don’t change like icons and help files&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Get space on device or SD card for databases or files storing user entered data&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Most devices internet ready&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Can access Java sockets&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;WebKit Web Browser widget&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multimedia&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Play back and record audio and video&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GPS&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Most devices have GPS&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Phone&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Apps can start phone calls, send and receive text messages&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;strong&gt;Project Folder Structure&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/manifest/manifest-intro.html&quot;&gt;AndroidManifest.xml&lt;/a&gt;&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;key element&lt;/li&gt;
&lt;li&gt;Lists all activities, services, permissions, API level&lt;/li&gt;
&lt;li&gt;Used by Android Market to filter what apps are offered. So min Android 2.0 apps won’t be offered to someone running Android 1.5&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;default.properties – generated file – do not touch&lt;/li&gt;
&lt;li&gt;build.xml – not needed if using IDE, Ant script, generated&lt;/li&gt;
&lt;li&gt;src/ - java source code&lt;/li&gt;
&lt;li&gt;gen/ &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Android build tools use this for source code they generate&lt;/li&gt;
&lt;li&gt;generated – do not touch&lt;/li&gt;
&lt;li&gt;R.java will be in here and is used to reference items&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;–es/ - icons, layouts&lt;/li&gt;
&lt;li&gt;bin/ - compiled output&lt;/li&gt;
&lt;li&gt;assets/ - files you want packaged with your app&lt;/li&gt;
&lt;li&gt;libs/ - use this folder to hold third party JARs&lt;/li&gt;
&lt;li&gt;tests/ - holds separate project for testing yours – I haven’t used this yet&lt;/li&gt;
&lt;li&gt;APK file – the zip archive that is essentially the android executable&lt;/li&gt;
&lt;/ul&gt;&lt;strong&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/manifest/manifest-intro.html&quot;&gt;AndroidManifest.xml&lt;/a&gt;&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;uses-permission element – indicates what permissions your app needs&lt;/li&gt;
&lt;li&gt;permissions elements – declares the permissions that Activities and Services require other apps to have in order to interact with your app&lt;/li&gt;
&lt;li&gt;instrumentation elements – indicates the code that is invoked on key system events&lt;/li&gt;
&lt;li&gt;uses-library elements – attach to optional Android components&lt;/li&gt;
&lt;li&gt;uses-sdk element&lt;/li&gt;
&lt;li&gt;indicate the version of Android SDK the app was built for&lt;/li&gt;
&lt;li&gt;Set minSdkVersion for Android Market&lt;/li&gt;
&lt;li&gt;application element – define your app&lt;/li&gt;
&lt;li&gt;activity elements&lt;/li&gt;
&lt;li&gt;android.name – class implementing the activity&lt;/li&gt;
&lt;li&gt;android.label – display name for the activity&lt;/li&gt;
&lt;li&gt;intent-filter – under what conditions the activity will be displayed&lt;/li&gt;
&lt;li&gt;receiver – non-activities that should be triggered under certain conditions&lt;/li&gt;
&lt;li&gt;provider – components that supply data to activities&lt;/li&gt;
&lt;li&gt;services – longer running code that can operate independently&lt;/li&gt;
&lt;/ul&gt;&lt;strong&gt;&lt;a href=&quot;http://developer.android.com/guide/developing/tools/emulator.html&quot;&gt;Android Emulators&lt;/a&gt; &lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Setup via AVD Manager&lt;/li&gt;
&lt;li&gt;Meant to simulate real Android devices&lt;/li&gt;
&lt;li&gt;Must specify target&lt;/li&gt;
&lt;li&gt;What type of device will the AVD pretend to be&lt;/li&gt;
&lt;li&gt;Can’t edit after creating&lt;/li&gt;
&lt;/ul&gt;&lt;strong&gt;Android SDK and AVD Manager&lt;/strong&gt;&lt;br /&gt;
&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJqtVEc5MNI/AAAAAAAAAD0/W-GZDpsRAl0/s1600-h/image%5B9%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;410&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJqtVrEub7I/AAAAAAAAAD4/r0uneuZ149U/image_thumb%5B5%5D.png?imgmax=800&quot; style=&quot;border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Can be launched from within Motodev or via command line&lt;/li&gt;
&lt;li&gt;Available Packages - Install and update Android SDK components&lt;/li&gt;
&lt;li&gt;Select the components to install&lt;/li&gt;
&lt;li&gt;Updates will also be listed here&lt;/li&gt;
&lt;li&gt;Can add additional sites to look for components&lt;/li&gt;
&lt;li&gt;Virtual Devices - Create and edit Android Virtual Devices (AVDs) that provide the emulator for testing apps&lt;/li&gt;
&lt;li&gt;Each AVD behaves as a totally distinct device, so installing your app on one AVD does not affect any other AVDs that you have created.&lt;/li&gt;
&lt;li&gt;More detailed instructions are available on the Android developer site&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/sdk/adding-components.html&quot;&gt;http://developer.android.com/sdk/adding-components.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Creating the AVD &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://developer.android.com/guide/developing/tools/avd.html&quot;&gt;Google info&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Name the AVD&lt;/li&gt;
&lt;li&gt;I like to include the version&lt;/li&gt;
&lt;li&gt;Set the target level&lt;/li&gt;
&lt;li&gt;Can leave the rest as is&lt;/li&gt;
&lt;li&gt;After you create the AVD you will see it listed in the devices tab&lt;/li&gt;
&lt;li&gt;Start it!&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;a href=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJqtV7IM36I/AAAAAAAAAD8/zDs_zIcEf4I/s1600-h/image%5B14%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;364&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJqtWvxJx5I/AAAAAAAAAEA/J4eOPXcBkOY/image_thumb%5B8%5D.png?imgmax=800&quot; style=&quot;border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJqtWw7sVjI/AAAAAAAAAEE/jzTYcwRIXRU/s1600-h/image%5B28%5D.png&quot;&gt;&lt;img align=&quot;left&quot; alt=&quot;image&quot; border=&quot;0&quot; height=&quot;488&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJqtXLExxRI/AAAAAAAAAEI/cRMp5c2ggdI/image_thumb%5B20%5D.png?imgmax=800&quot; style=&quot;border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; margin-left: 0px; margin-right: 0px;&quot; title=&quot;image&quot; width=&quot;295&quot; /&gt;&lt;/a&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating a new project requires:&amp;nbsp; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp; Project name&lt;/li&gt;
&lt;li&gt;&amp;nbsp; Contents location&lt;/li&gt;
&lt;li&gt;&amp;nbsp; Target&lt;/li&gt;
&lt;li&gt;&amp;nbsp; App Name&lt;/li&gt;
&lt;li&gt;&amp;nbsp; Package Name – must have at least two identifiers&lt;/li&gt;
&lt;li&gt;&amp;nbsp; Activity Name – if creating&lt;/li&gt;
&lt;li&gt;&amp;nbsp; Min SDK Version - optional&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a href=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJqtX4_dXwI/AAAAAAAAAEM/OkGOY3nSrSw/s1600-h/image%5B34%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;405&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJqtYb9c2FI/AAAAAAAAAEQ/C7EfwxCpPi4/image_thumb%5B24%5D.png?imgmax=800&quot; style=&quot;border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;644&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;What you can find in your project Folder Structure&lt;/strong&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;src/ - java source code&lt;/li&gt;
&lt;li&gt;gen/&lt;/li&gt;
&lt;li&gt;Android build tools use this for source code they generate&lt;/li&gt;
&lt;li&gt;generated – do not touch&lt;/li&gt;
&lt;li&gt;R.java will be in here and is used to reference items&lt;/li&gt;
&lt;li&gt;assets/ - files you want packaged with your app&lt;/li&gt;
&lt;li&gt;res/ - icons, layouts&lt;/li&gt;
&lt;li&gt;AndroidManifest.xml&lt;/li&gt;
&lt;li&gt;key element&lt;/li&gt;
&lt;li&gt;Lists all activities, services, permissions, API level&lt;/li&gt;
&lt;li&gt;Used by Android Market to filter what apps are offered. So min Android 2.0 apps won’t be offered to someone running Android 1.5&lt;/li&gt;
&lt;li&gt;default.properties – generated file – do not touch&lt;/li&gt;
&lt;li&gt;build.xml – not needed if using IDE, Ant script, generated&lt;/li&gt;
&lt;li&gt;bin/ - compiled output&lt;/li&gt;
&lt;li&gt;libs/ - use this folder to hold third party JARs&lt;/li&gt;
&lt;li&gt;tests/ - holds separate project for testing yours – I haven’t used this yet&lt;/li&gt;
&lt;li&gt;APK file – the zip archive that is essentially the android executable&lt;/li&gt;
&lt;/ul&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/manifest/manifest-intro.html&quot;&gt;&lt;strong&gt;AndroidManifest.xml&lt;/strong&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Every application must have an AndroidManifest.xml file in its root directory. The manifest presents information about the application to the Android system, information the system must have before it can run any of the application&#39;s code&lt;/li&gt;
&lt;li&gt;uses-permission element – indicates what permissions your app needs&lt;/li&gt;
&lt;li&gt;permissions elements – declares the permissions that Activities and Services require other apps to have in order to interact with your app&lt;/li&gt;
&lt;li&gt;instrumentation elements – indicates the code that is invoked on key system events&lt;/li&gt;
&lt;li&gt;uses-library elements – attach to optional Android components&lt;/li&gt;
&lt;li&gt;uses-sdk element&lt;/li&gt;
&lt;li&gt;indicate the version of Android SDK the app was built for&lt;/li&gt;
&lt;li&gt;Set minSdkVersion for Android Market&lt;/li&gt;
&lt;li&gt;application element – define your app&lt;/li&gt;
&lt;li&gt;activity elements&lt;/li&gt;
&lt;li&gt;android.name – class implementing the activity&lt;/li&gt;
&lt;li&gt;android.label – display name for the activity&lt;/li&gt;
&lt;li&gt;intent-filter – under what conditions the activity will be displayed&lt;/li&gt;
&lt;li&gt;receiver – non-activities that should be triggered under certain conditions&lt;/li&gt;
&lt;li&gt;provider – components that supply data to activities&lt;/li&gt;
&lt;li&gt;services – longer running code that can operate independently&lt;/li&gt;
&lt;/ul&gt;&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TJqtYsZgjJI/AAAAAAAAAEU/jY6t2yMG7n8/s1600-h/image%5B39%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;354&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJqtZHltTWI/AAAAAAAAAEY/3FsSjarQ7jE/image_thumb%5B27%5D.png?imgmax=800&quot; style=&quot;border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;644&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/6727650381168436733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-labs-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/6727650381168436733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/6727650381168436733'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-labs-1.html' title='Android Programming Jumpstart - 1'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_6DfCvg4U2wI/TJqtUtxJZcI/AAAAAAAAADw/npFp6HeSoOc/s72-c/image_thumb%5B1%5D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-1212959573277557229</id><published>2010-09-11T13:13:00.004-04:00</published><updated>2010-09-22T21:34:31.406-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Tutorial"/><title type='text'>Android Programming Jumpstart - 2</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TIu4to0zI4I/AAAAAAAAACQ/p7C5ftl6XF0/s1600-h/image%5B23%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px&quot; height=&quot;129&quot; alt=&quot;image&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TIu4t8sDYQI/AAAAAAAAACU/pPs2dzlr864/image_thumb%5B15%5D.png?imgmax=800&quot; width=&quot;119&quot; align=&quot;left&quot; border=&quot;0&quot;&gt;&lt;/a&gt;This is part two of the series of labs providing quick ramp up on programming for the Android environment.&lt;/p&gt; &lt;p&gt;As I stated in part 1, normally I use Motodev or Eclipse.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This is where we left of last time.&amp;nbsp; We had made our first hello world style project.&amp;nbsp; But it wasn’t very impressive.&lt;a href=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TIu4y34uaEI/AAAAAAAAAC4/sVSl1tzeKtY/s1600-h/image%5B87%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;350&quot; alt=&quot;image&quot; src=&quot;http://lh5.ggpht.com/_6DfCvg4U2wI/TIu4zpvfcHI/AAAAAAAAAC8/MSOk52qc53Q/image_thumb%5B57%5D.png?imgmax=800&quot; width=&quot;640&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Let’s expand the project to add a button that will pop up a message to the user.&amp;nbsp; &lt;/p&gt; &lt;p&gt;It isn’t very difficult to do but it will expose a few new ways of working with the IDE.&amp;nbsp; In your IDE project outline under the res/layouts folder you will find your main.xml.&amp;nbsp; This is where you can either edit the XML directly (which I like to do) or you can use the Layout editor to drag in a button and then use the properties to update the Button’s attributes.&amp;nbsp; The layout view is not up to the level of a MS Visual Studio project, but it is still useful.&amp;nbsp; Feel free to deviate from what I have defined below and try it for your self.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJqrEduvfAI/AAAAAAAAADM/oOZZ6XUSYjQ/s1600-h/image%5B12%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;436&quot; alt=&quot;image&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJqrEwvSwYI/AAAAAAAAADQ/kZIfC_DqnEw/image_thumb%5B10%5D.png?imgmax=800&quot; width=&quot;640&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Let’s review a little bit about the IDE.&amp;nbsp; One of the things is that the compiler will try to help you by catching that there are imports you need.&amp;nbsp; However as your projects get larger you may want to turn off the auto-build feature.&amp;nbsp; In the example below we haven’t finished typing in the code for a Toast (a pop up type of notification) so it flags as an error.&amp;nbsp; Also displayed are some of the nice information features of Motodev/Eclipse.&amp;nbsp; Play with your IDE to learn more.&amp;nbsp; Don’t be afraid.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJqrFRBSTII/AAAAAAAAAEc/v3gOM30gLfw/s1600-h/image%5B1%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px&quot; height=&quot;373&quot; alt=&quot;image&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJqrFy5tueI/AAAAAAAAAEg/2qcqfL6lF7s/image_thumb.png?imgmax=800&quot; width=&quot;640&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt; &lt;p&gt;Here are the basic steps needed to be done at this point.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJqrGbuP0jI/AAAAAAAAAEk/QXntluXJ9u4/s1600-h/image%5B2%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px&quot; height=&quot;406&quot; alt=&quot;image&quot; src=&quot;http://lh3.ggpht.com/_6DfCvg4U2wI/TJqrGzvZd3I/AAAAAAAAAEs/uWQl0h2abVI/image_thumb%5B1%5D.png?imgmax=800&quot; width=&quot;644&quot; border=&quot;0&quot;&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Now when we build the project and run it on our AVD we get the following.&amp;nbsp; Congratulations, you created an interactive Android widget!&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/TJqrHCArAOI/AAAAAAAAAEw/oqNOgnUHRCM/s1600-h/image%5B3%5D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px&quot; height=&quot;480&quot; alt=&quot;image&quot; src=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/TJqrHisPkhI/AAAAAAAAAE4/0XQUiVQ-dU0/image_thumb%5B2%5D.png?imgmax=800&quot; width=&quot;502&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/1212959573277557229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/1212959573277557229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/1212959573277557229'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/09/android-programming-jumpstart-1.html' title='Android Programming Jumpstart - 2'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_6DfCvg4U2wI/TIu4t8sDYQI/AAAAAAAAACU/pPs2dzlr864/s72-c/image_thumb%5B15%5D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-2658173561350876904</id><published>2010-09-09T10:37:00.001-04:00</published><updated>2010-09-09T10:37:07.177-04:00</updated><title type='text'>Splitting windows in Eclipse and Motodev</title><content type='html'>&lt;p&gt;This one is just so I won’t forget myself.&amp;nbsp; I am used to using a split window view Visual Studio and wanted to do the same thing in Motodev.&amp;nbsp; Unfortunately it doesn’t have the exact same type of capability, but does have a similar way to do it.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Open the file in your editor view,  &lt;li&gt;From the main menu select Window –&amp;gt; New Editor,  &lt;li&gt;Another editor window will open for the file you are working on.  &lt;li&gt;Then you can drag it below the file you wanted to “split” and get&amp;nbsp; similar approach.&amp;nbsp; You just lose a little screen space.&lt;/li&gt;&lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/2658173561350876904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/09/splitting-windows-in-eclipse-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/2658173561350876904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/2658173561350876904'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/09/splitting-windows-in-eclipse-and.html' title='Splitting windows in Eclipse and Motodev'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-4585297481255879635</id><published>2010-08-30T13:51:00.002-04:00</published><updated>2010-08-30T13:53:39.011-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android debugging"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><title type='text'>Telnet and your Android Emulator</title><content type='html'>Did you know you can telnet into an Android emulator/AVD?&amp;nbsp; Assuming that you have telnet installed and have created an AVD, its very easy.&amp;nbsp; &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;On your Android AVD’s title bar you should see the name of your emulator with some numbers pre-pended to it.&amp;nbsp; That is the console port number of your AVD.&lt;/li&gt;
&lt;li&gt;Open a command window and type “telnet localhost &amp;lt;the number&amp;gt;” NOTE – don’t type the brackets, just the number.&lt;/li&gt;
&lt;li&gt;Your command window should be updated to show the connection.&amp;nbsp; Type help to get a valid command list.&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/4585297481255879635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/08/telnet-and-your-android-emulator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/4585297481255879635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/4585297481255879635'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/08/telnet-and-your-android-emulator.html' title='Telnet and your Android Emulator'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-803733725997799772</id><published>2010-08-29T14:39:00.003-04:00</published><updated>2010-09-21T09:17:46.071-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Activities"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><title type='text'>Using Multiple Activities in Android</title><content type='html'>I’m new to having to deal with multiple Activities and have learned a lot as I have gone about implementing an app with many Activities.&amp;nbsp; Lessons Learned:&lt;br /&gt;
(1) Don’t try to keep a list of Activities or Activity instances in your main class.&amp;nbsp; Not only does this waste memory, but when you go to start an Activity you’re not really doing what you think.&amp;nbsp; &lt;br /&gt;
(2) Activities aren’t always around when you need them AKA use Intents.&lt;br /&gt;
(3) Use Intents and possibly a little bundling, and the whole thing gets easier.&lt;br /&gt;
(4) The Activities constructor is pretty much useless – use onCreate!&lt;br /&gt;
I come from a Windows programming background where I didn’t have to worry little things like memory and batteries.&amp;nbsp; I was used to the old way of doing business where I could create a bunch of screen classes, instantiate them all, and then just show/hide or swap out whatever I wanted depending on the user’s choices.&amp;nbsp; Yes, life was good.&amp;nbsp; :)&amp;nbsp; Then this cool new Android stuff beckoned and off we go…&amp;nbsp; The old ways won’t work.&lt;br /&gt;
The particular problem that I was trying to solve was this.&amp;nbsp; The app comes up and has 3 screens (Activities, I know I like my windows terms).&amp;nbsp; The user needs to be able to switch screen to screen.&amp;nbsp; Simple right?&amp;nbsp; Easy enough for even a newbie like me to create 3 Activities, create 3 Intents that use those classes, and fire them up right?&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;/** &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * onCreate(Bundle savedInstanceState)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Called when the activity is first created. &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onCreate(Bundle savedInstanceState)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setContentView(R.layout.main);&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Create Activity instances&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity theActivity1 = new Activity1();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity theActivity2 = new Activity2();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity theActivity3 = new Activity3();&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theActivity1Intent = new Intent(this, Activity1.class);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theActivity2Intent = new Intent(this, Activity2.class);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theActivity3Intent = new Intent(this, Activity3.class); &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Courier New;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style=&quot;color: green;&quot;&gt;// end onCreate&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
For the sake of this example we will assume that the user clicks a button that tells the app which screen to display first.&amp;nbsp; So in the button click we have &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;startActivity(theActivity1Intent);&lt;/span&gt;&lt;br /&gt;
and then off we go displaying the first Activity!&amp;nbsp; What’s wrong with this picture?&amp;nbsp; A couple of things actually.&amp;nbsp; (1) we wasted time even calling new on the three Activity classes.&amp;nbsp; Notice that the Intent is fed in that it is associated with the Activity1 class – not theActivty1 – two very different things.&amp;nbsp; (2) we really haven’t given ourselves a very good way to pass any needed information into the Activity that might be needed for its display.&amp;nbsp; (3) we have know way of getting any data back from the Activity, for example, where did the user choose to navigate to next.&amp;nbsp; Fortunately Android has built in some features that make this easier for us.&amp;nbsp; Review the updated onCreate&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;public void onCreate(Bundle savedInstanceState)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; setContentView(R.layout.main);&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity1Intent = new Intent(this, Activity1.class);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity1Intent.putExtra(&quot;LeftScrn&quot;,&amp;nbsp; &quot;Activity3&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity1Intent.putExtra(&quot;RightScrn&quot;, &quot;Activity2&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity1Intent.putExtra(&quot;Tag&quot;, A1);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; theActivity2Intent = new Intent(this, Activity2.class);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity2Intent.putExtra(&quot;LeftScrn&quot;,&amp;nbsp; &quot;Activity1&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity2Intent.putExtra(&quot;RightScrn&quot;, &quot;Activity3&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity2Intent.putExtra(&quot;Tag&quot;, A2);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; theActivity3Intent = new Intent(this, Activity3.class);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity3Intent.putExtra(&quot;LeftScrn&quot;,&amp;nbsp; &quot;Activity2&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity3Intent.putExtra(&quot;RightScrn&quot;, &quot;Activity1&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theActivity3Intent.putExtra(&quot;Tag&quot;, A3);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; theIntentList = new ArrayList&amp;lt;Intent&amp;gt;();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theIntentList.add(theActivity1Intent);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theIntentList.add(theActivity2Intent);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theIntentList.add(theActivity3Intent);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; theMaxIndex = theIntentList.size()-1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;}// end onCreate&lt;/span&gt;&lt;br /&gt;
See, we don’t to instantiate or save Activities, we need to define the Intents and then let Android do the work.&amp;nbsp; Additionally notice that we are using the putExtra Feature to assign name value pairs to the Intent that can be used, or ignored, by the Activity.&amp;nbsp; Next review the updated onClick call to start the Activity &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;public void onClick(View v)&lt;br /&gt;
{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Launching the activity to get a result when it finished. When this &lt;br /&gt;
&amp;nbsp;&amp;nbsp; // activity exits, onActivityResult() method will be called with the &lt;br /&gt;
&amp;nbsp;&amp;nbsp; // given requestCode. Using a negative requestCode is the same as calling&lt;br /&gt;
&amp;nbsp;&amp;nbsp; // startActivity(Intent) (the activity is not launched as a sub-activity). &lt;br /&gt;
&amp;nbsp;&amp;nbsp; // parameters&lt;br /&gt;
&amp;nbsp;&amp;nbsp; // intent - the intent to start&lt;br /&gt;
&amp;nbsp;&amp;nbsp; // request code - If &amp;gt;= 0, this code will be returned in onActivityResult()&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; when the activity exits.&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; startActivityForResult( theActivity1Intent, &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;&amp;nbsp;&amp;nbsp; theIntentList.get(theCurrIndex)&lt;/span&gt;&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;.getExtras()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getInt(&quot;Tag&quot;));&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;
Now we can get some data back and decide how to proceed from there.&amp;nbsp; This code is a little more lengthy.&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;/**&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * onActivityResult&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * Called when an activity you launched exits, giving the requestCode you &lt;br /&gt;
&amp;nbsp;&amp;nbsp; * started it with, the resultCode it returned, and any additional data.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * The resultCode == RESULT_CANCELED if the activity explicitly returned &lt;br /&gt;
&amp;nbsp;&amp;nbsp; * that, didn&#39;t return any result, or crashed during its operation. &lt;br /&gt;
&amp;nbsp;&amp;nbsp; * You will receive this call immediately before onResume() when your &lt;br /&gt;
&amp;nbsp;&amp;nbsp; * activity is re-starting.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * I am using this function to determine if I need to nav left or right&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * Parameters&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * @param requestCode - The integer request code originally supplied to &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; startActivityForResult(), allowing you to identify &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; who this result came from. &lt;br /&gt;
&amp;nbsp;&amp;nbsp; * @param resultCode&amp;nbsp; - Integer result code returned by the child activity &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; through its setResult(). &lt;br /&gt;
&amp;nbsp;&amp;nbsp; * @param data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - An Intent, can return result data to the caller &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; (various data can be attached to Intent &quot;extras&quot;). &lt;br /&gt;
&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; protected void onActivityResult(int requestCode, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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;&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; int resultCode, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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;&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 data)&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Regardless of which screen exited and is telling to go left or right &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // we need to determine the left and right indexes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Left index - if the current index is not zero then left is minus one &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; otherwise if zero the actual left is the end of the list&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int leftIndex&amp;nbsp; = (theCurrIndex != 0) ? theCurrIndex-1 : theMaxIndex;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Right index - if the current index is the end of the list then right&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; the the beginning of the list or zero, otherwise right &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green;&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; is plus one&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int rightIndex = (theCurrIndex == theMaxIndex) ? 0 : theCurrIndex+1; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Get the extra from the Intent that tells us left or right.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // NOTE - you need to check for null, if the user presses the back btn&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; there will not be an Intent attached and data will be null&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String dir = &quot;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (null!= data)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dir = data.getStringExtra(&quot;Go&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// the Activity set this value if it was returning normally&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (RESULT_OK == resultCode)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( 0 == dir.compareTo(&quot;left&quot;))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theCurrIndex = leftIndex;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (0 == dir.compareTo(&quot;right&quot;))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theCurrIndex = rightIndex;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// intentionally do nothing&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Get the Intent&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Intent nextIntent = theIntentList.get(theCurrIndex);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Get the tag&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp; tagValue&amp;nbsp;&amp;nbsp; = theIntentList.get(theCurrIndex)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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;&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;/span&gt;&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;getExtras().getInt(&quot;Tag&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;// Start the new Activity&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startActivityForResult( nextIntent, tagValue);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style=&quot;color: green;&quot;&gt;// end if (RESULT_OK == resultCode)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; }&lt;span style=&quot;color: green;&quot;&gt;// end onActivityResult&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Not shown is how in the actual Activity class before it returns to the main Activity is how it does its own putExtra on the returning Intent.&amp;nbsp; Additionally the Activity calls its onFinish().&amp;nbsp; This lets Android know that we are done with this Activity and lets it do any needed management.&lt;br /&gt;
I’m sure there are slicker/better ways to handle this.&amp;nbsp; Its what I’ve got for know.&amp;nbsp; Feel free to let me know if you know of a smarter way!</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/803733725997799772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/08/using-multiple-activities-in-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/803733725997799772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/803733725997799772'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/08/using-multiple-activities-in-android.html' title='Using Multiple Activities in Android'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-9112106664459294848</id><published>2010-08-29T10:35:00.002-04:00</published><updated>2010-08-29T10:58:08.524-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blogger content width"/><category scheme="http://www.blogger.com/atom/ns#" term="Blogging"/><title type='text'>Blogging isn’t as easy as it looks</title><content type='html'>&lt;a href=&quot;http://lh4.ggpht.com/_6DfCvg4U2wI/THpwJ1quwCI/AAAAAAAAAB8/_feh9pvw054/s1600-h/image%5B5%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;82&quot; src=&quot;http://lh6.ggpht.com/_6DfCvg4U2wI/THpwLAbzJSI/AAAAAAAAACA/6Oq0zjrqMBQ/image_thumb%5B1%5D.png?imgmax=800&quot; style=&quot;border-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;131&quot; /&gt;&lt;/a&gt; This is not really an Android focused post so much as it is a post on posting.&amp;nbsp; How’s&amp;nbsp; that for an opening sentence?&amp;nbsp; As someone used to writing in Word and PowerPoint it was surprisingly hard to get my first posts formatted like I wanted.&amp;nbsp; Just too used to be able to copy and paste images and copy in code snippets.&amp;nbsp; I was under the impression that I could continue that normal way of business.&amp;nbsp; This was reinforced by the fact that my first blog experience (with SharePoint) I was able to pretty much copy from Word into the SharePoint blog interface.&amp;nbsp; Even then the whole process felt like it was much harder than it should be.&amp;nbsp; I had an even ruder awakening when I tried to copy over a blog from SharePoint hosted to Blogger.&amp;nbsp; Having code snippets (XML for that matter) does not make the Blogger interface happy.&amp;nbsp; After quite some time hunting around I found my tool of choice – for now – Windows Live Writer.&amp;nbsp; So far it seems to be doing a good job of keeping me in my comfort zone and streamlining the publishing.&amp;nbsp; If you have something better let me know!&amp;nbsp; I’m not shy about upgrading if it makes things easier.&lt;br /&gt;
One thing that did throw me off about blogger was the width of the actual blog interface.&amp;nbsp; The default is surprisingly narrow to me and it was more difficult than expected to update.&amp;nbsp; But find it I did.&amp;nbsp; I’m posting it here since I’m sure I’ll forget how I did it later.&amp;nbsp; &lt;br /&gt;
(1) Go to your design tab in your Blogger dashboard&lt;br /&gt;
(2) Select Edit HTML and then search for something like this:&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New;&quot;&gt;&lt;b&gt;&amp;lt;b:variable default=&#39;930px&#39; name=&#39;content.width&#39; type=&#39;length&#39; value=&#39;1200px&#39;/&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
(3) Change the value to what you want and save.&amp;nbsp; DISCLAIMER – you may want to backup your original template first.</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/9112106664459294848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/08/blogging-isnt-as-easy-as-it-looks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/9112106664459294848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/9112106664459294848'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/08/blogging-isnt-as-easy-as-it-looks.html' title='Blogging isn’t as easy as it looks'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_6DfCvg4U2wI/THpwLAbzJSI/AAAAAAAAACA/6Oq0zjrqMBQ/s72-c/image_thumb%5B1%5D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-2436979715192227620</id><published>2010-08-27T14:54:00.003-04:00</published><updated>2010-08-27T20:46:55.543-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android programming"/><title type='text'>Break out your Layout</title><content type='html'>Recently I faced the issue of needed to reuse a particular layout on multiple screens.&amp;nbsp; If you are like me you have to copy and paste code.&amp;nbsp; Anytime I find I need something more than once I look for a way to get some reuse.&amp;nbsp; Luckily Android has provided a few easy ways to do this when creating your screens.&amp;nbsp; I&#39;m actually using 2 different ways on my current program.&amp;nbsp; Take a look at &lt;a href=&quot;http://developer.android.com/reference/android/view/ViewStub.html&quot;&gt;&amp;lt;ViewStub&amp;gt;&lt;/a&gt; and &lt;a href=&quot;http://developer.android.com/resources/articles/layout-tricks-reuse.html&quot;&gt;&amp;lt;include&amp;gt;&lt;/a&gt;, both work very well. &lt;br /&gt;
Let’s look at how we can use these in a layout file. &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;lt;LinearLayout&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&amp;lt;!-- The include will load in the layout files --&amp;gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;include android:id=&quot;@+id/theStatusBar&quot; layout=&quot;@layout/statusbar&quot; /&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&amp;lt;!-- The ViewStub will wait for you to tell them to inflate --&amp;gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ViewStub android:id=&quot;@+id/theView1Stub&quot;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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; android:layout_width =&quot;fill_parent&quot;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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; android:layout_height=&quot;wrap_content&quot;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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; android:layout=&quot;@layout/view1&quot; /&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ViewStub android:id=&quot;@+id/theView2Stub&quot;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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; android:layout_width =&quot;fill_parent&quot;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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; android:layout_height=&quot;wrap_content&quot;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&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; android:layout=&quot;@layout/view2&quot; &amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Courier New; font-size: x-small;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt; &lt;br /&gt;
So in the snippet above, we have two includes and two ViewStubs. The significant difference being the &lt;a href=&quot;http://developer.android.com/resources/articles/layout-tricks-reuse.html&quot;&gt;&amp;lt;include&amp;gt;&lt;/a&gt; will automatically load in the layout specified and inflate/display it in your Activity’s layout. So when the Activity’s onCreate is called and the setContentView is specified Android will do the magic for you. &lt;br /&gt;
Why use &lt;a href=&quot;http://developer.android.com/reference/android/view/ViewStub.html&quot;&gt;&amp;lt;ViewStub&amp;gt;&lt;/a&gt; too? Perhaps you need to customize your screen depending on some flag or parameter. Since a ViewStub is not inflated until you tell it, it can be useful. In this example I have a base class that extends from Activity that has the above in its layout file. I also have two other Activity classes that inherit from it. Since the status bar is needed by both screens, the base class can handle loading and controlling that for its children. Each child in its onCreate can then inflate itself once it is started. So in each child class is a line of code to inflate their applicable Viewstub &lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;// inflate ourselves into the layout ViewStub&lt;/span&gt; &lt;br /&gt;
View &lt;u&gt;view&lt;/u&gt; = ((ViewStub) findViewById(R.id.&lt;i&gt;theView1Stub&lt;/i&gt;)).inflate(); &lt;br /&gt;
Check out these online resources here for more info: &lt;br /&gt;
&lt;a href=&quot;http://developer.android.com/resources/articles/layout-tricks-reuse.html&quot;&gt;&lt;b&gt;Layout Tricks: Creating Reusable UI Components&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt; &lt;br /&gt;
&lt;a href=&quot;http://developer.android.com/resources/articles/layout-tricks-efficiency.html&quot;&gt;&lt;b&gt;Layout Tricks: Creating Efficient Layouts&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt; &lt;br /&gt;
&lt;a href=&quot;http://developer.android.com/resources/articles/layout-tricks-stubs.html&quot;&gt;&lt;b&gt;Layout Tricks: Using ViewStubs&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt; &lt;br /&gt;
&lt;a href=&quot;http://developer.android.com/resources/articles/layout-tricks-merge.html&quot;&gt;&lt;b&gt;Layout Tricks: Merging Layouts&lt;/b&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/2436979715192227620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2010/08/break-out-your-layout.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/2436979715192227620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/2436979715192227620'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2010/08/break-out-your-layout.html' title='Break out your Layout'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7189424393311850640.post-9082612305606132569</id><published>2009-03-11T09:56:00.001-04:00</published><updated>2010-08-27T20:43:50.397-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="family"/><category scheme="http://www.blogger.com/atom/ns#" term="life"/><category scheme="http://www.blogger.com/atom/ns#" term="poetry"/><title type='text'>Ashes, Ashes, We All Fall Down</title><content type='html'>&lt;span style=&quot;font-family: arial;&quot;&gt;-- by Christopher Bursk -- my dad, my hero&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: arial;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: arial;&quot;&gt;If I’m going to be ashes in a decade or so,&lt;br /&gt;
why stay up past midnight staring at the television&lt;br /&gt;
as if it might have a change of heart&lt;br /&gt;
and put a third-party candidate in office for once&lt;br /&gt;
or end the war, and, while it was at it, clear up my grandson’s acne?&lt;br /&gt;
Maybe I should just enjoy the dog’s howling next door.&lt;br /&gt;
All night it’s been tugging at its chain&lt;br /&gt;
as if the links might finally get bored with being metal and snap.&lt;br /&gt;
&lt;br /&gt;
If I’m going to be incinerated - burnt to a crisp -&lt;br /&gt;
in roughly 3,650 days, why am I sulking&lt;br /&gt;
because this morning of all mornings my car tired of doing&lt;br /&gt;
the same thing it had done the morning before,&lt;br /&gt;
and because half my class chose not to show up for a lecture that&lt;br /&gt;
I, their professor, a year from retirement, had hoped&lt;br /&gt;
would change their entire outlook&lt;br /&gt;
on comma splices? Once I’m ashes drifting away on the water,&lt;br /&gt;
&lt;br /&gt;
what will it matter that years ago I threw up on my senior-prom date,&lt;br /&gt;
or last week forgot my wife’s sixty-first birthday,&lt;br /&gt;
or this morning embarrassed my grandson in front of his friends?&lt;br /&gt;
How do any of us prepare for the future&lt;br /&gt;
when we’re so busy making a mess&lt;br /&gt;
of the present? Perhaps this is time’s truest revenge:&lt;br /&gt;
to make us aware of its passing, every minute&lt;br /&gt;
of every day. Approximately 5,256,000 minutes&lt;br /&gt;
&lt;br /&gt;
from now - give or take a month or year or two -&lt;br /&gt;
my son is going to stand on a bridge&lt;br /&gt;
with his children and do something he never thought&lt;br /&gt;
he’d have to do: let his quirky,&lt;br /&gt;
annoying, yet lovable (I’d hoped!) father slip through his fingers.&lt;br /&gt;
That’s my only comfort: I will be ashes&lt;br /&gt;
so fine they won’t even question the rocks&lt;br /&gt;
they fall on, the creek that sweeps them away.&lt;br /&gt;
&lt;br /&gt;
For once I’ll not embarrass anyone.&lt;br /&gt;
For once I’ll not have to worry&lt;br /&gt;
about whether I’m doing something right.&lt;br /&gt;
I’ll perform the one miracle of my life.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://bursk.blogspot.com/feeds/9082612305606132569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bursk.blogspot.com/2009/03/ashes-ashes-we-all-fall-down.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/9082612305606132569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7189424393311850640/posts/default/9082612305606132569'/><link rel='alternate' type='text/html' href='http://bursk.blogspot.com/2009/03/ashes-ashes-we-all-fall-down.html' title='Ashes, Ashes, We All Fall Down'/><author><name>Chris Bursk</name><uri>http://www.blogger.com/profile/13837119573679984579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-RNcali2z4cs/T-PTNaqcCFI/AAAAAAAAAKk/nHq0DU_jK7I/s220/jake_zack.jpg'/></author><thr:total>0</thr:total></entry></feed>