Mobile Applications (Android Programming)

Slides:



Advertisements
Similar presentations
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
Advertisements

INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Android Programming. Outline Preparation Create new project Build and Run a project Debug a project Deploy on devices.
Creating Android user interfaces using layouts 1Android user interfaces using layouts.
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Chapter 3 Navigating a Project Goals & Objectives 1.Get familiar with the navigation of the project. How is everything structured? What settings can you.
Robert Vitolo CS430.  CSS (Cascading Style Sheets)  Purpose: To provide a consistent look and feel for a set of web pages To make it easy to update.
CS5103 Software Engineering Lecture 08 Android Development II.
Chapter 10: Move! Creating Animation
Chapter 2: Simplify! The Android User Interface
Mobile Application Development using Android Lecture 2.
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.
Android Boot Camp for Developers Using Java, 3E
Resources. Application Resources Resources are strings, images, and other pieces of application information that are stored and maintained (externalized)
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.
MOBILE COMPUTING D10K-7D02 MC05: Android UI Design Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Building User Interfaces Basic Applications
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Chapter 2 Building User Interfaces and Basic Applications.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 10: Move! Creating Animation 1 Android.
Resources & Android Manifest Калин Кадиев Astea Solutions AD.
INTRODUCTION TO ANDROID. Slide 2 Introduction I take a top-down approach to describing an application’s anatomy.
CHAPTER 1 part 1 Introduction. Chapter objectives: Understand Android Learn the differences between Java and Android Java Examine the Android project.
Android 3: Exploring Apps and the Development Environment
How HTML responsiveness translates to PDF
How to use Microsoft PowerPoint
Chapter 2: Simplify! The Android User Interface
Mobile Applications (Android Programming)
Android Mobile Application Development
Mobile Applications (Android Programming)
Mobile Applications (Android Programming)
Android 01: Fundamentals
Mobile Applications (Android Programming)
Mobile Application Development BSCS-7 Lecture # 2
Obtaining the Required Tools
Guidelines for PowerPoint
Instructor: Mazhar Hussain
Mobile Applications (Android Programming)
Mobile Applications (Android Programming)
Mobile Application Development BSCS-7 Lecture # 6
Mobile Applications (Android Programming)
MAD.
Activities and Intents
Mobile Applications (Android Programming)
Anatomy of an Android Application
Android SDK & App Development
Content Best Practices
Mobile Computing With Android ACST 4550 Android Animation
Mobile Computing With Android ACST 4550 Android Resources
Android Programming Lecture 3
Android Layout Basics Topics
WPF AKEEL AHMED.
CS323 Android Getting Started
CS5103 Software Engineering
Mobile Applications (Android Programming)
Building User Interfaces Basic Applications
Android Developer Fundamentals V2 Lesson 1
CHAPTER 1 Introduction Chapter objectives: Understand what Android is
Mobile Applications (Android Programming)
Programming Mobile Applications with Android
Mobile Applications (Android Programming)
Emerging Platform#3 Android & Programming an App
Android Project Structure, App Resources and Event Handling
Introduction to Android
Presentation transcript:

Mobile Applications (Android Programming) Semester II 2016 - 2017 Dr. Saman Mirza Abdullah

Class Objective The objective of this class is: To learn how Android applications store and access important resources such as strings, graphics, and other data. To learn how to organize Android resources within the project files. To learn the localization and configuration of different devices. Mobile Application - Ishik

Resources Directory Mobile Application - Ishik

Resources and Codes Good developers not put data within the source code. Instead, data are accessed programmatically. Storing application resources in a single place Is a more organized approach to development, Makes the code more readable and maintainable Localization (adaption) of applications for different languages and devices. Mobile Application - Ishik

Resources All Android application are composed of two things: Functionalities: Is a code that determines the behaviors of the application, such algorithms or models for problems. Resources: They are data or information accessed by the source code, such as string, style and themes, dimensions, image and icons, audio files, vedios, and other data. Mobile Application - Ishik

Storing Resources Resources are separately stored from .java class files They are stored in XML, but still row data and graphs are accepted. They are stored in /res directory File names should be lowercase. No duplicated. Mobile Application - Ishik

Resource Directories Mobile Application - Ishik

Resource Type and File Hierarchy http://d.android.com/guide/topics/resources/available-resources.html Mobile Application - Ishik

Default VS Alternative Resources There are many criterion for storing resources. Default resources are those that stored automatically by the created applications. Creating some special resources are needed in some cases: Internationalization, when an application needed to work with multi-languages. Localization, when there is a need to run an application smoothly on different devices and orientations. Mobile Application - Ishik

Alternative Resources: Examples An application with different graphical size. /res/drwable-ldpi/mylogo.png (low-density screen) /res/drwable-mdpi/mylogo.png (medium-density screen) /res/drwable-hdpi/mylogo.png (high-density screen) /res/drwable-xhdpi/mylogo.png (extra high-density screen) /res/drwable-xxhdpi/mylogo.png (extra extra high-density screen) Application for different orientations: /res/layout-port/main.xml (layout loaded in portiere) /res/layout-land/main.xml (layout loaded in landscape) Mobile Application - Ishik

Access Resources All resource files will be compiled and seen as R.Java class file and it is sub-classes. The file will be automatically generated when any resources are added. Through this files the content is accessed. Example: A String named strHello defined within the resource file called /res/values/string.mls Can be accessed R.string.strHellow  doesn't return data. String mystring = getResource().getString (R.String.strHello) Mobile Application - Ishik

Accessing Resource Programmatically Using String resources programmatically: Mobile Application - Ishik

String Resources Using Bold, Italic, and underline. Mobile Application - Ishik

Working with Images Applications often include visual elements such as icons and graphics. Android supports several image formats. can be directly included as resources for your application. All resource filenames must be lowercase and simple Mobile Application - Ishik

List of Image Formats Mobile Application - Ishik

Accessing Image Resource Image resources are simply another kind of Drawable called a BitmapDrawable. For Accessing, mostly it needs only the resource ID of the image. It can be accessed directly using BitmapDrawable function. Mobile Application - Ishik

Color State List Some time it needs to color an object based on state of the object. Could be done by special recourse called selector. Example: A Button control may need to by gray when disable, green when activated, and yellow when processed. Mobile Application - Ishik

Color State List Mobile Application - Ishik

Color State Defining Mobile Application - Ishik

Button State Color we define a Button and set the textColor the state list resource file text_color.xml is defined as list of state color. Mobile Application - Ishik

Class End Mobile Application - Ishik