Objects First with Java

Slides:



Advertisements
Similar presentations
Android Application Development A Tutorial Driven Course.
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.
Chapter 1: Voilà! Meet the Android
INTRO TO MOBILE APP DEVELOPMENT CMSC 150: Lecture 34.
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.
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
By: Jeremy Smith.  Introduction  Droid Draw  Add XML file  Layouts  LinearLayout  RelativeLayout  Objects  Notifications  Toast  Status Bar.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Creating Android user interfaces using layouts 1Android user interfaces using layouts.
Chapter 1: Voilà! Meet the Android. Smartphones –Can browse the Web –Allow you to play games –Use business applications –Check –Play music –Record.
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.
1 Mobile Computing Monetizing An App Copyright 2014 by Janson Industries.
Android Layouts. Layouts Define the user interface for an activity Layouts are defined in.xml files – within /res/layout folder – different layout can.
Basic Android Tutorial USF’s Association for Computing Machinery.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
© 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.
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 - Broadcast Receivers
Programming with Android: Layouts, Widgets and Events Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
Networking: Part 1 (Web Content). Networking with Android Android provides A full-featured web browser based on Chromium, the open source browser engine.
Educational & entertraiment applications on Android platform «Piano» and «Abetare» Anisa Shehu Prof. Asoc. Elinda Meçe 14 th Workshop “Software Engineering.
UI Design and Development +Roman Nurik +Nick Butcher.
First Venture into the Android World Chapter 1 Part 2.
Introduction to Android
Android ImageView and Splash Screen 1. After copying an image file (Ctrl-c or right click copy), right click and paste it into one of the res/drawable.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
Mobile Application Development with ANDROID Umang Patel(6537) LDCE.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
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.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
Phonegap API & Phonegap Bridge CIS 136 Building Mobile Apps 1.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Why Learn Android? Largest installation base of any operating system Over 20,000 Android devices exist Businesses will likely move more to device-based.
The Basics of Android App Development Sankarshan Mridha Satadal Sengupta.
Brian Atzori 4B 2015/2016.
Lab7 – Appendix.
Introduction to android
Operating Systems Case Study
Open Handset Alliance.
Browsers and Web Platforms
Android.
Development-Introduction
Android Widgets 1 7 August 2018
Creation of an Android App By Keith Lynn
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
HUJI Post PC Workshop 1 Introduction to Android Development Ari Sprung
Android SDK & App Development
Android App Computations
CIS 470 Mobile App Development
CS323 Android Model-View-Controller Architecture
Android Layout Basics Topics
CIS 470 Mobile App Development
CA16R405 - Mobile Application Development (Theory)
CMPE419 Mobile Application Development
Building User Interfaces Basic Applications
HNDIT2417 Mobile Application Development
Android Developer Fundamentals V2
CIS 470 Mobile App Development
Android Platform, Android App Basic Components
Android Project Structure, App Resources and Event Handling
Adding Components to Activity
Introduction to Android
CMPE419 Mobile Application Development
Android Development Introduction to Android Development 2011/01/16
CIS 694/EEC 693 Android Sensor Programming
CA16R405 - Mobile Application Development (Theory)
Presentation transcript:

Objects First with Java Class Business © David J. Barnes and Michael Kölling

Android Introduction Android is an operating system that runs on mobile platforms “smartphones” & tablets Cars Watches Cameras Based on Linux Open source, free

History Android, Inc founded in 2003, financed by Google Google bought the company in 2005 Android release Android in 2007 First handset in 2008 Releases are named after desserts/snacks (current is “Marshmallow” – Android 6.0.1)

Issues on Android Platforms Platforms are battery powered, restricted in CPU and memory Screens are small compared to desktops Policies When an app is no longer in use, the system will suspend it in memory (consume no resources) When memory is low, the system will kill apps and processes that have been inactive for a while

Environment Android Development Kit is free Hooks into Eclipse or Android Studio Emulators are useful

User Interface The UI for an Android app is built using a hierarchy of View  and ViewGroup objects.  View objects are usually UI widgets such as buttons or textfields  ViewGroup objects are invisible view containers that define how the child views are laid out, such as in a grid or a vertical list.

Assumed Methods Android programming is very object oriented There are lots of assumed methods initially defined as empty that govern app behavior.

Activity An Activity is the main object in an Android app. Lifecycle:

Example

XML HTML-like syntax that is used for many things, especially specification languages HTML is actually a specialized XML Tag-based language <blah> … </blah>

Example: activity_main <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> </RelativeLayout>

AndroidManifest.xml Basic app specification file Contains info on: Permissions Version minimums Icons

Example: Walk through Eclipse

Event Programming in Android Same idea, different methods, clunky implementation Might want to take special actions to make the code look nice

Listeners OnClickListener is the analog to ActionListener in Java Others: OnLongClickListener KeyListener Many built-in listeners just need methods defined

Example (note pattern) LinearLayout container = (LinearLayout) dialog.findViewById(R.id.new_class_dialog_button_container); EditText et = (EditText) dialog.findViewById(R.id.new_class_name); et.setText(""); et = (EditText) dialog.findViewById(R.id.new_class_nickname); Button button = (Button) container.findViewById(R.id.create_new_button); button.setOnClickListener(new createNewClassDialogAction(dialog)); button = (Button) container.findViewById(R.id.cancel_new_button); button.setOnClickListener(new cancelDialogAction(dialog));

Stupid: showDialog When a dialog needs to be display, you would call “showDialog(DIALOGNUMBER)” Then define “onCreateDialog(int dialognum)” Amounts to a big if…then…else… combination Really bad code

Exercise

Look at complex example