Android: versions Note that: Honeycomb (Android v3.0) A tablet-only release Jelly Bean (Android v4.1) Released on July 09, 2012.

Slides:



Advertisements
Similar presentations
ANDROID DEVELOPMENT KELLY MCBEAN. DEVELOPMENT ENVIRONMENT OVERVIEW Eclipse Standard IDE for Developing Android Applications Install: 1.Java (JDK) – Since.
Advertisements

Android UserInterfaces Nasrullah Niazi. overView All user interface elements in an Android app are built using View and ViewGroup objects. A View is an.
Android User Interface
Intro to Android Chris Risner. About Me Mobile Team Leader at Quicken Loans Co-Founder of Detroit GTUG
Android architecture overview
Android 02: Activities David Meredith
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.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Android and Project Structure. Android Android OS – Built on Linux Kernel – Phones – Netbooks – Readers – Other???
More on User Interface Android Applications. Layouts Linear Layout Relative Layout Table Layout Grid View Tab Layout List View.
Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
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.
CS5103 Software Engineering Lecture 08 Android Development II.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Chapter 2: Simplify! The Android User Interface
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
Android Layouts. Layouts Define the user interface for an activity Layouts are defined in.xml files – within /res/layout folder – different layout can.
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.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Using Android XML Resources.
Android for Java Developers Denver Java Users Group Jan 11, Mike
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Presented By: Muhammad Tariq Software Engineer Android Training course.
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.
Android Boot Camp for Developers Using Java, 3E
User Interfaces: Part 1 (View Groups and Layouts).
Application Development for mobile Devices
Configuring Android Development Environment Nilesh Singh.
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.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
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
Chapter 2 Building User Interfaces and Basic Applications.
Building User Interfaces and Basic Applications Chapter 2 1.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
Android Fragments. Slide 2 Lecture Overview Getting resources and configuration information Conceptualizing the Back Stack Introduction to fragments.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
Why Learn Android? Largest installation base of any operating system Over 20,000 Android devices exist Businesses will likely move more to device-based.
CHAPTER 1 part 1 Introduction. Chapter objectives: Understand Android Learn the differences between Java and Android Java Examine the Android project.
Chapter 2: Simplify! The Android User Interface
Open Handset Alliance.
Android.
Android Activities An application can have one or more activities, where Each activity Represents a screen that an app present to its user Extends the.
Creation of an Android App By Keith Lynn
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Anatomy of an Android Application
Android SDK & App Development
CIS 470 Mobile App Development
Android Programming Lecture 3
CS5103 Software Engineering
Building User Interfaces Basic Applications
CIS 470 Mobile App Development
Mobile Programming Dr. Mohsin Ali Memon.
Introduction to Android
Mobile Programmming Dr. Mohsin Ali Memon.
Android Sensor Programming
Presentation transcript:

Android: versions Note that: Honeycomb (Android v3.0) A tablet-only release Jelly Bean (Android v4.1) Released on July 09, 2012

Applications Android apps are Written using the Java programming language But executed via a custom VM called Dalvik Executed in a separate process (its own security sandbox) => Application cannot access some parts of the system Android SDK Android APIs Development tools AVD Manager and emulator Full documentation

Setting Up the Development Environment Collect the required tools: The Android SDK starter package

Setting Up the Development Environment (Continued) Download the Eclipse IDE for Java EE developers Install the android development tools plugin for Eclipse

Setting Up the Development Environment (Continued) Create an android virtual device

Anatomy of an Android Project src folder Project’s.java source files gen Holds the R.java compiler generated file With references to all project resources Library (Android 4.0/2.3.3) Android.jar with all class libraries assets Assets used by app (text files, databases,…) res All resources used by app AndroidManifest.xml Permissions + other features

Dissecting First Program Visual components Are referred to as views setContentView inflates a layout resource Resources are stored in the res folder and includes layout, values, and a series of Drawable subfolders

Android Activities An application can have one or more activities, where Each activity Represents a screen that an app present to its user Extends the Activity class Activity's event handlers onCreate(): when first created onStart(): when visible onResume(): when interactive onPause(): when paused onStop(): when no longer visible onDestroy(): prior to destruction onSaveInstanceState(Bundle)

Activity States The state of an activity depends on Its position in the Activity stack Activity states Active Activity at the top of the stack Paused Activity does not have focus Stopped Activity is not visible Inactive After an activity has been killed

Event Handlers to Monitor State Changes Event handlers are defined to Enable activities to react to state changes Full lifetime: Between onCreate and onDestroy Visible lifetime: Bound between onStart and onStop Active lifetime Starts with onResume and ends with onPause

Layout resource

Externalizing resources

Introducing the Application Manifest File

R.java File To create an instance of the resource Use the following helper method

Expanding your Experience: Let us Make a Toast! Toast Is a transient notification visible for a few seconds Is perfect to inform users of events Has a makeText method Enabling you to create a standard Toast display window Displaying a Toast:

Fundamentals of UI design Visual components in Android Derived from the android.view.View class Referred to as views, controls, or widgets Examples TextView, EditText, ListView, Spinner, Button, ToggleButton, CheckBox, RadioButton, VideoView, etc… Multiple views Grouped into ViewGroup (android.view.ViewGroup) Examples LinearLayout, RelativeLayout, AbsoluteLayout, TableLayout, FrameLayout, ScrollView.

LinearLayout This layout Arranges views in a single column/row That is, child views arranged either vertically or horizontally Example

Common Attributes for Views and ViewGroups

Units of measurement dp (density independent pixel) 1 dp => 1 pixel on a 160 dpi screen sp (scale independent pixel) Similar to dp but recommended for font sizes px (actual pixel on screen)

Screen densities Low density (ldpi) 120 dpi Medium density (mdpi) 160 dpi High density (hdpi) 240 dpi Extra High density (xhdpi) 320 dpi Nexus S (235 dpi) hdpi device HTC Hero (3.2”, 320X480) mdpi device RAZR (4.3”, 540X960) hdpi device

Converting dp to px Formula Actual pixels = dp * (dpi/160) Example: Button with width = 160 dp  On a 235 dpi device => actual width = 240 px  On 180 dpi device => width = 160 px When using dp Android Scales size of the view as a function of density

Scaling effect

When specifying size in px

Output

Table Layout This layout groups views into rows and columns Use the element for rows Each row collection of views with each view forming a cell Width of column dictated Cell with largest width

Output

Relative Layout This layout Enables you to specify How child views are positioned relative to each other Allows views to have layout_alignParentTop layout_alignParentLeft layout_alignLeft layout_below Layout_centerHorizontal

Output

Frame Layout This layout Is a placeholder For displaying single view Views added Anchored to top left of layout Added views Overlap the existing ones

Output

ScrollView This layout Enables you to Scroll through a list Occupying lot of space Can include only 1 child Normally a linearlayout

Summary