O X X X O O X O X. Tic-Tac-Toe. 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 2: The Ultimate Tic-Tac-Toe Game
|
|
- Bertina Diane Morrison
- 6 years ago
- Views:
Transcription
1 Tic-Tac-Toe 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 2: The Ultimate Tic-Tac-Toe Game Dr Dimitris C. Dracopoulos O X X X O O X O X The Ultimate Tic-Tac-Toe: Rules of the Game Dimitris C. Dracopoulos 1/25 A more sophisticated version of the classical tic-tac-toe game: Each square contains a smaller tic-tac-toe board. On each turn, a player marks one of the small squares. When you get three in a row on a small board, you have won that board. To win the game, you need to win three small boards in a row. You dont get to pick which of the nine boards to play on. Thats determined by your opponents previous move. Whichever square he picks, thats the board you must play in next. if the opponent sends you to a board that s already been won you get to go anywhere you like, on any of the other boards. what if a small board is a tie? It can count as either an X or an O. If one player ticks this box: Dimitris C. Dracopoulos 2/25 Dimitris C. Dracopoulos 3/25 Dimitris C. Dracopoulos 4/25
2 Then the next player must tick a box in this area: Dimitris C. Dracopoulos 5/25 Dimitris C. Dracopoulos 6/25 Designing a User Interface The activity main.xml File Using XML Using Code This can also be done by using various graphical editors BUT you should know how to do it in XML and code. < FrameLayout xmlns:android =" http: // schemas. android. com / apk / res / android " xmlns:tools =" http: // schemas. android. com / tools " android: layout_ height =" match_ parent " android: clipchildren =" false " tools: context =". TicTacToeActivity " > < fragment android:id ="@+id/ main_fragment " class =" org. example. tictactoe. MainFragment " android: layout_ width =" wrap_ content " android: layout_ gravity =" center " tools:layout / fragment_main "/> </ FrameLayout > Dimitris C. Dracopoulos 7/25 Dimitris C. Dracopoulos 8/25
3 Android Layouts Layout Parameters Some common layouts: LinearLayout: Arranges its children in a single column or row. FrameLayout: Used to block out an area on the screen to display a single item, but can be used to add multiple children views by controlling their position with a gravity value RelativeLayout: Arranges its children in relation to each other or to the parent. This is often used in forms GridLayout: Arranges its children in rows and columns, similar to an HTML table ConstraintLayout: Arranges its children in a flexible way by providing relative positioning, circular positioning (by angle and distance) and other different ways Some parameters are common to all layouts: xmlns:android=" res/android": Defines the XML namespace for Android. You should define this once, on the first XML tag in the file android:layout width="match parent", android:layout height="match parent": Takes up the entire width and height of the parent (in this case, the window) Possible values: match parent wrap content Dimitris C. Dracopoulos 9/25 Creating the Main Fragment fragment main.xml < LinearLayout xmlns:android =" http: // schemas. android. com / apk / res / android " xmlns:tools =" http: // schemas. android. com / tools " android: layout_ width =" wrap_ content " android: background drawable / menu_ background " android: elevation / elevation_ high " android: orientation =" vertical " android: padding / menu_ padding " tools: context =". TicTacToeActivity " > < TextView android: layout_ width =" wrap_ content " android: layout_ marginbottom / menu_ space " android:text / long_app_name " android: textappearance ="? android: textappearancelarge " android:textsize / menu_text_size "/> Dimitris C. Dracopoulos 11/25 Dimitris C. Dracopoulos 10/25 Creating the Main Fragment fragment main.xml < Button android:id ="@+id/ continue_button " android: layout_ margin / menu_ button_ margin " android: padding / menu_ button_ padding " android:text / continue_label "/> < Button android:id ="@+id/ new_button " android: layout_ gravity =" center " android: layout_ margin / menu_ button_ margin " android: padding / menu_ button_ padding " android:text / new_game_label "/> < Button android:id ="@+id/ about_button " android: layout_ gravity =" center " android: layout_ margin / menu_ button_ margin " android: padding / menu_ button_ padding " android:text / about_label "/> </ LinearLayout > Dimitris C. Dracopoulos 12/25
4 Units and Creating Resource IDs The creates a new resource ID which other code can use it. button defines the ID for the About button, which can be used to make something happen when the user presses that button. The following can be used as units for defining spacing: px (pixels): Dots on the screen. in (inches): Size as measured by a ruler. mm (millimeters): Size as measured by a ruler. pt (points): 1/72 of an inch. dp (density-independent pixels): An abstract unit based on the density of the screen. On a display with 160 dots per inch, 1dp = 1px. dip: Synonym for dp, used more often in Google examples. sp (scale-independent pixels): Similar to dp but also scaled by the users font size preference. Use sp unit for text sizes; dip unit for everything else. Dimitris C. Dracopoulos 13/25 The Java Code for the Opening Page of the Game The main activity: package org. example. tictactoe ; import android. app. Activity ; import android.os. Bundle ; public class MainActivity extends Activity { protected void oncreate ( Bundle savedinstancestate ) { super. oncreate ( savedinstancestate ); setcontentview ( R. layout. activity_ main ); Views Besides the TextView some other common views (all of them derived by class View or its subclasses are): Button Checkbox EditText ImageButton ListView RadioButton VideoView WebView Defining the Fragment in the main Activity MainFragment.java: package org. example. tictactoe ; import android. app. AlertDialog ; import android. app. Fragment ; import android. content. DialogInterface ; import android.os. Bundle ; import android. view. LayoutInflater ; import android. view. View ; import android. view. ViewGroup ; public class MainFragment extends Fragment { private AlertDialog mdialog ; Dimitris C. Dracopoulos 14/25 public View oncreateview ( LayoutInflater inflater, ViewGroup container, Bundle savedinstancestate ) { View rootview = inflater. inflate ( R. layout. fragment_main, container, false ); // Handle buttons here... return rootview ; Dimitris C. Dracopoulos 15/25 Dimitris C. Dracopoulos 16/25
5 The About Button The Code for the About button Fill the rest of the MainFragment.java in the appropriate place: // Handle buttons here... View aboutbutton = rootview. findviewbyid ( R. id. about_ button ); aboutbutton. setonclicklistener ( new View. OnClickListener () { public void onclick ( View view ) { AlertDialog. Builder builder = new AlertDialog. Builder ( getactivity ()); builder. settitle (R. string. about_title ); builder. setmessage (R. string. about_text ); builder. setcancelable ( false ); builder. setpositivebutton ( R. string. ok_label, new DialogInterface. OnClickListener () { public void onclick ( DialogInterface dialoginterface, int i) { // nothing ); ); mdialog = builder. show (); Dimitris C. Dracopoulos 17/25 Dimitris C. Dracopoulos 18/25 The MainFragment.java (cont ed) When the activity containing the fragment is paused (e.g. when another app is started, the About dialog should be dismissed: public void onpause () { super. onpause (); // Get rid of the about dialog if it s still up if ( mdialog!= null ) mdialog. dismiss (); Defining Resources The strings.xml file: < string name =" app_name ">UT3 </ string > < string name =" long_app_name ">Ultimate Tic Tac Toe </ string > < string name =" action_settings ">Settings </ string > < string name =" continue_label ">Continue </ string > < string name =" new_game_label ">New Game </ string > < string name =" about_label ">About </ string > < string name =" ok_label ">OK </ string > < string name =" about_ title " > About Ultimate Tic Tac Toe </ string > < string name =" about_text ">\ This game is played just like regular Tic Tac Toe with one difference: to win a tile you have to win a smaller game of Tic Tac Toe inside that tile.\ n\ n A tie happens when there are no further moves. In the case of a tie in a small board, that will count as a win for both sides in the larger game. </ string > Dimitris C. Dracopoulos 19/25 Dimitris C. Dracopoulos 20/25
6 The dimens.xml File The Drawables Resources <dimen name =" elevation_high ">8dp </ dimen > <dimen name =" stroke_width ">1dp </ dimen > <dimen name =" corner_radius ">4dp </ dimen > <dimen name =" menu_padding ">10 dp </ dimen > <dimen name =" menu_space ">10 dp </ dimen > <dimen name =" menu_text_size ">32 sp </ dimen > <dimen name =" menu_button_margin ">4dp </ dimen > <dimen name =" menu_button_padding ">10 dp </ dimen > Drawables are any kind of graphical objects that can be drawn on the screen.the simplest drawables are bitmaps, which are typically stored in PNG or JPG format. Example: menu background.xml, the background of the launcher screen. <shape xmlns : android =" http :// schemas. android. com / apk / res / android " android : shape =" rectangle "> < stroke android : width / stroke_width " android : color / border_color "/> <solid android : color / field_color "/> < corners android : radius / corner_radius "/> </ shape > The Colors Resources Dimitris C. Dracopoulos 21/25 The Styles and Themes Dimitris C. Dracopoulos 22/25 <color name =" field_color " ># b5cee0 </ color > <color name =" border_color " >#7 f7f7f </ color > Define the looks of an app. A theme is a collection of styles. A style is a set of values that control appearances and behaviors. looking inside AndroidManifest.xml: android : theme / AppTheme " This is defined inside styles.xml: <!-- Base application theme. --> < style name =" AppTheme " parent =" android : Theme. Holo. Light. NoActionBar. Fullscreen "> <!-- Customize your theme here. --> </ style > Dimitris C. Dracopoulos 23/25 Dimitris C. Dracopoulos 24/25
7 Debugging with Log Messages Print messages of various severity levels to the Android system log: Log.e(): Errors Log.w(): Warnings Log.i(): Information Log.d(): Debugging Log.v(): Verbose Log.wtf(): What a Terrible Failure.Report an exception that should never happen. Look at the Logcat to select variouls levels of log severity level. Alternatively, Use the Debugger Dimitris C. Dracopoulos 25/25
The drawable/tile empty.xml file
The X and O Symbols 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 3: Ultimate Tic-Tac-Toe Game: The Interface Dr Dimitris C. Dracopoulos Create them with the filenames x blue.png and o red.png in an
More informationInitialising the Views (GameFragment) 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 5: Ultimate Tic-Tac-Toe Game: The Interface (Part III)
5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 5: Ultimate Tic-Tac-Toe Game: The Interface (Part III) Dr Dimitris C. Dracopoulos Making a Move (GameFragment) Dimitris C. Dracopoulos 1/22 Initialising
More informationThis lecture. The BrowserIntent Example (cont d)
This lecture 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 10: Working with the Web Browser Dr Dimitris C. Dracopoulos Android provides a full-featured web browser based on the Chromium open source
More informationThe 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 informationMobile 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 informationAndroid User Interface
Android Smartphone Programming Matthias Keil Institute for Computer Science Faculty of Engineering 20. Oktober 2014 Outline 1 Android User Interface 2 Multi-Language Support 3 Summary Matthias Keil Android
More informationAndroid User Interface Android Smartphone Programming. Outline University of Freiburg
Android Smartphone Programming Matthias Keil Institute for Computer Science Faculty of Engineering 20. Oktober 2014 Outline 1 2 Multi-Language Support 3 Summary Matthias Keil 20. Oktober 2014 2 / 19 From
More informationSQLite. 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 6: Working with Databases. What is a Database Server. Advantages of SQLite
SQLite 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 6: Working with Databases Dr Dimitris C. Dracopoulos SQLite is a tiny yet powerful database engine. Besides Android, it can be found in: Apple iphone
More informationHello 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 informationCS 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 informationProduced 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 informationLab 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 informationListView 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 informationFragments 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 informationCS 528 Mobile and Ubiquitous Computing Lecture 2a: Android UI Design in XML + Examples. Emmanuel Agu
CS 528 Mobile and Ubiquitous Computing Lecture 2a: Android UI Design in XML + Examples Emmanuel Agu Android UI Design in XML Recall: Files Hello World Android Project XML file used to design Android UI
More informationAndroid 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 informationFig. 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 informationUser 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 informationCreating a User Interface
Creating a User Interface Developing for Android devices is a complicated process that requires precision to work with. Android runs on numerous devices from smart-phones to tablets. Instead of using a
More informationUsing Eclipse for Android Development
3 Using Eclipse for Android Development This chapter is an introduction to building a complete Android app. The chapter includes creating a new app project, exploring the components of an Android app,
More information07. Menu and Dialog Box. DKU-MUST Mobile ICT Education Center
07. Menu and Dialog Box DKU-MUST Mobile ICT Education Center Goal Learn how to create and use the Menu. Learn how to use Toast. Learn how to use the dialog box. Page 2 1. Menu Menu Overview Menu provides
More informationLab 3. Accessing GSM Functions on an Android Smartphone
Lab 3 Accessing GSM Functions on an Android Smartphone 1 Lab Overview 1.1 Goals The objective of this practical exercise is to create an application for a smartphone with the Android mobile operating system,
More informationCS 528 Mobile and Ubiquitous Computing Lecture 2: Intro to Android Programming Emmanuel Agu
CS 528 Mobile and Ubiquitous Computing Lecture 2: Intro to Android Programming Emmanuel Agu Android UI Tour Home Screen First screen after unlocking phone or hitting home button Includes favorites tray
More informationANDROID 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 informationFragments. 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 informationCS 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 informationCS 528 Mobile and Ubiquitous Computing Lecture 2: Intro to Android Programming Emmanuel Agu
CS 528 Mobile and Ubiquitous Computing Lecture 2: Intro to Android Programming Emmanuel Agu Students: Please Introduce Yourselves! Name Status: grad/undergrad, year Relevant background: e.g. coal miner
More informationPraktikum 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 informationMobile Programming Lecture 2. Layouts, Widgets, Toasts, and Event Handling
Mobile Programming Lecture 2 Layouts, Widgets, Toasts, and Event Handling Lecture 1 Review How to edit XML files in Android Studio? What holds all elements (Views) that appear to the user in an Activity?
More informationCS 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 informationCS371m - Mobile Computing. User Interface Basics
CS371m - Mobile Computing User Interface Basics Clicker Question Have you ever implemented a Graphical User Interface (GUI) as part of a program? A. Yes, in another class. B. Yes, at a job or internship.
More informationBuilding 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 informationCS 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 informationCS378 -Mobile Computing. User Interface Basics
CS378 -Mobile Computing User Interface Basics User Interface Elements View Control ViewGroup Layout Widget (Compound Control) Many pre built Views Button, CheckBox, RadioButton TextView, EditText, ListView
More informationEventually, 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 information04. Learn the basic widget. DKU-MUST Mobile ICT Education Center
04. Learn the basic widget DKU-MUST Mobile ICT Education Center Goal Understanding of the View and Inheritance of View. Learn how to use the default widget. Learn basic programming of the Android App.
More informationANDROID APPS DEVELOPMENT FOR MOBILE GAME
ANDROID APPS DEVELOPMENT FOR MOBILE GAME Application Components Hold the content of a message (E.g. convey a request for an activity to present an image) Lecture 2: Android Layout and Permission Present
More informationUser 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 informationGUI 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 informationLet 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 informationAndroid 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 informationAndroid 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 informationChapter 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 informationFragments. 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 informationRequired 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 informationCS260 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 informationBCA 6. Question Bank
BCA 6 030010601 : Introduction to Mobile Application Development Question Bank Unit 1: Introduction to Android and Development tools Short questions 1. What kind of tool is used to simulate Android application?
More informationUnderstand 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 informationMobile 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 informationCS 4330/5390: Mobile Application Development Exam 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.
More informationAdaptation of materials: dr Tomasz Xięski. Based on presentations made available by Victor Matos, Cleveland State University.
Creating dialogs Adaptation of materials: dr Tomasz Xięski. Based on presentations made available by Victor Matos, Cleveland State University. Portions of this page are reproduced from work created and
More informationMVC 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 informationCS 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 informationFigure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard.
44 CHAPTER 2 Android s development environment Figure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard. TIP You ll want the package name of your applications to be unique
More information(c) Dr Sonia Sail LAJMI College of Computer Sciences & IT (girl Section) 1
Level 5: Baccalaureus in Computer Sciences CHAPTER 4: LAYOUTS AND VIEWS Dr. Sonia Saïd LAJMI PhD in Computer Sciences 1 Layout.xml 2 Computer Sciences & IT (girl Section) 1 Layout Requirements android:layout_width:
More informationA view is a widget that has an appearance on screen. A view derives from the base class android.view.view.
LAYOUTS Views and ViewGroups An activity contains Views and ViewGroups. A view is a widget that has an appearance on screen. A view derives from the base class android.view.view. One or more views can
More informationGUI 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 informationANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)
ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) Application Components Hold the content of a message (E.g. convey a request for an activity to present an image) Lecture 2: Android Programming
More informationAndroid UI Development
Android UI Development Android UI Studio Widget Layout Android UI 1 Building Applications A typical application will include: Activities - MainActivity as your entry point - Possibly other activities (corresponding
More informationCS260 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 informationAndroid 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 informationES 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 informationUpon 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 informationMultiple 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 informationCS 4518 Mobile and Ubiquitous Computing Lecture 3: Android UI Design in XML + Examples. Emmanuel Agu
CS 4518 Mobile and Ubiquitous Computing Lecture 3: Android UI Design in XML + Examples Emmanuel Agu Resources Android Resources Resources? Images, strings, dimensions, layout files, menus, etc that your
More informationDependence Graph Considerering Resource for Automatic Sample Program Generation
1 2 2 2 ( ) Google Android Dependence Graph Considerering Resource for Automatic Sample Program Generation Yoshimasa Fujiura, 1 Hirotaka Ohkubo, 1 Hideto Kasuya 1 and Shinichiro Yamamoto 1 This paper propose
More informationAnnouncements. 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 informationIntroductory Android Development
Introductory Android Development 152-163 Notes Quick Links & Text References Introduction Pages Layout Concepts Pages Layout Types Pages 35 37 XML Overview Pages Common Attributes Layout Height & Width
More informationResources and Media and Dealies
Resources and Media and Dealies In the second week, we created a new project that came with several files. The layout was kept in a res/layout folder. last week, we looked at a landscape layout, in the
More informationINTRODUCTION 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 informationAndroid 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 informationCS371m - 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 informationAndroid Development Crash Course
Android Development Crash Course Campus Sundsvall, 2015 Stefan Forsström Department of Information and Communication Systems Mid Sweden University, Sundsvall, Sweden OVERVIEW The Android Platform Start
More informationDiving 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 informationANDROID APP DEVELOPMENT
0 Version 1.2 ANDROID APP DEVELOPMENT By AbhiAndroid 0 AbhiAndroid.com 1 Awesome Thank you for downloading this guide Hi, My name is Abhishek. I m 26 year old guy from India. I m on mission and my mission
More informationAndroid 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 informationBeginning Android 4 Application Development
Beginning Android 4 Application Development Lee, Wei-Meng ISBN-13: 9781118199541 Table of Contents INTRODUCTION xxi CHAPTER 1: GETTING STARTED WITH ANDROID PROGRAMMING 1 What Is Android? 2 Android Versions
More informationLab 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 informationFragments 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 informationComparative Study on Layout and Drawable Resource Behavior in Android for Supporting Multi Screen
International Journal of Innovative Research in Computer Science & Technology (IJIRCST) ISSN: 2347-5552, Volume 2, Issue 3, May - 2014 Comparative Study on Layout and Drawable Resource Behavior in Android
More informationgetcount 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 informationMobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Activity Logging Lecture 16
Mobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Activity Logging Lecture 16 Hello, last two classes we learned about activity life cycles and the call back
More informationCS260 Intro to Java & Android 09.AndroidAdvUI (Part I)
CS260 Intro to Java & Android 09.AndroidAdvUI (Part I) Winter 2015 Winter 2015 CS260 - Intro to Java & Android 1 Creating TicTacToe for Android We are going to begin to use everything we ve learned thus
More informationAndroid 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 informationConstraintLayouts in Android
B ConstraintLayouts in Android Constrained Layouts are a new addition to Android. These layouts are similar to Relative Layouts, in that all widgets are positioned with respect to other UI elements. However,
More informationStanislav Rost CSAIL, MIT
Session 2: Lifecycles, GUI Stanislav Rost CSAIL, MIT The Plan 1 Activity lifecycle Service lifecycle 2 Selected GUI elements UI Layouts 3 Hands on assignment: RoboChat Application GUI Design Birth, death,
More informationXML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project.
XML Tutorial XML stands for extensible Markup Language. XML is a markup language much like HTML used to describe data. XML tags are not predefined in XML. We should define our own Tags. Xml is well readable
More informationCS371m - 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 informationMOBILE CLIENT FOR ONLINE DICTIONARY. Constantin Lucian ALDEA 1. Abstract
Bulletin of the Transilvania University of Braşov Vol 4(53), No. 2-2011 Series III: Mathematics, Informatics, Physics, 123-128 MOBILE CLIENT FOR ONLINE DICTIONARY Constantin Lucian ALDEA 1 Abstract The
More informationAND-401 Android Certification. The exam is excluded, but we cover and support you in full if you want to sit for the international exam.
Android Programming This Android Training Course will help you build your first working application quick-quick. You ll learn hands-on how to structure your app, design interfaces, create a database, make
More informationMobile 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 informationCMSC 436 Lab 10. App Widgets and Supporting Different Devices
CMSC 436 Lab 10 App Widgets and Supporting Different Devices Overview For this lab you will create an App Widget that uses a Configuration Activity You will also localize the widget to support different
More informationDeveloping 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 informationAndroid 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 informationCE881: 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 information14.1 Overview of Android
14.1 Overview of Android - Blackberry smart phone appeared in 2003 First widely used mobile access to the Web - Smart phone market now dominated by Android, iphone, and Windows Phone - Tablets are now
More informationUseful tools for an effcient development of an Android App - The Android SDK
RWTH Aachen University Chair of Data Management and Data Exploration Prof. Dr. T. Seidl Proseminar Useful tools for an effcient development of an Android App - The Android SDK Marco Moscher June 2012 Supervision:
More informationMobile 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 informationUniversity 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 informationDeveloping Android Applications Introduction to Software Engineering Fall Updated 1st November 2015
Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 1st November 2015 Android Lab 3 & Midterm Additional Concepts No Class Assignment 2 Class Plan Android : Additional
More information