Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015

Size: px
Start display at page:

Download "Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015"

Transcription

1 Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 1st November 2015

2 Android Lab 3 & Midterm Additional Concepts No Class Assignment 2

3 Class Plan Android : Additional Requirements Relevant Concepts for the class Project Extra Notes & Useful Information Midterm : Solutions 3

4 Dynamic UI Creating a responsive UI is fundamental in any application. In the Project, you will be required implement a tournament manager where teams can be edited dynamically. This means that you should display updated information based on the configuration the user has input. In the previous lab you learned that you can update existing components in a layout. Today we will show you how to that you can create more dynamic layouts, with even more adaptability. 4

5 ListView ListView is a View group that displays a list of scrollable items. Items are automatically inserted to lists using an Adapter. In the project you will have to create and manage a set of teams. This means that part of the content available will created dynamically, making it relevant to know how to create dynamic layouts. Another dynamic layout is the GridView, similar to the GridLayout used in the previous lab, but built dynamically. 5

6 Adapter The adapter is the bridge for AdapterViews and the data to be displayed. ListView and GridView extend the AdapterView Class through the AbstractListView. Adapters are created by passing the application context, Resource ID of the list template as well as other optional parameters. Listviews have a setadapter function in which the Adapter created previously is set. 6

7 Simple ListView A Simple ListView can be created from an array of strings and an ArrayAdapter. Android provides many preset Layouts, one of which is a basic string list: android.r.layout.simple_list_item_1 You can override the List s OnItemClick function to perform functions related to the item selected. Example: open an Activity to configure the item selected. 7

8 Example Code Snippet This snippet of code is part of the oncreate in the Main Class // Get ListView object from xml layout listview = (ListView) findviewbyid(r.id.list); //Defining Array values to show in ListView String[] values = new String[] { "Item 01","Item 02","Item 03","Item 04","Item 05","Item 06","Item 07","Item 08" }; //Converting Array to ArrayList final ArrayList<String> list = new ArrayList<String>(); for (int i = 0; i < values.length; ++i) { list.add(values[i]); } //Create an ArrayAdapter and Set it on the ListView ArrayAdapter adapter = new ArrayAdapter(this, android.r.layout.simple_list_item_1, list); listview.setadapter(adapter); listview.setonitemclicklistener(new AdapterView.OnItemClickListener() public void onitemclick(adapterview<?> parent, final View view, int position, long id) { final String item = (String) parent.getitematposition(position); //Do something with the string that you just got! } }); This code Snippet produces the example image in the previous slide 8

9 Memory Management Android offers SQLite as a Database API. The SQLite API is used by implementing a SQLiteOpenHelper. Table Creation, Deletion & Query management is usually performed by this class, who is responsible for the structure of the database. However, as the databases course is not a course requirement, persistent data storage will not be required for the project. An alternative is keeping your information in memory, which can be done using Key-Value Sets or Singletons. 9

10 Key-Value Sets SharedPreferences is a system in which simple information can be stored without need for database systems. SharedPreferences allow for Integer and String values to be stored. 10

11 Singleton Singleton is a design pattern very useful for managers, which can do basic information storage if required. Because Singletons restrict instantiation to a single object, you can ensure that your memory state is consistent after read/write operations. UML Structure 11

12 Singleton: Usage To efficiently use Singleton as a solution for your project, the recommendation is you create Java classes representing the information you need to store. The list of classes might include team, match, tournament, etc. After coding the necessary classes where you will store data, you can create lists or other structures to store instances of your classes in the Singleton. You can use Umple to generate your class files and copy them into your project. Use your Singleton as a system-wide resource by creating getter/setter functions as required. Perform Assertions whenever required. 12

13 Dynamic Content The content of a dynamic list is not limited to primitive types or Strings. A list can contain complex elements, which may display multiple properties of the items in the list including an avatar and multiple text fields for example. To create a template for your list item, you should create a layout xml file for it. This layout defines the structure of the information presented in each element that will be displayed in your dynamic list. 13

14 Example Item Layout This is how an example complex layout looks in the preview. It contains an avatar image and two text fields. Because the layout has the whole screen to itself in the preview screen, it can behave differently from expected. However, when adding it to a list, each item will have much less vertical space, as that property is fixed. This means that the final layout will be more pleasing. You can also manually set properties in the individual layout if you want. 14

15 List Behavior When viewed in a List, items will appear sequentially. If the items fill more are then available on screen, a scroll bar will be added automatically to the right of the list. To make sure that the height of list items is properly set, 15

16 Custom Adapter To add a custom Layout to a listview you need to create a CustomAdapter and implement the required functions. This is necessary so you can populate the items in the listview with the correct information. Your CustomAdapter should extend one of the existing Adapter classes and implement its constructor as well as the getview function. The getview Function of your adapter should have a LayoutInflater to expand the items in the list. You need to configure all items of components of the listitem you wish to have personalized. 16

17 Sample Custom List Example OnCreate that handles itemlist OnClick protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_list); ListView listview = (ListView) findviewbyid(r.id.list); String[] values = new String[]{ "Millonarios FC", "empty", "empty", "empty", "empty", "empty", "empty", "empty" }; TeamArrayAdapter adapter = new TeamArrayAdapter(this, values); listview.setadapter(adapter); listview.setonitemclicklistener(new AdapterView.OnItemClickListener() public void onitemclick(adapterview<?> parent, final View view, int position, long id) { final String item = (String) parent.getitematposition(position); //DO SOMETHING with your item, maybe open a new activity! } }); } 17

18 Sample Custom List Example Custom Adapter with multiple components public class TeamArrayAdapter extends ArrayAdapter<String> { private final Context context; private final String[] values; public TeamArrayAdapter(Context context, String[] values) { super(context, R.layout.list_team_layout, values); this.context = context; this.values = values; } In this example, the Icon Image and Name are configured based on a String List. You can also import that info from your Singleton! public View getview(int position, View convertview, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context.getsystemservice(context.layout_inflater_service); View rowview = inflater.inflate(r.layout.list_team_layout, parent, false); TextView textview = (TextView) rowview.findviewbyid(r.id.line01); ImageView imageview = (ImageView) rowview.findviewbyid(r.id.icon); textview.settext(values[position]); // Change the icon for Windows and iphone String s = values[position]; if (s == null s.isempty() s.equals("empty")) { imageview.setimageresource(r.drawable.ic_logo_empty); } else { imageview.setimageresource(r.drawable.ic_logo_mil); } return rowview; } 18

19 Example Result OnItemClick StartActivity! OnClick Save Info! Finish! (Return to previous activity) 19

20 Other Notes & Useful Information 20

21 Project Guidelines Remember: This is a course on Software Engineering Use the skills you have learned, your work will be judged not only on its functionality but also on its structure and presentation of your code. Adopt naming conventions; Keep your code clean and well documented; DO NOT copy code from the internet, uottawa has very clear rules on plagiarism. Test your application! If your project is not functional because the group did not test it, you will be penalised. 21

22 UI Layout Android Allows you to personalize the UI on your application. You can choose on of the pre-existing templates or define your own. The available options and customization include the overall color, inclusion/removal of the ActionBar, Fullscreen as well as other elements. To access the layout options, click on the circular button in the Design view. The text in the button will display the name of the current theme for your layout. 22

23 UI Styles The latest UI style is the material design, with light and dark options available. You can also personalize your theme by applying color to specific theme attributes. This can be done in /res/value/styles.xml 23

24 Emulator When testing your project you may encounter the following issues with emulation: 1. Android Studio Does not Compile Project or Show Previews. Possible Causes: a. Code Error: This can be caused by errors in your code! Look for error messages in your files or in the Gradle Build Message List. To perform a Gradle Build go to Build >> Rebuild Project and if there are any issues, they should be listed as Errors. If you see portions of your code in red, it means that it could not find the highlighted object, and you likely have an import missing or wrong name being referenced. b. Installation Error: A path or file in your installation might have been removed or become corrupted. A Full Clean re-install is suggested as a solution as pinpointing the error can take a long time. Your Projects will still exist in the workspace folder if you reinstall Android Studio! 24

25 2. Emulator Gives Warning Message or Crashed on Launch: a. AMD Processor: If your computer is equipped with an AMD Processor, you will not be able to run x86 android emulators. To solve this issue, you will need to go to the AVD Manager and Edit your Virtual Device. Change the Android Version from a x86 or x86_64 to an armeabi-v7a ABI. Warning: Your emulator WILL be very slow as you are emulating an architecture different from the one in your computer, but this solution will ensure you can at least test your app. b. HAXM Issue: If you have an AMD Processor, see solution above. If you have an Intel Processor, please manually install Intel HAXM (Google for Download Link). If this does not solve your problem, you need to enable Intel Virtualization Technology in your BIOS Settings. 25

26 3. Emulator is SLOW! a. Processing Power: If you are working with an older computer, a tabletlike computer (Windows Surface Pro) or another system with limited specs, your emulation WILL be slow. Once you start your emulator, don t close it. Running your project will automatically open a new android app in your emulator even if it is running. b. Virtual Device RAM: If your virtual device complains that you do not have enough memory you can either change its advanced settings to lower the memory requirements or create a new device with simpler specs. A suggestion is to use the Nexus 4 or Galaxy Nexus as your baseline. c. Android Emulation: If any of the members in your team have an android device and none of you manage to get your emulators working, you can always resort to using your device. Just connect them, follow the steps in Android Lab 01 and deploy your app to it! 26

27 Midterm The Midterm will be distributed and the TA will discuss the solution to the questions in the exam. Before the end of the class you MUST return the exam to the TA. 27

Developing Android Applications

Developing Android Applications Developing Android Applications SEG2105 - Introduction to Software Engineering Fall 2016 Presented by: Felipe M. Modesto TA & PhD Candidate Faculty of Engineering Faculté de Génie uottawa.ca Additional

More information

Creating a Custom ListView

Creating a Custom ListView Creating a Custom ListView References https://developer.android.com/guide/topics/ui/declaring-layout.html#adapterviews Overview The ListView in the previous tutorial creates a TextView object for each

More information

ListView Containers. Resources. Creating a ListView

ListView Containers. Resources. Creating a ListView ListView Containers Resources https://developer.android.com/guide/topics/ui/layout/listview.html https://developer.android.com/reference/android/widget/listview.html Creating a ListView A ListView is a

More information

Practical 1.ListView example

Practical 1.ListView example Practical 1.ListView example In this example, we show you how to display a list of fruit name via ListView. Android Layout file File : res/layout/list_fruit.xml

More information

INTRODUCTION COS MOBILE DEVELOPMENT WHAT IS ANDROID CORE OS. 6-Android Basics.key - February 21, Linux-based.

INTRODUCTION COS MOBILE DEVELOPMENT WHAT IS ANDROID CORE OS. 6-Android Basics.key - February 21, Linux-based. 1 COS 470 - MOBILE DEVELOPMENT INTRODUCTION 2 WHAT IS ANDROID Linux-based Java/Kotlin Android Runtime (ART) System Apps SMS, Calendar, etc. Platform Architecture 3 CORE OS Linux (64 bit) Each app is a

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie The image cannot be displayed. Your computer

More information

ListView (link) An ordered collection of selectable choices. key attributes in XML:

ListView (link) An ordered collection of selectable choices. key attributes in XML: CS 193A Lists This document is copyright (C) Marty Stepp and Stanford Computer Science. Licensed under Creative Commons Attribution 2.5 License. All rights reserved. ListView (link) An ordered collection

More information

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen Gill Cleeren Agenda Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen Lists and navigation Navigating from master to detail Optimizing the application Preparing

More information

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology

More information

Introductory Mobile App Development

Introductory Mobile App Development Introductory Mobile App Development 152-160 Quick Links & Text References Overview Pages ListView Pages ArrayAdaper Pages Filling a ListView Pages Sensing Click Pages Selected Item Info Pages Configuring

More information

Chapter 7: Reveal! Displaying Pictures in a Gallery

Chapter 7: Reveal! Displaying Pictures in a Gallery Chapter 7: Reveal! Displaying Pictures in a Gallery Objectives In this chapter, you learn to: Create an Android project using a Gallery control Add a Gallery to display a horizontal list of images Reference

More information

Android Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9)

Android Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics ArrayAdapter Preferences Widgets Jonathan Diehl, Hendrik Thüs 2 ArrayAdapter Jonathan Diehl, Hendrik Thüs

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie User Interface Design" & Development -

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie The image cannot be displayed. Your computer

More information

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology

More information

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2.

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2. Outline 1. Set up Android Studio Android development Tiberiu Vilcu Prepared for EECS 411 Sugih Jamin 15 September 2017 2. Create sample app 3. Add UI to see how the design interface works 4. Add some code

More information

EECS 4443 Mobile User Interfaces. More About Layouts. Scott MacKenzie. York University. Overview (Review)

EECS 4443 Mobile User Interfaces. More About Layouts. Scott MacKenzie. York University. Overview (Review) EECS 4443 Mobile User Interfaces More About Layouts Scott MacKenzie York University Overview (Review) A layout defines the visual structure for a user interface, such as the UI for an activity or app widget

More information

Overview. Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework

Overview. Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework Implicit Intents Overview Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework Intents Intent asynchronous message used to activate one Android component

More information

Mobile Computing Practice # 2a Android Applications - Interface

Mobile Computing Practice # 2a Android Applications - Interface Mobile Computing Practice # 2a Android Applications - Interface 1. Create an Android Lunch Places List application that allows the user to take note of restaurant characteristics like its name, address

More information

EECS 4443 Mobile User Interfaces. More About Layouts. Scott MacKenzie. York University

EECS 4443 Mobile User Interfaces. More About Layouts. Scott MacKenzie. York University EECS 4443 Mobile User Interfaces More About Layouts Scott MacKenzie York University Overview (Review) A layout defines the visual structure for a user interface, such as the UI for an activity or app widget

More information

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings. Hello World Lab Objectives: Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.xml What to Turn in: The lab evaluation

More information

10.1 Introduction. Higher Level Processing. Word Recogniton Model. Text Output. Voice Signals. Spoken Words. Syntax, Semantics, Pragmatics

10.1 Introduction. Higher Level Processing. Word Recogniton Model. Text Output. Voice Signals. Spoken Words. Syntax, Semantics, Pragmatics Chapter 10 Speech Recognition 10.1 Introduction Speech recognition (SR) by machine, which translates spoken words into text has been a goal of research for more than six decades. It is also known as automatic

More information

Developing Android Applications

Developing Android Applications Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 21 October 2015 Android Lab 02 Advanced Android Features 2 Class Plan UI Elements Activities Intents Data Transfer

More information

Upon completion of the second part of the lab the students will have:

Upon completion of the second part of the lab the students will have: ETSN05, Fall 2017, Version 2.0 Software Development of Large Systems Lab 2 1. INTRODUCTION The goal of lab 2 is to introduce students to the basics of Android development and help them to create a starting

More information

University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World

University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World Before you do anything read all of the following red paragraph! For this lab you

More information

ActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { }

ActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { } Android ActionBar import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { Layout, activity.xml

More information

ANDROID SYLLABUS. Advanced Android

ANDROID SYLLABUS. Advanced Android Advanced Android 1) Introduction To Mobile Apps I. Why we Need Mobile Apps II. Different Kinds of Mobile Apps III. Briefly about Android 2) Introduction Android I. History Behind Android Development II.

More information

GUI Widget. Lecture6

GUI Widget. Lecture6 GUI Widget Lecture6 AnalogClock/Digital Clock Button CheckBox DatePicker EditText Gallery ImageView/Button MapView ProgressBar RadioButton Spinner TextView TimePicker WebView Android Widgets Designing

More information

COMP4521 EMBEDDED SYSTEMS SOFTWARE

COMP4521 EMBEDDED SYSTEMS SOFTWARE COMP4521 EMBEDDED SYSTEMS SOFTWARE LAB 1: DEVELOPING SIMPLE APPLICATIONS FOR ANDROID INTRODUCTION Android is a mobile platform/os that uses a modified version of the Linux kernel. It was initially developed

More information

Adapter.

Adapter. 1 Adapter An Adapter object acts as a bridge between an AdapterView and the underlying data for that view The Adapter provides access to the data items The Adapter is also responsible for making a View

More information

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop Workshop 1. Create an Option Menu, and convert it into Action Bar (Page 1 8) Create an simple Option Menu Convert Option Menu into Action Bar Create Event Listener for Menu and Action Bar Add System Icon

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu Announcements Group formation: Projects 2, 3 and final project will be

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu India Summer 2012 Review Session Android and Web Working with Views Working with Views Create a new Android project. The app name should

More information

(Refer Slide Time: 1:12)

(Refer Slide Time: 1:12) Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Lecture 06 Android Studio Setup Hello, today s lecture is your first lecture to watch android development.

More information

Mobile Programming Lecture 1. Getting Started

Mobile Programming Lecture 1. Getting Started Mobile Programming Lecture 1 Getting Started Today's Agenda About the Android Studio IDE Hello, World! Project Android Project Structure Introduction to Activities, Layouts, and Widgets Editing Files in

More information

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar Design Patterns MSc in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

When programming in groups of people, it s essential to version the code. One of the most popular versioning tools is git. Some benefits of git are:

When programming in groups of people, it s essential to version the code. One of the most popular versioning tools is git. Some benefits of git are: ETSN05, Fall 2017, Version 1.0 Software Development of Large Systems Lab 2 preparations Read through this document carefully. In order to pass lab 2, you will need to understand the topics presented in

More information

Mobile Programming Lecture 3. Resources, Selection, Activities, Intents

Mobile Programming Lecture 3. Resources, Selection, Activities, Intents Mobile Programming Lecture 3 Resources, Selection, Activities, Intents Lecture 2 Review What widget would you use to allow the user to enter a yes/no value a range of values from 1 to 100 What's the benefit

More information

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml Android Application Written in Java (it s possible to write native code) Good

More information

Mobile and Ubiquitous Computing: Android Programming (part 4)

Mobile and Ubiquitous Computing: Android Programming (part 4) Mobile and Ubiquitous Computing: Android Programming (part 4) Master studies, Winter 2015/2016 Dr Veljko Pejović Veljko.Pejovic@fri.uni-lj.si Examples from: Mobile and Ubiquitous Computing Jo Vermeulen,

More information

(Refer Slide Time: 0:48)

(Refer Slide Time: 0:48) Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Lecture 10 Android Studio Last week gave you a quick introduction to android program. You develop a simple

More information

The World of List View. Romain Guy and Adam Powell May 19, 2010

The World of List View. Romain Guy and Adam Powell May 19, 2010 The World of List View Romain Guy and Adam Powell May 19, 2010 View live notes and ask questions about this session on Wave http://bit.ly/9zozbr Agenda Virtualization and adapters Item properties Headers

More information

Android Programming Lecture 2 9/7/2011

Android Programming Lecture 2 9/7/2011 Android Programming Lecture 2 9/7/2011 Creating a first app 1. Create a new Android project (a collection of source code and resources for the app) from the Eclipse file menu 2. Choose a project name (can

More information

Assistant Professor Computer Science. Introduction to Human-Computer Interaction

Assistant Professor Computer Science. Introduction to Human-Computer Interaction CMSC434 Introduction to Human-Computer Interaction Week 08 Lecture 16 Oct 23, 2014 Building Android UIs II Implementing Custom Views Human Computer Interaction Laboratory @jonfroehlich Assistant Professor

More information

1. Simple List. 1.1 Simple List using simple_list_item_1

1. Simple List. 1.1 Simple List using simple_list_item_1 1. Simple List 1.1 Simple List using simple_list_item_1 1. Create the Android application with the following attributes. Application Name: MySimpleList Project Name: Package Name: MySimpleList com.example.mysimplelist

More information

Mobile User Interfaces

Mobile User Interfaces Mobile User Interfaces CS 2046 Mobile Application Development Fall 2010 Announcements Next class = Lab session: Upson B7 Office Hours (starting 10/25): Me: MW 1:15-2:15 PM, Upson 360 Jae (TA): F 11:00

More information

Fig. 2.2 New Android Application dialog. 2.3 Creating an App 41

Fig. 2.2 New Android Application dialog. 2.3 Creating an App 41 AndroidHTP_02.fm Page 41 Wednesday, April 30, 2014 3:00 PM 2.3 Creating an App 41 the Welcome app s TextView and the ImageViews accessibility strings, then shows how to test the app on an AVD configured

More information

Chapter 2 Welcome App

Chapter 2 Welcome App 2.8 Internationalizing Your App 1 Chapter 2 Welcome App 2.1 Introduction a. Android Studio s layout editor enables you to build GUIs using drag-and-drop techniques. b. You can edit the GUI s XML directly.

More information

Graphical User Interfaces

Graphical User Interfaces Graphical User Interfaces Some suggestions Avoid displaying too many things Well-known anti-patterns Display useful content on your start screen Use action bars to provide consistent navigation Keep your

More information

OPTIMIZING ANDROID UI PRO TIPS FOR CREATING SMOOTH AND RESPONSIVE APPS

OPTIMIZING ANDROID UI PRO TIPS FOR CREATING SMOOTH AND RESPONSIVE APPS OPTIMIZING ANDROID UI PRO TIPS FOR CREATING SMOOTH AND RESPONSIVE APPS @CYRILMOTTIER GET TO KNOW JAVA DON T USE BOXED TYPES UNNECESSARILY HashMap hashmap = new HashMap();

More information

Lab Android Development Environment

Lab Android Development Environment Lab Android Development Environment Setting up the ADT, Creating, Running and Debugging Your First Application Objectives: Familiarize yourself with the Android Development Environment Important Note:

More information

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment FRAGMENTS Fragments An activity is a container for views When you have a larger screen device than a phone like a tablet it can look too simple to use phone interface here. Fragments Mini-activities, each

More information

getcount getitem getitemid getview com.taxi Class MainActivity drawerlayout drawerleft drawerright...

getcount getitem getitemid getview com.taxi Class MainActivity drawerlayout drawerleft drawerright... Contents com.taxi.ui Class CallDialog... 3 CallDialog... 4 show... 4 build... 5 com.taxi.custom Class CustomActivity... 5 TOUCH... 6 CustomActivity... 6 onoptionsitemselected... 6 onclick... 6 com.taxi.model

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 5: Data-Driven Views and Android Components Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 5: Data-Driven Views and Android Components Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 5: Data-Driven Views and Android Components Emmanuel Agu Announcements Slight modifications to course timeline posted No class February 16 (Advising day)

More information

Required Core Java for Android application development

Required Core Java for Android application development Required Core Java for Android application development Introduction to Java Datatypes primitive data types non-primitive data types Variable declaration Operators Control flow statements Arrays and Enhanced

More information

05. RecyclerView and Styles

05. RecyclerView and Styles 05. RecyclerView and Styles 08.03.2018 1 Agenda Intents Creating Lists with RecyclerView Creating Cards with CardView Application Bar Menu Styles and Themes 2 Intents 3 What is Intent? An Intent is an

More information

Introduction to Android

Introduction to Android Introduction to Android Ambient intelligence Alberto Monge Roffarello Politecnico di Torino, 2017/2018 Some slides and figures are taken from the Mobile Application Development (MAD) course Disclaimer

More information

Android Programming in Bluetooth Cochlea Group

Android Programming in Bluetooth Cochlea Group Android Programming in Bluetooth Cochlea Group Zijian Zhao Abstract: My project is mainly android programming work in the Bluetooth Cochlea Group. In this report I will first introduce the background of

More information

Activities and Fragments

Activities and Fragments Activities and Fragments 21 November 2017 Lecture 5 21 Nov 2017 SE 435: Development in the Android Environment 1 Topics for Today Activities UI Design and handlers Fragments Source: developer.android.com

More information

Android Application Development using Kotlin

Android Application Development using Kotlin Android Application Development using Kotlin 1. Introduction to Kotlin a. Kotlin History b. Kotlin Advantages c. How Kotlin Program Work? d. Kotlin software Prerequisites i. Installing Java JDK and JRE

More information

User Interface: Layout. Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University

User Interface: Layout. Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University User Interface: Layout Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University http://twitter.com/krunapon Agenda User Interface Declaring Layout Common Layouts User Interface

More information

Distributed Systems Assignment 1

Distributed Systems Assignment 1 Distributed Systems Assignment 1 Marian.george@inf.ethz.ch Distributed Systems Assignment 1 1 The Exercise Objectives Get familiar with Android programming Emulator, debugging, deployment Learn to use

More information

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device.

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device. Let's get started! Start Studio We might have a bit of work to do here Create new project Let's give it a useful name Note the traditional convention for company/package names We don't need C++ support

More information

CHAPTER 4. Fragments ActionBar Menus

CHAPTER 4. Fragments ActionBar Menus CHAPTER 4 Fragments ActionBar Menus Explore how to build applications that use an ActionBar and Fragments Understand the Fragment lifecycle Learn to configure the ActionBar Implement Fragments with Responsive

More information

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license Android Android Mobile operating system developed by Google A complete stack OS, framework A rich set of applications Email, calendar, browser, maps, text messaging, contacts, camera, dialer, music player,

More information

Produced by. Mobile Application Development. Eamonn de Leastar

Produced by. Mobile Application Development. Eamonn de Leastar Mobile Application Development Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie A First

More information

CS371m - Mobile Computing. More UI Navigation, Fragments, and App / Action Bars

CS371m - Mobile Computing. More UI Navigation, Fragments, and App / Action Bars CS371m - Mobile Computing More UI Navigation, Fragments, and App / Action Bars EFFECTIVE ANDROID NAVIGATION 2 Clicker Question Have you heard of the terms Back and Up in the context of Android Navigation?

More information

CS 403X Mobile and Ubiquitous Computing Lecture 3: Introduction to Android Programming Emmanuel Agu

CS 403X Mobile and Ubiquitous Computing Lecture 3: Introduction to Android Programming Emmanuel Agu CS 403X Mobile and Ubiquitous Computing Lecture 3: Introduction to Android Programming Emmanuel Agu Android UI Tour Home Screen First screen, includes favorites tray (e.g phone, mail, messaging, web, etc)

More information

Android Application Development Course Code: AND-401 Version 7 Duration: 05 days

Android Application Development Course Code: AND-401 Version 7 Duration: 05 days Let s Reach For Excellence! TAN DUC INFORMATION TECHNOLOGY SCHOOL JSC Address: 103 Pasteur, Dist.1, HCMC Tel: 08 38245819; 38239761 Email: traincert@tdt-tanduc.com Website: www.tdt-tanduc.com; www.tanducits.com

More information

Android Application Development Course 28 Contact Hours

Android Application Development Course 28 Contact Hours Android Application Development Course 28 Contact Hours Course Overview This course that provides the required knowledge and skills to design and build a complete Androidâ application. It delivers an extensive

More information

Syllabus- Java + Android. Java Fundamentals

Syllabus- Java + Android. Java Fundamentals Introducing the Java Technology Syllabus- Java + Android Java Fundamentals Key features of the technology and the advantages of using Java Using an Integrated Development Environment (IDE) Introducing

More information

Mobile Application Development

Mobile Application Development Mobile Application Development donation-web api { method: 'GET', path: '/api/candidates', config: CandidatesApi.find, { method: 'GET', path: '/api/candidates/{id', config: CandidatesApi.findOne, { method:

More information

CE881: Mobile & Social Application Programming

CE881: Mobile & Social Application Programming CE881: Mobile & Social Application Programming, s, s and s Jialin Liu Senior Research Officer Univerisity of Essex 6 Feb 2017 Recall of lecture 3 and lab 3 :) Please download Kahoot or open a bowser and

More information

Lab 1 - Setting up the User s Profile UI

Lab 1 - Setting up the User s Profile UI Lab 1 - Setting up the User s Profile UI Getting started This is the first in a series of labs that allow you to develop the MyRuns App. The goal of the app is to capture and display (using maps) walks

More information

Announcements. Android: n-puzzle Walkthrough. Tommy MacWilliam. Dynamic GUIs. ListViews. Bitmaps. Gameplay. Saving State. Menus

Announcements. Android: n-puzzle Walkthrough. Tommy MacWilliam. Dynamic GUIs. ListViews. Bitmaps. Gameplay. Saving State. Menus Harvard University February 22, 2012 Announcements Lecture videos: https://www.cs76.net/lectures Section videos: https://www.cs76.net/sections videos: https://www.cs76.net/projects Today dynamic GUIs bitmaps

More information

Programming Android UI. J. Serrat Software Design December 2017

Programming Android UI. J. Serrat Software Design December 2017 Programming Android UI J. Serrat Software Design December 2017 Preliminaries : Goals Introduce basic programming Android concepts Examine code for some simple examples Limited to those relevant for the

More information

Have a development environment in 256 or 255 Be familiar with the application lifecycle

Have a development environment in 256 or 255 Be familiar with the application lifecycle Upcoming Assignments Readings: Chapter 4 by today Horizontal Prototype due Friday, January 22 Quiz 2 today at 2:40pm Lab Quiz next Friday during lecture time (2:10-3pm) Have a development environment in

More information

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

Diving into Android. By Jeroen Tietema. Jeroen Tietema, Diving into Android By Jeroen Tietema Jeroen Tietema, 2015 1 Requirements 4 Android SDK 1 4 Android Studio (or your IDE / editor of choice) 4 Emulator (Genymotion) or a real device. 1 See https://developer.android.com

More information

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism ANDROID TRAINING COURSE CONTENT SECTION 1 : INTRODUCTION Android What it is? History of Android Importance of Java language for Android Apps Other mobile OS-es Android Versions & different development

More information

CS371m - Mobile Computing. More UI Action Bar, Navigation, and Fragments

CS371m - Mobile Computing. More UI Action Bar, Navigation, and Fragments CS371m - Mobile Computing More UI Action Bar, Navigation, and Fragments ACTION BAR 2 Options Menu and Action Bar prior to Android 3.0 / API level 11 Android devices required a dedicated menu button Pressing

More information

Android Layout Types

Android Layout Types Android Layout Types Android Linear Layout Android LinearLayout is a view group that aligns all children in either vertically or horizontally. android:divider - This is drawable to use as a vertical divider

More information

Java Training Center - Android Application Development

Java Training Center - Android Application Development Java Training Center - Android Application Development Android Syllabus and Course Content (3 months, 2 hour Daily) Introduction to Android Android and it's feature Android releases and Versions Introduction

More information

Orientation & Localization

Orientation & Localization Orientation & Localization Overview Lecture: Open Up Your My Pet App Handling Rotations Serializable Landscape Layouts Localization Alert Dialogs 1 Handling Rotations When the device is rotated, the device

More information

An Android Studio SQLite Database Tutorial

An Android Studio SQLite Database Tutorial An Android Studio SQLite Database Tutorial Previous Table of Contents Next An Android Studio TableLayout and TableRow Tutorial Understanding Android Content Providers in Android Studio Purchase the fully

More information

More Effective Layouts

More Effective Layouts More Effective Layouts In past weeks, we've looked at ways to make more effective use of the presented display (e.g. elastic layouts, and separate layouts for portrait and landscape), as well as autogenerating

More information

Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB)

Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB) Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB) In this exercise, we will create a simple Android application that uses IBM Bluemix Cloudant NoSQL DB. The application

More information

Fragments. Lecture 10

Fragments. Lecture 10 Fragments Lecture 10 Situa2onal layouts Your app can use different layouts in different situa2ons Different device type (tablet vs. phone vs. watch) Different screen size Different orienta2on (portrait

More information

Action Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps.

Action Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps. 1 Action Bar Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps. 1) App Icon 3) Action Buttons 2)View Control 4) Action Overflows

More information

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar Design Patterns MSc in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

Debojyoti Jana (Roll ) Rajrupa Ghosh (Roll ) Sreya Sengupta (Roll )

Debojyoti Jana (Roll ) Rajrupa Ghosh (Roll ) Sreya Sengupta (Roll ) DINABANDHU ANDREWS INSTITUTE OF TECHNOLOGY AND MANAGEMENT (Affiliated to West Bengal University of Technology also known as Maulana Abul Kalam Azad University Of Technology) Project report on ANDROID QUIZ

More information

Android CardView Tutorial

Android CardView Tutorial Android CardView Tutorial by Kapil - Wednesday, April 13, 2016 http://www.androidtutorialpoint.com/material-design/android-cardview-tutorial/ YouTube Video We have already discussed about RecyclerView

More information

Quizz Master AISL year wednesday 26 october 2016

Quizz Master AISL year wednesday 26 october 2016 Quizz Master AISL year 2016-2017 wednesday 26 october 2016 First name : Second name : Some questions have more than one answer. Check all the good answers. The answers are in green. Objet oriented programming

More information

Mobile Computing Practice # 2d Android Applications Local DB

Mobile Computing Practice # 2d Android Applications Local DB Mobile Computing Practice # 2d Android Applications Local DB In this installment we will add persistent storage to the restaurants application. For that, we will create a database with a table for holding

More information

EMBEDDED SYSTEMS PROGRAMMING UI and Android

EMBEDDED SYSTEMS PROGRAMMING UI and Android EMBEDDED SYSTEMS PROGRAMMING 2016-17 UI and Android STANDARD GESTURES (1/2) UI classes inheriting from View allow to set listeners that respond to basic gestures. Listeners are defined by suitable interfaces.

More information

The Suggest Example layout (cont ed)

The Suggest Example layout (cont ed) Using Web Services 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 7: Working with Web Services Android provides a full set of Java-standard networking APIs, such as the java.net package containing among

More information

Tishik Int. University / College of Science / IT Dept. This Course based mainly on online sources ADVANCED MOBILE APPLICATIONS / Spring 1

Tishik Int. University / College of Science / IT Dept. This Course based mainly on online sources ADVANCED MOBILE APPLICATIONS / Spring 1 ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring Tishik Int. University / College of Science / IT Dept. Presented By: Mohammad Salim Al-Othman For 4 th Grade Students This Course based mainly on online

More information

Building User Interface for Android Mobile Applications II

Building User Interface for Android Mobile Applications II Building User Interface for Android Mobile Applications II Mobile App Development 1 MVC 2 MVC 1 MVC 2 MVC Android redraw View invalidate Controller tap, key pressed update Model MVC MVC in Android View

More information

Mobile Development Lecture 10: Fragments

Mobile Development Lecture 10: Fragments Mobile Development Lecture 10: Fragments Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Elgayyar.weebly.com Situational Layouts Your app can use different layout in different situations: different device type

More information

Introduction To JAVA Programming Language

Introduction To JAVA Programming Language Introduction To JAVA Programming Language JAVA is a programming language which is used in Android App Development. It is class based and object oriented programming whose syntax is influenced by C++. The

More information

ContentProvider & ContentResolver ContentResolver methods CursorLoader Implementing ContentProviders

ContentProvider & ContentResolver ContentResolver methods CursorLoader Implementing ContentProviders ContentProvider & ContentResolver ContentResolver methods CursorLoader Implementing ContentProviders Represents a repository of structured data Encapsulates data sets Enforces data access permissions Intended

More information