Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Android App Development

Introduction to building apps for the Android mobile platform
by

Richard McKenna

on 18 November 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Android App Development

Android
App Development

Android Setup
Download the Android SDK & Plugin
-Eclipse + ADT Plugin
-Android SDK Tools
-Android Platform Tools
-Latest Android Platform
-Latest Android system image for emulator

http://developer.android.com/sdk/index.html
Creating a Project
AndroidManifest.xml
Describes App Characteristics
-SDK version
-Activities

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />

Directory Structure
src/ contains source including launch activity
res/ contains app resources
-drawable-hdpi/
-layout/
-values/
New->Android->Android Application Project
How do we run the app?
2 Choices:
1) Run on a Real Device
-plug in your device via USB
-enable USB debugging
-Settings
-Developer Options

2) Run on Emulator
Choose your device
Or a virtual one
Building a UI
Use combo of Views and ViewGroups
-Views are widgets (buttons, etc.)
-ViewGroups are containers
Layout specified via XML
activity_main.xml
View via WYSIWYG or raw XML

For raw XML, tree hierarchy means everything

ViewGroup examples:
-LinearLayout
-RelativeLayout
LinearLayout
A view group
Subclass of ViewGroup
Lays out children vertically or horizontally
-android:orientation
Children rendered in order of appearance in XML file
Some Widgets
EditText for text fields
Button for push buttons

<EditText android:id="@+id/edit_message"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/edit_message" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send" />
String Resources
Use for any UI text
List all text in one place
Why?
-easy editing
-internationalization
strings.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">My First App</string>
<string name="edit_message">Enter a message</string>
<string name="button_send">Send</string>
<string name="action_settings">Settings</string>
<string name="title_activity_main">MainActivity</string>
</resources>
Let's add an activity?
What's that?
a response to an interaction

Where?
to the MainActivity class

When?
in response to Send button
How do we add an activity?
Specify activity for button:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send"
android:onClick="sendMessage" />

Provide response in MainActivity:
public void sendMessage(View view) {
// Do something in response to button
}
Next Time
Real Time Rendering

How to approach The Game of Life
Full transcript