ANDROID DIALOGS. Slide 2 Dialogs (Introduction) The Dialog class is the base class for all dialogs A dialog is a small window that prompts the user to.

Slides:



Advertisements
Similar presentations
1 After completing this lesson, you will be able to: Create a new presentation using a design template. Enter text in the Slide pane. Create a new slide.
Advertisements

CE881: Mobile and Social Application Programming Simon M. Lucas Menus and Dialogs.
Chapter 1: An Introduction to Visual Basic 2012
Introduction Headers & Footers. You will learn how to: Create, Format, Edit and Delete Create Different Header/Footer in a Document Create a First Page.
 User Interface - Raeha Sandalwala.  Introduction to UI  Layouts  UI Controls  Menus and ‘Toasts’  Notifications  Other interesting UIs ◦ ListView.
User Interface Classes.  Design Principles  Views & Layouts  Event Handling  Menus  Dialogs.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Android Fragments.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Wimba Pronto Office Hours of the ND University System April 2009.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Customizing Outlook. Forms Window in which you enter and view information in Outlook Outlook Form Designer The environment in which you create and customize.
Review CSC 171 FALL 2004 LECTURE 21. Topics Objects and Classes Fundamental Types Graphics and Applets Decisions Iteration Designing Classes Testing and.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
By: Jeremy Smith.  Introduction  Droid Draw  Add XML file  Layouts  LinearLayout  RelativeLayout  Objects  Notifications  Toast  Status Bar.
Enabling Screen Sharing in the WizIQ Virtual Classroom accessed through Browser.
WORKING WITH MACROS CHAPTER 10 WORKING WITH MACROS.
PROG Mobile Java Application Development PROG Mobile Java Application Development Event Handling Creating Menus.
REQUIREMENTS CAPTURE 1 ASU Course Registration System User Interface Specifification UI Elements Register for courses Use Case.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
CS0004: Introduction to Programming Input and Output.
JLabel, JTextField, JButton and JOptionPane
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Chapter 1: An Introduction to Visual Basic 2005 Programming with Microsoft Visual Basic 2005, Third Edition.
Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin TECHNOLOGY PLUG-IN T8 DECISION MAKING USING ACCESS.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
1 Event Driven Programs Rick Mercer. 2 So what happens next?  You can layout a real pretty GUI  You can click on buttons, enter text into a text field,
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Automating Database Processing
Cosc 5/4730 Dialogs and below 3.0 and above (fragment)
5-1 More UI CSNB544 Mobile Application Development Thanks to Utexas Austin.
User notification Android Club Agenda Toast Custom Toast Notification Dialog.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
1 Chapter Nine Using GUI Objects and the Visual Studio IDE.
432 Invitation System (Instructions …..) Event name: Date: Time: Location: Description: Attend Not Attend Submit Cancel.
Using Masters PowerPoint 97- Intermediate. What Are Slide Masters? Four PowerPoint masters: –Slide Master –Title Master –Handout Master –Notes Master.
Chapter 2 – Introduction to the Visual Studio .NET IDE
 The ribbon is the primary form of navigation in the Microsoft Office 2007 system.  There are seven Tabs on the Ribbon, more (contextual) tabs will.
Dialog boxes in JavaScript Events in JavaScript – What are they – “Which events are there?” – “How do I register event handlers to an HTML element?” –
Validating Data Entry The major issue in creating and using data bases, including Excel lists, is to assure that the information stored in the data base.
Introduction to GUI in 1 Graphical User Interface 2 Nouf Almunyif.
1 High Level Design Phase Refining Use Cases User Interface Information.
Teach Yourself Windows 98 Module 5: Working with and Using Newsgroups.
Styles, Dialog Boxes, and Menus. Styles Allow creation of a common format – placed in res/values/styles.xml – file name is incidental Can be applied.
Video Games list lab 6  At the end of this lab you will be expected to know:  What Views, View Groups, Layouts, and Widgets are and how they relate to.
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
Chapter 11 - A GUI Interacting With a Problem Domain Class1 Chapter 11 A GUI Interacting With a Problem Domain Class 11.
Creating User Interfaces Chapter 13 CSCI CSCI 1302 – Creating User Interfaces2 Outline Introduction Common Features of Swing GUI Components Buttons.
Creating and Using Dialogs ● A dialog is a box that pops up and prompts the user for a value or informs them of something ● One way: directly create objects.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
1 Selected Topics in Management Information Systems [MOIS470] Fall 2004 Nahed Amin MS Access (Control Extensions)
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
Java Programming Fifth Edition Chapter 13 Introduction to Swing Components.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
Java for android Development Nasrullah Khan. Using instanceof in Android Development the classes such as Button, TextView, and CheckBox, which represent.
The Flag Quiz app tests your ability to correctly identify 10 flags from various countries and territories.
1 Event Driven Programming with Graphical User Interfaces (GUIs) A Crash Course © Rick Mercer.
Android Programming - Features
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Mobile Computing With Android ACST 4550 Alerts
Predefined Dialog Boxes
Custom dialog boxes Unit objectives
1 To go to the next slide, click this button instead. A random slide will come up.
Android Developer Fundamentals V2 Lesson 4
To modify a requisition, enter the requisition number and click OK or press enter. You can enter sign to return to the last requisition you were.
Presentation transcript:

ANDROID DIALOGS

Slide 2 Dialogs (Introduction) The Dialog class is the base class for all dialogs A dialog is a small window that prompts the user to make a decision or enter additional information Avoid instantiating the Dialog class directly. Instead uses one of the subclasses Note that dialogs were added with API level 11

Slide 3 Dialogs (Types) Use the AlertDialog to display a dialog with up to 3 buttons, selectable items, or custom layout Use the DatePickerDialog or TimePickerDialog to select a date or time Use the DialogFragment as a container for the dialog You can create custom dialogs too

Slide 4 AlertDialog (Introduction) It can display one, two, or three buttons It can display a title And we can get data from the alert

Slide 5 A First AlertDialog (Example) The following steps are involved in building the dialog Create the AlertDialog Set the Title and Message Create the buttons Show the AlertDialog Optionally get data back from the dialog

Slide 6 Creating the AlertDialog (Step 1) The AlertDialog has a static inner class that creates the dialog box The constructor for this inner class accepts one argument The name of the parent activity

Slide 7 Creating the AlertDialog (Step 2) Call setTitle to give the dialog a title Call setMessage to the descriptive prompt Call setCancelable to indicate whether the dialog can be cancelled by pressing the BACK key

Slide 8 Creating the AlertDialog (Step 3) There are a few ways to create the buttons To create Yes / No buttons, call setPositiveButton and setNegative button. setNeutalButton is the center button The first argument contains the button text The second contains the event listener

Slide 9 Creating the AlertDialog (Step 3-1) Create the positive button Note that the type of the listener is DialogInterface

Slide 10 Creating the AlertDialog (Step 3-2) Create the Positive button and the response to the button’s click event.

Slide 11 A Few Words about Dates The Android Date class represents a moment in time with millisecond precision Measured in UTC Constructors create dates using a current date or time Methods manipulate those dates

Slide 12 The Date Constructor

Slide 13 Date Operations (Methods) See util/Date.html util/Date.html

Slide 14 Selecting Dates (Introduction) Date pickers can be implemented in one of two ways Use the DatePicker to render the widget Use the DatePickerDialog which encapsulates the widget This is another of those “helper classes”

Slide 15 DatePickerDialog (Introduction) The constructor creates the dialog box The show method displays it We typically handle the DatePickerDialog.OnDateSetListener event

Slide 16 DatePickerDialog (Constructor) The constructor accepts the following arguments: Example

Slide 17 DatePickerDialog (Creating the Listener) PickDate implements the onDateSet listener, which fires when the user selects a date

Slide 18 TimePickerDialog (Introduction) It operates similar to the DatePickerDialog The constructorHandler the OnTimeChangedListener /app/TimePickerDialog.html /app/TimePickerDialog.html