Top Banner
Android App Development 2 9 April, 2015
15

Android App Development 20150409

Aug 09, 2015

Download

Software

Hideo Kadowaki
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Android App Development 20150409

Android App Development 2

9 April, 2015

Page 2: Android App Development 20150409

Set Up Development Environment

Creating an Android Project Running your app

Run on a Real Device

Last Workshop

Page 3: Android App Development 20150409

1. Run on a Real Device2. Run on the Emulator*

Running Your App

← Today

* hardware or software that enables one computer system to behave like another computer system

Page 4: Android App Development 20150409

Create an AVD (Android Virtual Device) *1. Select Tools > Android > AVD

Manager or click2. Click Create Virtual Device3. Select Nexus 6 and click Next4. Select the desired system version for the

AVD and click Next5. Verify the configuration settings, then

click Finish

Run on the EmulatorRunning Your App

* a device configuration for the Android emulator

Page 5: Android App Development 20150409

Run the app from Android Studio1. Click Run2. Choose Launch emulator3. Select the emulator you created

from the pull-down menu, and click OK

Run on the EmulatorRunning Your App

Page 6: Android App Development 20150409

Building a Simple User Interface

Page 7: Android App Development 20150409

View / ViewGroup

View ContainerDefine how the child views are laid out

UI widgetButton, Text Field etc.

Building a Simple User Interface

Page 8: Android App Development 20150409

ViewGroup LinearLayout

Lay out child views in eithera vertical or horizontal orientation

View Text Field Button

Layout

LinearLayout

ButtonText Field

Building a Simple User Interface

Page 9: Android App Development 20150409

Edit res/layout/activity_my.xml

Create a Linear LayoutBuilding a Simple User Interface

“vertical” or “horizontal”

Page 10: Android App Development 20150409

Edit res/layout/activity_my.xml Add the following between

<LinearLayout …> and </LinearLayout>

Add a Text FieldBuilding a Simple User Interface

The view should be only as big as needed to fit the contents of the view.A default string to display

when the text field is empty.

Page 11: Android App Development 20150409

Edit res/values/strings.xml

Add String ResourcesBuilding a Simple User Interface

Page 12: Android App Development 20150409

activity_my.xml

strings.xml

Page 13: Android App Development 20150409

Running your app Run on the Emulator

Building a Simple User Interface View / ViewGroup Create a Linear Layout Add a Text Field Add String Resources

Next Workshop Add a Button …

Wrap Up for Today

Page 14: Android App Development 20150409

Follow the link and read the articles Real Device vs Emulator

http://www.guru99.com/real-device-vs-emulator-testing-ultimate-showdown.html

Android Layouts http://www.androidhive.info/2011/07/android-

layouts-linear-layout-relative-layout-and-table-layout/

Assignment

Page 15: Android App Development 20150409

fin.