COMP 365 Android Development.  Developing for Android  XML for user interface formatting and other scripting  Java for programming.

Slides:



Advertisements
Similar presentations
Android Application Development Tutorial. Topics Lecture 6 Overview Programming Tutorial 3: Sending/Receiving SMS Messages.
Advertisements

CE881: Mobile and Social Application Programming Simon M. Lucas Menus and Dialogs.
Android User Interface
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
Programming with Android: Widgets and Events Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
INTRO TO MOBILE APP DEVELOPMENT CMSC 150: Lecture 34.
The Web Warrior Guide to Web Design Technologies
User Interface Classes.  Design Principles  Views & Layouts  Event Handling  Menus  Dialogs.
Basic, Basic, Basic Android. What are Packages? Page 346 in text Package statement goes before any import statements Indicates that the class declared.
By: Jeremy Smith.  Introduction  Droid Draw  Add XML file  Layouts  LinearLayout  RelativeLayout  Objects  Notifications  Toast  Status Bar.
Android Development (Basics)
Android: Layouts David Meredith
Lesson 8 Creating Forms with JavaScript
Creating Android user interfaces using layouts 1Android user interfaces using layouts.
Better reference the original webpage :
Android development the first app. Andoid vs iOS which is better? Short answer: neither Proponents on both sides For an iOS side, see this article on.
Web Programming – Java Script Association of Computing Activities Computer Science and Engineering Indian Institute of Technology Kanpur.
CS5103 Software Engineering Lecture 08 Android Development II.
PROG Mobile Java Application Development PROG Mobile Java Application Development Developing Android Apps: Components & Layout.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Mobile Programming Lecture 2 Layouts, Widgets, Toasts, and Event Handling.
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
Execution Environment for JavaScript " Java Script Window object represents the window in which the browser displays documents. " The Window object provides.
ANDROID – INTERFACE AND LAYOUT L. Grewe. Interfaces: Two Alternatives Code or XML  You have two ways you can create the interface(s) of your Application.
Understanding Hello Android 1 CS300. Activity  Similar to a form  Base class for the visual, interactive components of your application  Android API.
1 Announcements Homework #2 due Feb 7 at 1:30pm Submit the entire Eclipse project in Blackboard Please fill out the when2meets when your Project Manager.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 3.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
1 Forms and Form elements CSD 340 McCoey. 2 Form Object Properties action Usually a call to a server elements encoding method post or get target Methods.
Programming with Android: Layouts, Widgets and Events Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
Presented By: Muhammad Tariq Software Engineer Android Training course.
Networking: Part 1 (Web Content). Networking with Android Android provides A full-featured web browser based on Chromium, the open source browser engine.
JavaScript - A Web Script Language Fred Durao
Android Hello World 1. Click on Start and type eclipse into the textbox 2.
Field Trip #32 Digital Alarm Clock By Keith Lynn.
Lecture 10 JavaScript: DOM and Dynamic HTML Boriana Koleva Room: C54
Input & Output Functions JavaScript is special from other languages because it can accept input and produce output on the basis of that input in the same.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
Chapter 14 © 2014 by Pearson Education Overview of Android - Blackberry smart phone appeared in 2003 – First widely used mobile access to the Web.
Mobile Programming Lecture 3 Debugging. Lecture 2 Review What widget would you use to allow the user to enter o a yes/no value o a range of values from.
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.
Introduction To JavaScript. Putting it Together (page 11) All javascript must go in-between the script tags. All javascript must go in-between the script.
MOBILE COMPUTING D10K-7D02 MC05: Android UI Design Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
Making dynamic pages with javascript Lecture 1. Java script java versus javascript Javascript is a scripting language that will allow you to add real.
Event Handling. Objectives Using event handlers Simulating events Using event-related methods.
Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing a Line of Text in a Web Page 7.3 Another JavaScript.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Android Drawing Units and The.
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.
BUILDING A SIMPLE USER INTERFACE. In this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
WEB SYSTEMS & TECHNOLOGY. Java Script  JavaScript created by Netscape  It is also client side programming  It can be use for client side checks.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
Section 10.1 Define scripting
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Android Programming Lecture 3.
Android Moving to a second Activity
Creation of an Android App By Keith Lynn
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Mobile Computing With Android ACST 4550 Alerts
CS323 Android Model-View-Controller Architecture
Predefined Dialog Boxes
WEB PROGRAMMING JavaScript.
BMI Android Application will take weight and height from the users to calculate Body Mass Index (BMI) with the information, whether user is underweight,
Building a Simple User Interface
Presentation transcript:

COMP 365 Android Development

 Developing for Android  XML for user interface formatting and other scripting  Java for programming

 XML is a markup language  Uses tags to contain data like so data  Can close tags without using data like so  Can contain attributes  Can nest tags within each other

 main_activity.xml under res-> layout in Eclipse to change the XML  Change the layout by changing the first tag  LinearLayout  RelativeLayout  WebView  Attributes for layout  android:layout_width  android:orientation

 EditText  Add within the layout tag  Attributes  android:layout_width & android:layout_height  android:id  Adding a string to display in the textbox  Res → values → string in Ecplise  text

 Under res → layout  Button  Attributes  android:text  Link to the string resource  android:text =

 Adding an onClick event to the button  Attribute – android:onClick=”functionName”  FunctionName has a View object as a parameter, and returns void

When the onClick event activates, bring up an Alert Dialog //Create a new Dialog AlertDialog.Builder alert = new AlertDialog.Builder( this ); //Get a reference to the EditText field EditText userInput = (EditText)findViewById(R.id.edit_message); //Get the text from the EditText field String message = userInput.getText().toString(); //Name of the Dialog alert.setTitle(“User input is:”); //Name of the message alert.setMessage( message ); //Give the Dialog an “Ok” button, not necessary though alert.setPositiveButton(“Ok”, null); //show the dialog alert.show();