UI Resources Layout Resources String Resources Image Resources.

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

Rajab Davudov. What is a Layout ? A type of resource that defines what is drawn on the screen. A type of View class whose primary purpose is to organize.
Android UserInterfaces Nasrullah Niazi. overView All user interface elements in an Android app are built using View and ViewGroup objects. A View is an.
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
 User Interface - Raeha Sandalwala.  Introduction to UI  Layouts  UI Controls  Menus and ‘Toasts’  Notifications  Other interesting UIs ◦ ListView.
Hello world Follow steps under the sections “Create an AVD” and “Create a New Android Project” at
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
Android: Layouts David Meredith
® IBM Software Group © 2006 IBM Corporation Creating JSF/EGL Template Pages This section describes how to create.JTPL (Java Template Pages) using the Page.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Modify Android Objects Using.
Chapter 3 Navigating a Project Goals & Objectives 1.Get familiar with the navigation of the project. How is everything structured? What settings can you.
Android: versions Note that: Honeycomb (Android v3.0) A tablet-only release Jelly Bean (Android v4.1) Released on July 09, 2012.
CS5103 Software Engineering Lecture 08 Android Development II.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
PROG Mobile Java Application Development PROG Mobile Java Application Development Developing Android Apps: Components & Layout.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Chapter 10: Move! Creating Animation
Hello world Follow steps under the sections “Create an AVD” and “Create a New Android Project” at
Chapter 2: Simplify! The Android User Interface
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
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.
Basic Android Tutorial USF’s Association for Computing Machinery.
Resources and RelativeLayouts. Resources Android Resources We’ve already talked about the different types of Android Resources DirectoryResource Type.
Frank Xu Gannon University.  Linear Layout  Relative Layout  Table Layout.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Using Android XML Resources.
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Android Boot Camp for Developers Using Java, 3E
User Interfaces: Part 1 (View Groups and Layouts).
Application Development for mobile Devices
Configuring Android Development Environment Nilesh Singh.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
Graphical Enablement In this presentation… –What is graphical enablement? –Introduction to newlook dialogs and tools used to graphical enable System i.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
CS378 - Mobile Computing User Interface Basics. User Interface Elements View – Control – ViewGroup Layout Widget (Compound Control) Many pre built Views.
Building User Interfaces Basic Applications
Intoduction to Andriod studio Environment With a hello world program.
HelloWorld Create a window store App Part 3: Navigation, layout, and views Follow the tutorial :
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.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 10: Move! Creating Animation 1 Android.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Resources. Android Resources We’ve already talked about the different types of Android Resources DirectoryResource Type anim/XML files that define tween.
Chapter 2: Simplify! The Android User Interface
Open Handset Alliance.
Chapter 4: Explore! Decision-Making Controls
Mobile Software Development for Android - I397
Mobile Application Development BSCS-7 Lecture # 8
Creation of an Android App By Keith Lynn
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Visual programming Chapter 1: Introduction
HNDIT2417 Mobile Application Development
CIS 470 Mobile App Development
CS5103 Software Engineering
Mobile Computing With Android ACST 4550 Android Layouts
Tutorial 6 Creating Dynamic Pages
Building User Interfaces Basic Applications
Android Developer Fundamentals V2 Lesson 1
CIS 470 Mobile App Development
Korea Software HRD Center
Android Sensor Programming
Presentation transcript:

UI Resources Layout Resources String Resources Image Resources

UI Resources A non programming components of UI. Help developer in laying out the visual structure of screen. Along with string constant & images that populate the screens. Other UI resource is MENU :- A different way of user interaction & navigation in app

Layout Resources Provides a visual blueprint of an activity. Defines how the UI elements in a screen is arranged. They are XML files located in the res\layout folder. A layout file may be associated with one or more Activities. YOU may recall the setContentView(R.layout.activity_main) method that associates an Activity with a layout file(activity_main.xml).

Upon creating a layout resources,Android frame work generates an unique id for it in the R.java file present in the gen folder. The R.java file contain information about all nonprogramming components. Using this a developer can resolve these resources inside programming component.

Example.. Layout file name-activity_main.xml It is represented as an integer constant -public static final int activity_main -in the R.java file under a static class- layout This is applicable to all nonprogramming components. Public final class R{ public static final class layout { public static final int activity_main=0x7f030000; }

Layout file-activity_main.xml

Android provide layout editor to create the layouts. how to create a new layout file? Layout editor:- provide a mechanism to drag & drop the UI components in the layout file to create the require UI. The equivalent XML layout file gets generated automatically behind the scenes. Apps have different requirement for arranging the UI elements(views);layout editor provides various ready to use layouts Relative Linear Grid table

Relative layout is the default layout of an activity. Here views(UI elements)are arranged relative to to other views in that layout or the layout itself. Thus rendering of views happens automatically without bothering diverse screen resolution, sizes or orientation.

To create a relative layout select it as the root elementfor the new android XML file. Here there are two types of attributes that can be assign to the views. 1)Views relative to one another. 2)Views relative to layout itself.

Do this.. EditText1 contains properties such as layout_alignParentLeft,layout_alignParentRight & layout_alignParentTop set to true EditText1 is aligned to the left,right and top of the parent(Relativelayout). Botton1 is aligned to right of its parent(Relativelayout)using the layout_alignparentRight attribute & below EditText1 using the layout_below attribute

Button2 is placed to the left of Button1 using layout_toLeftOf attribute.

Linear layout ensure that UI element are placed either horizontally or vertically. Defined by linear layout tag in the layout file.

The most important attribute of the linear layout is android:orientation. The layout can also be nested. Another important attribute of the LinearLayout is android:gravity.