CS 4330/5390: Mobile Application Development Exam 1

Size: px
Start display at page:

Download "CS 4330/5390: Mobile Application Development Exam 1"

Transcription

1 1 Spring 2017 (Thursday, March 9) Name: CS 4330/5390: Mobile Application Development Exam 1 This test has 8 questions and pages numbered 1 through 7. Reminders This test is closed-notes and closed-book. However, you are allowed to bring 1 page (8.5 X 11) of notes (both sides). Your notes must be your own, they must be hand written, and they must be turned in with your test. This test is to be done individually, and you are not to exchange or share materials such as the textbook and notes with other students during the test. If you need more space, use the back of a page. Note when you do that on the front. This test is timed. Your test will not be graded if you try to take more than the time allowed. Therefore, before you begin, please take a moment to look over the entire test so that you can budget your time. For program code, clarity is important; if your writings or code are sloppy and hard to read, you will lose points. Correct syntax also makes some difference. There are 100 points all. 1. (total 20 points) Short answers: multiple choice and fill-in-the-blank (a) (2 points) All Android apps have an automatically generated file named.java. It provides references (or resource Ids) to various resources used by the applications, e.g., layouts and drawables/mipmaps. That is, instead of hard coding such resources into an application, one externalizes and refers them by Ids. (b) (2 points) All the following layouts are supported by Android EXCEPT for: i. FrameLayout ii. GridLayout iii. GridBagLayout iv. LinearLayout v. RelativeLayout vi. TableLayout (c) (2 points) You use the view to provide visual feedback about some ongoing tasks, such as when you are performing a long-running task in the background. For example, you might be downloading some data from the Web and need to update the user about the status of the download. (d) (2 points) A represents a behavior or a portion of user interface in an activity. It is particularly useful in adapting a user experience across a wide range of devices, as they can be combined to build a multi-pane UI and be reused in multiple activities.

2 2 (e) (2 points) There are several framework methods to be called on various stages of an activity from its creation to destruction. This is the framework method where you initialize your activity. In this method you usually call the setcontentview() method to set the UI of your activity. i. oncreate() ii. onstart() iii. onrestart() iv. onresume (f) (2 points) In general, you use the startactivity() framework method to invoke an activity. However, it doesn t return a result from the called activity to the calling activity. If you need to pass data back from the called activity, you should instead use the () method to invoke it. (g) (2 points) As stated in the previous question, an activity can indicate its intention to receive a result when invoking another activity. However, to actually receive data from the called activity, you override the () method in the calling activity class. (h) (2 points) Android provides three different types of menus: options (actions/tools), context, and popup. Which type of menus is described below? It displays information related to a particular view of an activity. It is a floating menu owned by or associated with a view. Its menu items can be defined statically in an XML resource file or programmatically in source code. It can be activated by any UI event such as button click. (i) (2 points) To provide the options (actions/tools) menu for your activity, you need to override two framework methods in your activity: oncreateoptionsmenu() and. The first method is called to populate a menu with menu items, and the second method is called when a menu item is selected. (j) (2 points) A fragment has its own lifecycle. Which of the following lifecycle methods is not one of those that are most commonly overridden in a fragment class? i. onattach() ii. oncreate() iii. oncreateview() iv. onpause()

3 3 2. (4 points) One of the noticeable features of Android programming is the use of XML. List at least four different uses of XML. 3. (5 points) There are several different units of measurement that you can use to specify the size or dimension of an Android UI element. Which unit is recommended for specifying the size of a view? Justify your answer by stating the reason. 4. (6 points) Describe the difference between explicit and implicit intents. Do not use the terms explicit and implicit in your description. 5. (5 points) The term adaptive design refers to the adaptation of a layout design that fits an individual screen size and/or orientation. It is important to Android because it supports flexibility when designing an app that can work on multiple devices. Describe briefly the Android approach for providing several alternative layouts to target different screen configurations (e.g., sizes)..

4 4 6. (total 25 points) You are to develop a login component of some Android app. You will be writing it incrementally by completing given skeletal code. (a) (10 points) Let s first define its UI the login screen of the app by completing the skeletal activity main.xml file give below. As shown below, the login UI consists of only a few views. You may need to specify their attributes (e.g., android:id) to refer to them in your activity class (see Problem 6b below). For layouts, use only the LinearLayout class; you are not allowed to use any other layout classes. <!-- activity_main.xml --> <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <!-- WRITE YOUR CODE HERE! --> </LinearLayout>

5 5 (b) (15 points) Next, let s code the logic of the login component handling a login request by checking the user name. When the login button is clicked, the app checks if the provided user name is known to the system. If that s the case, it will show a welcome toast message (see a sample screen below); otherwise, the login request is ignored, i.e., nothing happens. Use the given LoginManager class to check the validity of a user name. Hint: you need to define only one or two methods, including the oncreate() method. public class MainActivity extends Activity { private static class LoginManager { /** Is the given user name known to the system? */ public boolean isknownuser(string name) {... } } private void toast(string msg) { Toast.makeText(this, msg, Toast.LENGTH_SHORT).show(); } <!-- WRITE YOUR CODE HERE! --> }

6 6 7. (20 points) Here you are to modularize the login app of the previous problem by separating the logic of checking a user name and that of welcoming a user (see below for an improved UI). For this, you will be creating a new activity named WelcomeActivity. This activity is to be invoked by the main activity and to show a welcome toast message. (a) Change the code of MainActivity to invoke the WelcomeActivity class when a user is successfully logged in. You should pass the user name to the WelcomeActivity class. Assume that the following definition is already included in the AndroidManifest.xml file. <activity android:name=".welcomeactivity" android:label="@string/welcome" > <intent-filter> <action android:name="edu.utep.cs.cs4330.exam1.welcome" /> <category android:name="android.intent.category.default" /> </intent-filter> </activity> (b) Define the WelcomeActivity class to show a welcome toast message. Don t worry about its UI other than the toast message. Hint: you need to define/override only one method.

7 7 8. (15 points) Let s reconsider the login app of the previous problem. Let s improve its user experience by providing a different UI depending on the screen orientation. That is, you will be providing a new UI for the landscape mode (see the sample screen below). All the views of the UI form a single row. Both the name label and the login button have natural widths, and the edit widget in the middle has all the remaining space. Describe your approach for providing two different UIs, one for the portrait mode and the other for the landscape. Define the UI for the landscape mode by being specific about its full pathname (directory and file names). As before, use only the LinearLayout class for layouts.

Android Basics. Android UI Architecture. Android UI 1

Android Basics. Android UI Architecture. Android UI 1 Android Basics Android UI Architecture Android UI 1 Android Design Constraints Limited resources like memory, processing, battery à Android stops your app when not in use Primarily touch interaction à

More information

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time The 1 activity 1 thing the user can do heuristic may not make sense for larger devices Application

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu Administrivia Moved back deadlines for projects 2, 3 and final project See updated schedule

More information

Mobile Programming Lecture 5. Composite Views, Activities, Intents and Filters

Mobile Programming Lecture 5. Composite Views, Activities, Intents and Filters Mobile Programming Lecture 5 Composite Views, Activities, Intents and Filters Lecture 4 Review How do you get the value of a string in the strings.xml file? What are the steps to populate a Spinner or

More information

Android App Development. Mr. Michaud ICE Programs Georgia Institute of Technology

Android App Development. Mr. Michaud ICE Programs Georgia Institute of Technology Android App Development Mr. Michaud ICE Programs Georgia Institute of Technology Android Operating System Created by Android, Inc. Bought by Google in 2005. First Android Device released in 2008 Based

More information

Android Application Development

Android Application Development Android Application Development Octav Chipara What is Android A free, open source mobile platform A Linux-based, multiprocess, multithreaded OS Android is not a device or a product It s not even limited

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

CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu Android Activity LifeCycle Starting Activities Android applications don't start with a call to main(string[])

More information

CMSC436: Fall 2013 Week 3 Lab

CMSC436: Fall 2013 Week 3 Lab CMSC436: Fall 2013 Week 3 Lab Objectives: Familiarize yourself with the Activity class, the Activity lifecycle, and the Android reconfiguration process. Create and monitor a simple application to observe

More information

Vienos veiklos būsena. Theory

Vienos veiklos būsena. Theory Vienos veiklos būsena Theory While application is running, we create new Activities and close old ones, hide the application and open it again and so on, and Activity can process all these events. It is

More information

ANDROID USER INTERFACE

ANDROID USER INTERFACE 1 ANDROID USER INTERFACE Views FUNDAMENTAL UI DESIGN Visual interface element (controls or widgets) ViewGroup Contains multiple widgets. Layouts inherit the ViewGroup class Activities Screen being displayed

More information

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi ACTIVITY, FRAGMENT, NAVIGATION Roberto Beraldi Introduction An application is composed of at least one Activity GUI It is a software component that stays behind a GUI (screen) Activity It runs inside the

More information

UI Fragment.

UI Fragment. UI Fragment 1 Contents Fragments Overviews Lifecycle of Fragments Creating Fragments Fragment Manager and Transactions Adding Fragment to Activity Fragment-to-Fragment Communication Fragment SubClasses

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

Let s take a display of HTC Desire smartphone as an example. Screen size = 3.7 inches, resolution = 800x480 pixels.

Let s take a display of HTC Desire smartphone as an example. Screen size = 3.7 inches, resolution = 800x480 pixels. Screens To begin with, here is some theory about screens. A screen has such physical properties as size and resolution. Screen size - a distance between two opposite corners of the screens, usually measured

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

Comp 595MC/L: Mobile Computing CSUN Computer Science Department Fall 2013 Midterm

Comp 595MC/L: Mobile Computing CSUN Computer Science Department Fall 2013 Midterm Comp 595MC/L: Mobile Computing CSUN Computer Science Department Fall 2013 Midterm Time: 50 minutes Good news: You can use ONE sheet of notes. Bad news: Closed book, no electronic computing or communications

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

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu Fragments Recall: Fragments Sub-components of an Activity (screen) An activity can contain multiple fragments, organized

More information

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ]

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ] s@lm@n Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ] Android AND-401 : Practice Test Question No : 1 Which of the following is required to allow the Android

More information

GUI Design for Android Applications

GUI Design for Android Applications GUI Design for Android Applications SE3A04 Tutorial Jason Jaskolka Department of Computing and Software Faculty of Engineering McMaster University Hamilton, Ontario, Canada jaskolj@mcmaster.ca November

More information

Fragments. Lecture 11

Fragments. Lecture 11 Fragments Lecture 11 Situational layouts Your app can use different layouts in different situations Different device type (tablet vs. phone vs. watch) Different screen size Different orientation (portrait

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

Lifecycle Callbacks and Intents

Lifecycle Callbacks and Intents SE 435: Development in the Android Environment Recitations 2 3 Semester 1 5779 4 Dec - 11 Dec 2018 Lifecycle Callbacks and Intents In this recitation we ll prepare a mockup tool which demonstrates the

More information

Hello World. Lesson 1. Android Developer Fundamentals. Android Developer Fundamentals. Layouts, and. NonCommercial

Hello World. Lesson 1. Android Developer Fundamentals. Android Developer Fundamentals. Layouts, and. NonCommercial Hello World Lesson 1 This work is licensed This under work a Creative is is licensed Commons under a a Attribution-NonCommercial Creative 4.0 Commons International Attribution- License 1 NonCommercial

More information

Programming with Android: Android for Tablets. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: Android for Tablets. Dipartimento di Scienze dell Informazione Università di Bologna Programming with Android: Android for Tablets Luca Bedogni Marco Di Felice Dipartimento di Scienze dell Informazione Università di Bologna Outline Android for Tablets: A Case Study Android for Tablets:

More information

LECTURE 08 UI AND EVENT HANDLING

LECTURE 08 UI AND EVENT HANDLING MOBILE APPLICATION DEVELOPMENT LECTURE 08 UI AND EVENT HANDLING IMRAN IHSAN ASSISTANT PROFESSOR WWW.IMRANIHSAN.COM User Interface User Interface The Android Widget Toolbox 1. TextView 2. EditText 3. Spinner

More information

Multiple devices. Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers

Multiple devices. Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers Multiple devices Multiple devices Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers Create a new directory in your project's res/ and name it using the

More information

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Managing Screen Orientation

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Managing Screen Orientation EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Managing Screen Orientation ORIENTATIONS Portrait Landscape Reverse portrait Reverse landscape ON REVERSE PORTRAIT Android: all four orientations are

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

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr.

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Android Application Model I CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Rajiv Ramnath 1 Framework Support (e.g. Android) 2 Framework Capabilities

More information

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering Getting Started Dr. Miguel A. Labrador Department of Computer Science & Engineering labrador@csee.usf.edu http://www.csee.usf.edu/~labrador 1 Goals Setting up your development environment Android Framework

More information

Android Application Model I

Android Application Model I Android Application Model I CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Rajiv Ramnath Reading: Big Nerd Ranch Guide, Chapters 3, 5 (Activities);

More information

Overview of Activities

Overview of Activities d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA CS 282 Principles of Operating Systems II Systems Programming

More information

Solving an Android Threading Problem

Solving an Android Threading Problem Home Java News Brief Archive OCI Educational Services Solving an Android Threading Problem Introduction by Eric M. Burke, Principal Software Engineer Object Computing, Inc. (OCI) By now, you probably know

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

CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L

CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L 2 0 1 5 Activity Basics Manifest File AndroidManifest.xml Central configuration of Android application Defines: Name of application Icon for

More information

<uses-permission android:name="android.permission.internet"/>

<uses-permission android:name=android.permission.internet/> Chapter 11 Playing Video 11.1 Introduction We have discussed how to play audio in Chapter 9 using the class MediaPlayer. This class can also play video clips. In fact, the Android multimedia framework

More information

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle CS378 - Mobile Computing Anatomy of an Android App and the App Lifecycle Application Components five primary components different purposes and different lifecycles Activity single screen with a user interface,

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

Developed and taught by well-known Contact author and developer. At public for details venues or onsite at your location.

Developed and taught by well-known Contact author and developer. At public for details venues or onsite at your location. 2011 Marty Hall Android Programming Basics Originals of Slides and Source Code for Examples: http://www.coreservlets.com/android-tutorial/ Customized Java EE Training: http://courses.coreservlets.com/

More information

Mobile Application Development Android

Mobile Application Development Android Mobile Application Development Android Lecture 2 MTAT.03.262 Satish Srirama satish.srirama@ut.ee Android Lecture 1 -recap What is Android How to develop Android applications Run & debug the applications

More information

INTRODUCTION TO ANDROID

INTRODUCTION TO ANDROID INTRODUCTION TO ANDROID 1 Niv Voskoboynik Ben-Gurion University Electrical and Computer Engineering Advanced computer lab 2015 2 Contents Introduction Prior learning Download and install Thread Android

More information

Topics of Discussion

Topics of Discussion Reference CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing Fragments, ActionBar and Menus Part 3 of 5 Android Programming Concepts, by Trish Cornez and Richard Cornez, pubslihed by Jones

More information

University of Babylon - College of IT SW Dep. - Android Assist. Lect. Wadhah R. Baiee Activities

University of Babylon - College of IT SW Dep. - Android Assist. Lect. Wadhah R. Baiee Activities Activities Ref: Wei-Meng Lee, BEGINNING ANDROID 4 APPLICATION DEVELOPMENT, Ch2, John Wiley & Sons, 2012 An application can have zero or more activities. Typically, applications have one or more activities;

More information

Starting Another Activity Preferences

Starting Another Activity Preferences Starting Another Activity Preferences Android Application Development Training Xorsat Pvt. Ltd www.xorsat.net fb.com/xorsat.education Outline Starting Another Activity Respond to the Button Create the

More information

EMBEDDED SYSTEMS PROGRAMMING Application Basics

EMBEDDED SYSTEMS PROGRAMMING Application Basics EMBEDDED SYSTEMS PROGRAMMING 2015-16 Application Basics APPLICATIONS Application components (e.g., UI elements) are objects instantiated from the platform s frameworks Applications are event driven ( there

More information

User Interface Development. CSE 5236: Mobile Application Development Instructor: Adam C. Champion Course Coordinator: Dr.

User Interface Development. CSE 5236: Mobile Application Development Instructor: Adam C. Champion Course Coordinator: Dr. User Interface Development CSE 5236: Mobile Application Development Instructor: Adam C. Champion Course Coordinator: Dr. Rajiv Ramnath 1 Outline UI Support in Android Fragments 2 UI Support in the Android

More information

Minds-on: Android. Session 2

Minds-on: Android. Session 2 Minds-on: Android Session 2 Paulo Baltarejo Sousa Instituto Superior de Engenharia do Porto 2016 Outline Activities UI Events Intents Practice Assignment 1 / 33 2 / 33 Activities Activity An activity provides

More information

CS260 Intro to Java & Android 05.Android UI(Part I)

CS260 Intro to Java & Android 05.Android UI(Part I) CS260 Intro to Java & Android 05.Android UI(Part I) Winter 2018 Winter 2018 CS250 - Intro to Java & Android 1 User Interface UIs in Android are built using View and ViewGroup objects A View is the base

More information

Mobile Computing Practice # 2c Android Applications - Interface

Mobile Computing Practice # 2c Android Applications - Interface Mobile Computing Practice # 2c Android Applications - Interface One more step in the restaurants application. 1. Design an alternative layout for showing up in landscape mode. Our current layout is not

More information

CS 528 Mobile and Ubiquitous Computing Lecture 3: Android UI, WebView, Android Activity Lifecycle Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 3: Android UI, WebView, Android Activity Lifecycle Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 3: Android UI, WebView, Android Activity Lifecycle Emmanuel Agu Android UI Design Example GeoQuiz App Reference: Android Nerd Ranch, pgs 1 30 App presents

More information

CS 3360 Design and Implementation of Programming Languages. Exam 1

CS 3360 Design and Implementation of Programming Languages. Exam 1 1 Spring 2017 (Thursday, March 9) Name: CS 3360 Design and Implementation of Programming Languages Exam 1 This test has 8 questions and pages numbered 1 through 7. Reminders This test is closed-notes and

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

Embedded Systems Programming - PA8001

Embedded Systems Programming - PA8001 Embedded Systems Programming - PA8001 http://goo.gl/ydeczu Lecture 9 Mohammad Mousavi m.r.mousavi@hh.se Center for Research on Embedded Systems School of Information Science, Computer and Electrical Engineering

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

LECTURE NOTES OF APPLICATION ACTIVITIES

LECTURE NOTES OF APPLICATION ACTIVITIES Department of Information Networks The University of Babylon LECTURE NOTES OF APPLICATION ACTIVITIES By College of Information Technology, University of Babylon, Iraq Samaher@inet.uobabylon.edu.iq The

More information

Android Fundamentals - Part 1

Android Fundamentals - Part 1 Android Fundamentals - Part 1 Alexander Nelson September 1, 2017 University of Arkansas - Department of Computer Science and Computer Engineering Reminders Projects Project 1 due Wednesday, September 13th

More information

Our First Android Application

Our First Android Application Mobile Application Development Lecture 04 Imran Ihsan Our First Android Application Even though the HelloWorld program is trivial in introduces a wealth of new ideas the framework, activities, manifest,

More information

Praktikum Entwicklung Mediensysteme. Implementing a User Interface

Praktikum Entwicklung Mediensysteme. Implementing a User Interface Praktikum Entwicklung Mediensysteme Implementing a User Interface Outline Introduction Programmatic vs. XML Layout Common Layout Objects Hooking into a Screen Element Listening for UI Notifications Applying

More information

CS 3360 Design and Implementation of Programming Languages. Exam 1

CS 3360 Design and Implementation of Programming Languages. Exam 1 1 Spring 2016 (Monday, March 21) Name: CS 3360 Design and Implementation of Programming Languages Exam 1 This test has 18 questions and pages numbered 1 through 6. Reminders This test is closed-notes and

More information

Computer Science E-76 Building Mobile Applications

Computer Science E-76 Building Mobile Applications Computer Science E-76 Building Mobile Applications Lecture 3: [Android] The SDK, Activities, and Views February 13, 2012 Dan Armendariz danallan@mit.edu 1 http://developer.android.com Android SDK and NDK

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

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle CS378 -Mobile Computing Anatomy of and Android App and the App Lifecycle Hello Android Tutorial http://developer.android.com/resources/tutorials/hello-world.html Important Files src/helloandroid.java Activity

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

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

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

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

Android UI: Overview

Android UI: Overview 1 Android UI: Overview An Activity is the front end component and it can contain screens. Android screens are composed of components or screen containers and components within the containers Screen containers

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

Software Practice 3 Before we start Today s lecture Today s Task Team organization

Software Practice 3 Before we start Today s lecture Today s Task Team organization 1 Software Practice 3 Before we start Today s lecture Today s Task Team organization Prof. Hwansoo Han T.A. Jeonghwan Park 43 2 Lecture Schedule Spring 2017 (Monday) This schedule can be changed M A R

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

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

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi ACTIVITY, FRAGMENT, NAVIGATION Roberto Beraldi View System A system for organizing GUI Screen = tree of views. View = rectangular shape on the screen that knows how to draw itself wrt to the containing

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

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

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

Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011

Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011 Android for Ubiquitous Computing Researchers Andrew Rice University of Cambridge 17-Sep-2011 Getting started Website for the tutorial: http://www.cl.cam.ac.uk/~acr31/ubicomp/ Contains links to downloads

More information

CS 528 Mobile and Ubiquitous Computing Lecture 2a: Introduction to Android Programming. Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 2a: Introduction to Android Programming. Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 2a: Introduction to Android Programming Emmanuel Agu Editting in Android Studio Recall: Editting Android Can edit apps in: Text View: edit XML directly Design

More information

Fragments and the Maps API

Fragments and the Maps API Fragments and the Maps API Alexander Nelson October 6, 2017 University of Arkansas - Department of Computer Science and Computer Engineering Fragments Fragments Fragment A behavior or a portion of a user

More information

Android UI DateBasics

Android UI DateBasics Android UI DateBasics Why split the UI and programing tasks for a Android AP The most convenient and maintainable way to design application user interfaces is by creating XML layout resources. This method

More information

MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs

MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs Overview MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs Lecture: MVC Model View Controller What is an App? Android Activity Lifecycle Android Debugging Fixing Rotations & Landscape Layouts Localization

More information

Application Fundamentals

Application Fundamentals Application Fundamentals CS 2046 Mobile Application Development Fall 2010 Announcements CMS is up If you did not get an email regarding this, see me after class or send me an email. Still working on room

More information

CS 3331 Advanced Object-Oriented Programming Exam 1

CS 3331 Advanced Object-Oriented Programming Exam 1 1 Fall 2015 (Thursday, October 22) Name: CS 3331 Advanced Object-Oriented Programming Exam 1 This test has 13 questions and pages numbered 1 through 9. Reminders This test is closed-notes and closed-book.

More information

Mobile Computing Fragments

Mobile Computing Fragments Fragments APM@FEUP 1 Fragments (1) Activities are used to define a full screen interface and its functionality That s right for small screen devices (smartphones) In bigger devices we can have more interface

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming. Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming. Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming Emmanuel Agu Android Apps: Big Picture UI Design using XML UI design code (XML) separate from the program (Java) Why?

More information

CS260 Intro to Java & Android 05.Android UI(Part I)

CS260 Intro to Java & Android 05.Android UI(Part I) CS260 Intro to Java & Android 05.Android UI(Part I) Winter 2015 Winter 2015 CS250 - Intro to Java & Android 1 User Interface UIs in Android are built using View and ViewGroup objects A View is the base

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

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 2

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 2 Workshop 1. Compare different layout by using Change Layout button (Page 1 5) Relative Layout Linear Layout (Horizontal) Linear Layout (Vertical) Frame Layout 2. Revision on basic programming skill - control

More information

MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING

MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING This document can be downloaded from www.chetanahegde.in with most recent updates. 1 MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING Syllabus: What is Android? Obtaining the required tools, Anatomy

More information

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Saving State THE PROBLEM How to save the state (of a UI, for instance) so that it survives even when the application is closed/killed The state should

More information

CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing. Lab & Demo 2 (Part 1-2) Hello-Goodbye App Tutorial

CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing. Lab & Demo 2 (Part 1-2) Hello-Goodbye App Tutorial CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing Reference Lab & Demo 2 (Part 1-2) Tutorial Android Programming Concepts, by Trish Cornez and Richard Cornez, pubslihed by Jones & Barlett

More information

Android Programs Day 5

Android Programs Day 5 Android Programs Day 5 //Android Program to demonstrate the working of Options Menu. 1. Create a New Project. 2. Write the necessary codes in the MainActivity.java to create OptionMenu. 3. Add the oncreateoptionsmenu()

More information

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator. Simple Android Application for Native Calculator Aim: To develop a Simple Android Application for Native Calculator. Procedure: Creating a New project: Open Android Stdio and then click on File -> New

More information

States of Activities. Active Pause Stop Inactive

States of Activities. Active Pause Stop Inactive noname Conceptual Parts States of Activities Active Pause Stop Inactive Active state The state that the activity is on the most foreground and having a focus. This is in Active state. Active state The

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

ES E 3 3 L a L b 5 Android development

ES E 3 3 L a L b 5 Android development ES3 Lab 5 Android development This Lab Create a simple Android interface Use XML interface layouts Access the filesystem Play media files Info about Android development can be found at http://developer.android.com/index.html

More information

Building MyFirstApp Android Application Step by Step. Sang Shin Learn with Passion!

Building MyFirstApp Android Application Step by Step. Sang Shin   Learn with Passion! Building MyFirstApp Android Application Step by Step. Sang Shin www.javapassion.com Learn with Passion! 1 Disclaimer Portions of this presentation are modifications based on work created and shared by

More information

Mobila applikationer och trådlösa nät, HI1033, HT2013

Mobila applikationer och trådlösa nät, HI1033, HT2013 Mobila applikationer och trådlösa nät, HI1033, HT2013 Today: - User Interface basics - View components - Event driven applications and callbacks - Menu and Context Menu - ListView and Adapters - Android

More information

Xin Pan. CSCI Fall

Xin Pan. CSCI Fall Xin Pan CSCI5448 2011 Fall Outline Introduction of Android System Four primary application components AndroidManifest.xml Introduction of Android Sensor Framework Package Interface Classes Examples of

More information