Mobile Programming Lecture 2 Layouts, Widgets, Toasts, and Event Handling.

Slides:



Advertisements
Similar presentations
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
Advertisements

Hello world Follow steps under the sections “Create an AVD” and “Create a New Android Project” at
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Basic Functionality in Android. Functionality in Android Events in Java – mouse related mouse clicked button down or up mouse entered – many others key.
Who Am I And Why Am I Here I’m professor Stephen Fickas in CIS – you can call me Steve. I have a research group that works with mobile devices (since 1995!)
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
Layout and Control in UI The user interface (UI) is the graphical interface user can see and interact with your app comprising UI controls like textbox,
Cosc 4730 Android TabActivity and ListView. TabActivity A TabActivity allows for multiple “tabs”. – Each Tab is it’s own activity and the “root” activity.
Android Development (Basics)
Android: Layouts David Meredith
Android Application Development 2013 PClassic Chris Murphy 1.
Creating Android user interfaces using layouts 1Android user interfaces using layouts.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Android development the first app. Andoid vs iOS which is better? Short answer: neither Proponents on both sides For an iOS side, see this article on.
Introducing the Sudoku Example
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Modify Android Objects Using.
PROG Mobile Java Application Development PROG Mobile Java Application Development Developing Android Apps: Components & Layout.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Hello world Follow steps under the sections “Create an AVD” and “Create a New Android Project” at
Chapter 2: Simplify! The Android User Interface
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
Chapter 5 Creating User Interfaces GOALS and OBJECTIVES Begin our application by creating our user interface. More than one way to create a user interface.
Android Layouts. Layouts Define the user interface for an activity Layouts are defined in.xml files – within /res/layout folder – different layout can.
ANDROID – INTERFACE AND LAYOUT L. Grewe. Interfaces: Two Alternatives Code or XML  You have two ways you can create the interface(s) of your Application.
Understanding Hello Android 1 CS300. Activity  Similar to a form  Base class for the visual, interactive components of your application  Android API.
Basic Android Tutorial USF’s Association for Computing Machinery.
Mobile Programming Lecture 6
1 Announcements Homework #2 due Feb 7 at 1:30pm Submit the entire Eclipse project in Blackboard Please fill out the when2meets when your Project Manager.
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
Programming with Android: Layouts, Widgets and Events Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
User Interfaces: Part 1 (View Groups and Layouts).
Application Development for mobile Devices
Presented By: Muhammad Tariq Software Engineer Android Training course.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
HTML Concepts and Techniques Fifth Edition Chapter 6 Using Frames in a Web Site.
Copyright© Jeffrey Jongko, Ateneo de Manila University Basic Views and Layouts.
Mobile Programming Lecture 12 HierarchyViewer, Linkify, Gestures, and Version Control.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
Handling View Events. Open the *MainActivity.java* which is the Activity that hosts the layout in "activity_main.xml". The setContentView method inside.
Mobile Programming Lecture 3 Debugging. Lecture 2 Review What widget would you use to allow the user to enter o a yes/no value o a range of values from.
Android Development: Basic Widgets Richard S. Stansbury 2015.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
MOBILE COMPUTING D10K-7D02 MC05: Android UI Design Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
Copyright© Jeffrey Jongko, Ateneo de Manila University Deconstructing HelloWorld.
Designing user interfaces using: Simple views 1. Views Basic views – TextView – EditText – Button – ImageButton – CheckBox – ToggleButton – RadioButton.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
CS378 - Mobile Computing User Interface Basics. User Interface Elements View – Control – ViewGroup Layout Widget (Compound Control) Many pre built Views.
Building User Interfaces Basic Applications
BUILDING A SIMPLE USER INTERFACE. In this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds.
COMP 365 Android Development.  Developing for Android  XML for user interface formatting and other scripting  Java for programming.
Mobile Programming Lecture 4 Resources, Selection, Activities, Intents.
Android 基本 I/O. 基本 I/O 介面元件 在此節中主要介紹常見的 I/O 使用者介 面元件 – Button, TextView, 以及 EditText , 學習者可以學會: – Android 的視窗表單設計 res/layout/main.xml – Android SDK –
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
School of Engineering and Information and Communication Technology KIT305/KIT607 Mobile Application Development Android OS –Permissions (cont.), Fragments,
Cosc 5/4730 Support design library. Support Design library Adds (API 9+) back support to a number of 5.0 lollipop widgets and material design pieces –
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Chapter 2: Simplify! The Android User Interface
Android – Event Handling
Mobile Application Development BSCS-7 Lecture # 8
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
CIS 470 Mobile App Development
Mobile Computing With Android ACST 4550 Android Layouts
Building User Interfaces Basic Applications
Android Developer Fundamentals V2
CIS 470 Mobile App Development
Mobile Programmming Dr. Mohsin Ali Memon.
Android Sensor Programming
Presentation transcript:

Mobile Programming Lecture 2 Layouts, Widgets, Toasts, and Event Handling

Lecture 1 Review How to edit XML files in Eclipse? What holds all elements (Views) that appear to the user in an Activity? When should you make changes to R.java? Give an example of a View (something in Android that extends View) How to add a new XML Layout file?

Today's Agenda Widgets o TextView, EditText, Buttons, SeekBar, NumberPicker Layouts o LinearLayout, RelativeLayout, TableLayout LinearLayoutRelativeLayoutTableLayout Toasts Event Handling

Widgets - Finding available Widgets To see some of the available Widgets, open one of the XML files in res/layout View the XML file as Graphical Layout using the tabs at the bottom of the window Select a category in the left pane if necessary (e.g. Form Widgets)

Widgets All of these widgets are subclasses of the View class (i.e., View is the base class for widgets) Try to avoid modifying XML files directly if you can o use Forms or WYSIWYG "wizzy wig" instead

Widgets - Examples TextViews o displays text in your Activity EditText o allows the user to enter some text Button o Can be pressed by the user to perform an action o CheckBox o RadioGroup o ToggleButton

Widgets - id's Id's are not required for each widget R.java stores the id's for your widgets. How does the id's set and get? o Remember, don't edit the R.java file!

Widgets - id's 2 ways to add a widget and set its android:id value Using the Graphical Layout editor o Drag and drop a widget onto the canvas o Right click on the widget and select "Edit ID..." Using the XML editor o type the XML code needed for the widget that you want o add to its attributes

Widgets - id's Save your file, and the id will automatically be added R.java tells the XML parser to expand the rest of the id string and treat it as an ID resource o + is what causes the id to be added to R.java

Widgets As you may have noticed, you can do this for attributes other than the android:id attribute You can explore your options by right clicking on anything on the canvas

Widgets - layout_height/width Always set the android:layout_height and android:layout_width attributes in the XML file for your widgets. NOT doing so is an easy way to get Force close Drag and drop onto the canvas so that you don't have to worry about this

Widgets - layout_height/width Values for android:layout_height and android:layout_width "wrap_content" o big enough to hold it's contents "match_parent" o make the specified dimension as big as its parent "fill_parent" o being deprecated, replaced by "match_parent"

Widgets - TextView We will experiment with some of the attributes for the TextView widget android:text o e.g. "Hello World!" android:textSize o e.g. "20dp" o android:textSize should be specified in dp (density-pixels), so that phones with different pixels-per-inch can be supported android:textStyle o e.g. "italic" android:textColor o e.g. #FFFFFF

Widgets - EditText Experimenting with the EditText widget. EditText is a subclass of TextView. android:hint o e.g. "Enter your name" android:inputType o textCapWords o textMultiLine o textPassword o textNumber android:gravity o e.g. "right”, “center_vertical”, “top”

Widgets - Gravity Android:gravity sets the gravity of the content of the View its used on. Android:layout_gravity sets the gravity of the View or Layout in its parent.

Widgets - Button Experimenting with the Button widget. Button is a subclass of TextView. android:inputType android:gravity

Widgets - CheckBox Experimenting with the CheckBox widget. CheckBox is a subclass of Button android:text o e.g. "I agree to the terms and conditions" android:checked o "true" or "false" o sets the default value of the CheckBox

Widgets - RadioGroup / RadioButton You usually want to drag a RadioGroup onto the canvas first It's easy to drag and drop or remove RadioButtons to the RadioGroup

Widgets - RadioButton Experimenting with the RadioButton widget. RadioButton is a subclass of Button android:text o e.g. "Female" android:checked o "true" or "false" o sets the default value of the RadioButton

Widgets - ToggleButton Experimenting with the ToggleButton widget. ToggleButton is a subclass of Button android:textOn o e.g. "GPS Enabled" o default value is "On" android:textOff o e.g. "GPS Disabled" o default value is "Off" android:checked o "true" or "false" o sets the default value of the ToggleButton

Widgets - SeekBar Experimenting with the SeekBar widget. android:max o e.g. "100" o you can't set the min, it's always 0 android:progress o e.g. "50" o sets the current position of the slider on the SeekBar

Widgets - RatingBar Experimenting with the RatingBar widget. android:numStars o e.g. "6" android:rating o e.g. "3" o sets the default rating android:stepSize o e.g. "2" o rating is set in groups of stepSize o default = "1"

Layouts You can add multiple Layouts to the canvas!

Layouts LinearLayout RelativeLayout TableLayout

Layouts - LinearLayout Review Only allows you to arrange widgets in a linear direction horizontally or vertically sometimes this is all you need!

Layouts - LinearLayout (Vertical) A

A B

A B C

A B C D

A B C D E

Layouts - LinearLayout Nesting LinearLayouts can degrade performance Nesting LinearLayouts can degrade performance ng-layouts/optimizing-layout.html For your homeworks and projects, only use LinearLayout when you have good reason to do so

Layouts Try not to waste too much time on editing the Layout in the XML editor If you want to switch from LinearLayout to another Layout o Right click canvas o Change Layout... o Select a different Layout

Layouts Want to add an entirely new UI? Right click your project > New > Android XML File o Resource Type: Layout o File: xml_file_name.xml o Root Element: e.g. RelativeLayout o This stores the new XML file in res/layout

Allows you to specify the position of one view B relative to another view A Layouts - RelativeLayout

A

A B

AB

B A

BA

A B Many possibilities! Unlike LinearLayout

Layouts - RelativeLayout A B Many possibilities! Unlike LinearLayout

Layouts - RelativeLayout A B Many possibilities! Unlike LinearLayout

Layouts - RelativeLayout Many more possibilities for arranging your widgets, unlike LinearLayout. RelativeLayout > LinearLayout ayout/relative.html

Layouts - TableLayout Displays widgets in rows and columns similar to HTML tables Your TableLayout usually consists of TableRows, which lay their children out horizontally layout_width attribute of TableLayout's children are forced to be match_parent (even if you set it yourself) Likewise, layout_height of a TableRow is forced to be wrap_content

Layouts - TableLayout A D B TableRow C

Layouts - Oversized Layouts If you have some widgets that aren't being displayed on the screen, it could be because there isn't enough space on the screen to show them all You won't be able to scroll by default

Layouts - ScrollView To solve this: Add a ScrollView view to the root of your root layout (can be LinearLayout) Move your main Layout to root of the ScrollView (e.g. RelativeLayout)

Toast Finally, Java code Before looking at Toasts... let's look the autogenerated Java code. public class HelloWorldActivity extends Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }

Toast Finally, Java code Before looking at Toasts... let's look the autogenerated Java code. public class HelloWorldActivity extends Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } Main point of entry into your code. Called when the Activity is created.

Toast Finally, Java code Before looking at Toasts... let's look the autogenerated Java code. public class HelloWorldActivity extends Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } Android needs to do who knows what before you can do anything.

Toast Finally, Java code Before looking at Toasts... let's look the autogenerated Java code. public class HelloWorldActivity extends Activity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } Set the layout that you want to use. This one corresponds to res/layout/main.xml

Toast A notification message that pops up on the screen for a few seconds Add this to your code: Toast.makeText(this, "Message", Toast.LENGTH_SHORT).show();

Toast There are several reasons why your Toast won't show up on the screen One reason is that you probably forgot the.show() part of the Toast code.

Events - Event driven programming Android is event-driven The flow of code depends on events, unlike programs you normally write in C++ If you've written JavaScript code before then you've probably done event-driven programming

Events - examples events Call a method when the user o clicks a button o checks a checkbox o pulls back on and lets go of slingshot in Angry Birds Call a method when the system o receives an SMS o receives a phone call o completely loads a web page in the browser

Events - View Every View can react to the onClick event Layouts are also Views!

Let's react to a Button click event. Add a button to the canvas, and add the code in bold below to the button <Button android:text="Submit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="myEventHandler" /> Events - Button Click

Let's react to a Button click event. Add a button to the canvas, and add the code in bold below to the button <Button android:text="Submit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="myEventHandler" /> Events - Button Click This says to launch the myEvent method when this button is clicked

Let's react to a Button click event. Add the method below to your Java code public void myEventHandler(View v) { Toast.makeText( this, "You pressed a button!", Toast.LENGTH_LONG).show(); } Events - Button Click

Let's react to a Button click event. Add the method below to your Java code public void myEventHandler(View v) { Toast.makeText( this, "You pressed a button!", Toast.LENGTH_LONG).show(); } Events - Button Click Name of the method must match the android:onClick attribute in the XML file

Let's react to a Button click event. Add the method below to your Java code public void myEventHandler(View v) { Toast.makeText( this, "You pressed a button!", Toast.LENGTH_LONG).show(); } Events - Button Click Has to be public to be able to work. private may give you a Force close.

Let's react to a Button click event. Add the method below to your Java code public void myEventHandler(View v) { Toast.makeText( this, "You pressed a button!", Toast.LENGTH_LONG).show(); } Events - Button Click void for onClick. Not all event-handlers should return void, however. We'll see this soon

Let's react to a Button click event. Add the method below to your Java code public void myEventHandler(View v) { Toast.makeText( this, "You pressed a button!", Toast.LENGTH_LONG).show(); } Events - Button Click View parameter is required. You may use myEventHandler to handle multiple events.

Let's react to a Button click event. Add the method below to your Java code public void myEventHandler(View v) { Toast.makeText( this, "You pressed a button!", Toast.LENGTH_LONG).show(); } Events - Button Click How do you know which view has been clicked?

So far we've done most of our development using XML. Now we're going to really start looking at Java code. We need to be able to reference our views (specified in the XML file) using Java In the Graphical Layout, right click the Button and choose Edit Id... o set the ID to "submitButton" Events - How do we know which view has been clicked?

Add an EditText to the canvas Set the ID to "firstname" Set android:onClick="myEventHandler" Events - How do we know which view has been clicked?

public class HelloWorldActivity extends Activity { Button mSubmitButton; EditText public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); } Events - How do we know which view has been clicked?

public class HelloWorldActivity extends Activity { Button mSubmitButton; EditText public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); } Events - How do we know which view has been clicked? Add local fields for the corresponding widgets to reference them later

public class HelloWorldActivity extends Activity { Button mSubmitButton; EditText public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); } Events - How do we know which view has been clicked? Set the widgets. Remember we set the unique IDs for these widgets previously.

public class HelloWorldActivity extends Activity { Button mSubmitButton; EditText public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); } Events - How do we know which view has been clicked? Cast it to the correct View subclass, since findViewById returns a View.

public class HelloWorldActivity extends Activity { Button mSubmitButton; EditText public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); } Events - How do we know which view has been clicked? Now that you can reference the views in Java, take a look at the method for the views

public class HelloWorldActivity extends Activity { Button mSubmitButton; EditText public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); } Events - How do we know which view has been clicked? e.g. mSubmitButton.setText("submit"); mSubmitButton.getText(); This is important!

public void myEventHandler(View v) { Toast.makeText( this, "You pressed a button!", Toast.LENGTH_LONG).show(); } Events - How do we know which view has been clicked? How do you know which view has been clicked?

public void myEventHandler(View v) { if(v == mSubmitButton) { /* submitButton clicked */ } else if(v == mFirstName) { /* first name clicked */ } } Events - How do we know which view has been clicked?

public void myEventHandler(View v) { if(v == mSubmitButton) { /* submitButton clicked */ } else if(v == mFirstName) { /* first name clicked */ } } Events - How do we know which view has been clicked? Add this method to your class

You can also create a different method to handle events for different views if you want to. Events

Events - Handling Events There are 3 ways to incorporate EventListeners: 1.Specify the name of the method to handle the event in XML. We just did this. 1.Have your Activity implement an EventListener 1.Create an anonymous implementation of the EventListener

Events - Handling Events There are 3 ways to incorporate EventListeners: 1.Specify the name of the method to handle the event in XML. We just did this. 1.Have your Activity implement an EventListener 1.Create an anonymous implementation of the EventListener

Events - Implement EventListener public class HelloWorldActivity extends public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); } You should remove the android:onClick attribute from the submitButton in the XML file

Events - Implement EventListener public class HelloWorldActivity extends Activity implements OnClickListener public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); mSubmitButton.setOnClickListener(this); } public void onClick(View v) {... }

Events - Implement EventListener public class HelloWorldActivity extends Activity implements OnClickListener public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); mSubmitButton.setOnClickListener(this); } public void onClick(View v) {... } What if I remove this? Try it.

Events - Handling Events There are 3 ways to incorporate EventListeners: 1.Specify the name of the method to handle the event in XML. We just did this. 1.Have your Activity implement an EventListener 1.Create an anonymous implementation of the EventListener

Events - Anonymous Listener public class HelloWorldActivity extends public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); }

Events - Anonymous Listener public class HelloWorldActivity extends public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); } Doesn't need to implement OnClickListener this time!

Events - Anonymous Listener public class HelloWorldActivity extends public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button mSubmitButton = (Button) findViewById(R.id.submitButton); EditText mFirstName = (EditText) findViewById(R.id.firstName); mSubmitButton.setOnClickListener( new OnClickListener() { public void onClick(View v) { /* submitButton clicked */ } }); }

Events - Anonymous Listener A fast way to set the onClickListener: after typing “mSubmitButton.” (including the dot) choose the “setOnClickListener” method from the list 1.in the parentheses, type “new “ (including the whitespace) 2.press Ctrl+Spacebar 3.select View.OnClickListener from the list 4.You may have to press Ctrl + o to import any missing packages 5.add a semicolon at the end of the autogenerated code 6.add your code to the auto-generated methods

Widgets - NumberPicker NumberPicker is in HoneyComb or later (Android 3.0) You may get Force close if you try to manipulate it in an earlier version

Widgets - NumberPicker For some reason, it doesn't seem like NumberPicker attributes can be set in XML...

Widgets - NumberPicker After adding NumberPicker with to the XML file NumberPicker mAgePicker; public class HelloWorldActivity extends public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mAgePicker = (NumberPicker) findViewById(R.id.agePicker); mAgePicker.setMaxValue(120); mAgePicker.setMinValue(5); }

Widgets Most of a widget's XML attributes can be set and get programmatically Example widgetXML attributeset methodget method EditTextandroid:textsetText(String)getText() Buttonandroid:onClick setOnClickListener(On ClickListener) - CheckBoxandroid:checkedsetChecked()isChecked() SeekBarandroid:progresssetProgress()getProgress() SeekBarandroid:maxsetmax()getMax()

Homework 2 Homework 2 is posted on my website: It is due on May 24 th, next Friday, in class. Please just demo to me.

References The Busy Coder's Guide to Android Development - Mark Murphy The Busy Coder's Guide to Android Development - Mark Murphy Android Developers The Mobile Lab at Florida State University