The document discusses Android's windowing system architecture and components. It describes the main components as SurfaceManager, WindowManager, and ActivityManager. SurfaceManager is responsible for compositing surfaces. WindowManager creates and lays out surfaces on behalf of clients and dispatches input events. ActivityManager manages activity lifecycles and stacking. The document also covers handling gestures, animations, custom view architecture, using the hierarchy viewer tool, and event propagation in Android views.
Project Darkstar - Case Study at the 2008 Austin Game Developers ConferenceChris Melissinos
Classic presentation! Delivered by Owen Kellett at the Austin Game Developer Conference in 2008. Focused on developing games on the Sun Microsystems Project Darkstar technology.
This set of slides introduces the basics of the Android development framework and mobile development in general. First, a brief overview on the history of mobile development is introduced. Then, the architecture of the Android platform is discussed, commenting on the role and functionalities of each architectural layer.
Project Darkstar - Case Study at the 2008 Austin Game Developers ConferenceChris Melissinos
Classic presentation! Delivered by Owen Kellett at the Austin Game Developer Conference in 2008. Focused on developing games on the Sun Microsystems Project Darkstar technology.
This set of slides introduces the basics of the Android development framework and mobile development in general. First, a brief overview on the history of mobile development is introduced. Then, the architecture of the Android platform is discussed, commenting on the role and functionalities of each architectural layer.
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)Toshiharu Harada, Ph.D
TOMOYO Linux is a MAC (Mandatory Access Control) implementation which gives support to protect Linux systems as well as to learn, understand and analyze system behavior. Being lightweight, it results suitable for embedded systems too. This tutorial aims to show in a practical way how to make the best use of TOMOYO Linux potentials in order to study and protect embedded Linux systems, taking Android as a specific study case. Though Android is amazingly expanding its target to various kinds of devices, it was designed mainly for mobile phones. Then, unlike other embedded operating systems, it presents some peculiar characteristics which require a particular attention to apply MAC effectively. The session is directed to those who want to learn how to use TOMOYO Linux, to managers or developers interested in security concerning embedded Linux and Android, and even to anyone just wishing to take a closer glance at Android internals.
One of the biggest issues for a developer – whether they are an engineer at an OEM or working for a mobile AI application startup – is that their apps are at the mercy of pre-set power and performance settings as defined by OEMs or Silicon vendors. So how can a developer break through that barrier when it seems their hands are tied behind their backs? The Snapdragon Power Optimization SDK allows developers to control the CPU and GPU frequency much more finely from their own application logic. This provides developers with more control within the bounds of the power/thermal framework.
Demian Neidetcher's presentation to the Denver Open Source Users Group on the Android mobile phone platform. Full details and source code available at http://neidetcher.com/android.html
This presentation covers the working model about Process, Thread, system call, Memory operations, Binder IPC, and interactions with Android frameworks.
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)Toshiharu Harada, Ph.D
TOMOYO Linux is a MAC (Mandatory Access Control) implementation which gives support to protect Linux systems as well as to learn, understand and analyze system behavior. Being lightweight, it results suitable for embedded systems too. This tutorial aims to show in a practical way how to make the best use of TOMOYO Linux potentials in order to study and protect embedded Linux systems, taking Android as a specific study case. Though Android is amazingly expanding its target to various kinds of devices, it was designed mainly for mobile phones. Then, unlike other embedded operating systems, it presents some peculiar characteristics which require a particular attention to apply MAC effectively. The session is directed to those who want to learn how to use TOMOYO Linux, to managers or developers interested in security concerning embedded Linux and Android, and even to anyone just wishing to take a closer glance at Android internals.
One of the biggest issues for a developer – whether they are an engineer at an OEM or working for a mobile AI application startup – is that their apps are at the mercy of pre-set power and performance settings as defined by OEMs or Silicon vendors. So how can a developer break through that barrier when it seems their hands are tied behind their backs? The Snapdragon Power Optimization SDK allows developers to control the CPU and GPU frequency much more finely from their own application logic. This provides developers with more control within the bounds of the power/thermal framework.
Demian Neidetcher's presentation to the Denver Open Source Users Group on the Android mobile phone platform. Full details and source code available at http://neidetcher.com/android.html
This presentation covers the working model about Process, Thread, system call, Memory operations, Binder IPC, and interactions with Android frameworks.
15 Quotes To Nurture Your Creative Soul!DesignMantic
Every now and then, we all crave inspiration to get started. but often times, inspiration is hardest is to find when it is needed the most. but powerful words almost always do the trick. They have power that is undeniable. So for all the creative souls out there, here we share some remarkable sayings from legends to feed your mind and strengthen your design game ...
Remember, sharing is caring! :)
Presentation from #andevcon by Anna Schaller
Peter van der Linden, Android Technology Evangelists from the Developer Platforms and Services team at Motorola Mobility. More info at http://developer.motorola.com
A complete Lab Manual with Aim, Procedure, Source Code, ... All the Experiments of Mobile Application Development Lab are developed using Android Studio.
Those who want to be familiar with Android, can easily go through this document. It will help them to learn basics. It is also useful for those who are preparing for cracking android interviews as this document is short and precise.
Materi yang ada pada slide ini berisi :
Android version
Platform architecture
App Component
Kotlin
Struktur Project
Activity Lifecycle
Melempar Nilai
Layouting LinearLayout
Layouting RelativeLayout
Look And Feel
Custom Buttom
----------------------------------------------------------------------
Keep in touch with me in :
Email : rizkiadamunikom@gmail.com
India missed the PC revolution, we were very late for with the internet revolution but with mobile revolution India is bang on. We use the same phones as in people of any other country and so is our young developers which create apps that earn millions apps that change the way the world interacts. At itvedant the focus is not only to teach the basics of app development but to make you understand the process of app development. With expert faculties you learn the best tips and tricks right under their hands. Learning mobile app development is fun filled and challenging. From the refreshment of java to most advance application development training we take you till the zenith of app development.
Core Android : By learning core android you would be able to develop your own android application which you can upload on google playstore. To start with this module you should have knowledge of Core Java. In this module you will learn to create different layouts, linking layouts using activities, intents and developing fragments (all basics which require to develop android app) using Android studio. You will be able to develop apps like recipe app, Todo List app, Wallpaper image gallery app. Develop advanced apps by learning advanced android.
Advance Android : Simply learning core android would not help you develop all kind of apps. Get the knowledge of advanced concepts by learning advanced android. This module will help you to learn.
Accessing web services and their data which helps developing apps like amazon, ola, quicker. Managing SQLite database helps developing apps like expense manager, Personal diary, reminders. Accessing geo-location api which helps to create apps like ola, uber
Social media integration helps adding functionality of Facebook login into your app. Create aesthetic designs using Material design
This Presentation slide include all the basic things that need to know a beginner to start his/her android career. Even though this slide presentation for beginner but mid level developer also could be benefited.
The presentation covers Android architecture in depth with examples and animations depicting the applications and process flow in a nice manner.It also presents the history of android and booting process. Therefore it is necessary to always use (F5) slide show mode to view the presentation.
The presentation was held at Cluster Innovation Centre, University of Delhi for 3rd Semester students of BTech(IT).
One of the most important factor for failure or delaying in Project deliverable is Project Manager and not having clear picture and agenda by manager.
So, question is being a good project manager, make sure that deliverable's on time, what are the key points project manager should follow.
What is mobile wallet
MW is a solution for commercial transaction across domain and geography. Such as Osaifu Keitai, Smart Wallet, Softcard, Google Wallet, Passbook, MasterPass etc. Lots of solutions is available in market but still mobile wallets are n an early stage of market.
If we defined Mobile Wallet in One line, it is equivalent to the physical wallet (wallet in pocket) and which can be used for purchasing goods, cloths, services at any time and any location. It can be in form of ID or social security card, health card, payment card, tickets for transport, or movies or events, hotel bill, gift and coupons.
Mobile applications testing (challenges, tools & techniques)Rakesh Jha
Device Fragmentation is a Big Challenge
Devices Vary in Screen Size, Memory, Processing Power, Hardware Features etc.
Apple iPhone is Least Fragmented among All Mobile Platforms
Testing on All Target Handset/Devices
Almost Impractical if Number of Target Handsets is Large
Testing on All Target Operator Networks
Almost Impractical if Number of Target Operators is Large
Network Operator may Impose Certain Constraints
Introduction
Mobile Trends
Mobile Evolution
Top Ten Trends
Mobile Ecosystem
Smartphone Trends
Mobile Application Testing
Application Option
Approach to QA
Challenges
Implementation
Introduction to PhoneGap
Background
Setting up the environment for Android
Handling Events
Working With The Device, The Network, And Notifications
Getting Information from the Device
Determining the Connection Type
Using Notifications
Using Alerts
Using Confirmation Dialogs
Using Beeps
Using Vibrations
Accelerometer
Using the Acceleration Object
Using Accelerometer Methods
Media
The Media Object
Using Media Methods
Camera
Using The Camera Object
Using The Getpicture Method
Using Camera Options
Geolocation
Position, PositionError, Coord
Geolocation Methods
Geolocation Options
Deployment using Phonegap (Android)
Hands-on exercises
Storage
Available options
Db object
localStorage
Files
Filessystem
File read & write
Handling errors
Contacts
Creating contacts
Finding contacts
Handling errors
Capture
Video
Audio
Handling errors
Hands-on exercises
Introduction to PhoneGap
Background
Setting up the environment for Android
Handling Events
Working With The Device, The Network, And Notifications
Getting Information from the Device
Determining the Connection Type
Using Notifications
Using Alerts
Using Confirmation Dialogs
Using Beeps
Using Vibrations
Accelerometer
Using the Acceleration Object
Using Accelerometer Methods
Media
The Media Object
Using Media Methods
Camera
Using The Camera Object
Using The Getpicture Method
Using Camera Options
Geolocation
Position, PositionError, Coord
Geolocation Methods
Geolocation Options
Deployment using Phonegap (Android)
Hands-on exercises
Storage
Available options
Db object
localStorage
Files
Filessystem
File read & write
Handling errors
Contacts
Creating contacts
Finding contacts
Handling errors
Capture
Video
Audio
Handling errors
Hands-on exercises
Advanced JQuery Mobile tutorial with Phonegap Rakesh Jha
Introduction to jQuery Mobile (jQM) - cont'd
Getting started with jQM
-Downloading the Most Recent Version of jQuery Mobile
-Proper Markup for Loading Framework JavaScript and CSS
jQuery Mobile Page Structure
-Page Anatomy: Header, Footer and Content Sections
-Header and Footer Toolbars
-Bundling Pages into a Single Document
-Navigating Between Pages
Applying Different Theme Swatches
Page Initialization Events
jQuery Mobile Page Components
Basic Content Formatting
List Views
-Ordered and Unordered Lists
-Inset Lists
-Lists with Links
-Nested Lists
-Lists with Icons or Thumbnail Images
-Split Button Lists
-List Dividers
-Search Filters
Form Controls - check boxes, slider, etc.
Dialogs
Buttons and Toolbars
-Ways to Make a Button
-Placing Icons on Your Buttons
-Inline Buttons
-Button Groupings
-Navigation Toolbars
Collapsible Content
Event Handling
-Responding to various events
-Page related events
Ajax & Interaction with server (REST & SOAP)
Deployment using Phonegap (e.g. Android)
Overview of Android Devt Environment
Best Practices in jQM
Hands-on exercises
Introduction to CSS3
Text Formatting
Selectors
Box Model
Links, Backgrounds
Lists, Tables
Positioning & Layout
New features of CSS3 - transition, tranform, etc.
Introduction to jQueryMobile
Hands-on exercises
Introduction to jquery mobile with PhonegapRakesh Jha
Introduction to jQuery Mobile (jQM) - cont'd
Getting started with jQM
-Downloading the Most Recent Version of jQuery Mobile
-Proper Markup for Loading Framework JavaScript and CSS
jQuery Mobile Page Structure
-Page Anatomy: Header, Footer and Content Sections
-Header and Footer Toolbars
-Bundling Pages into a Single Document
-Navigating Between Pages
Applying Different Theme Swatches
Page Initialization Events
jQuery Mobile Page Components
Basic Content Formatting
List Views
-Ordered and Unordered Lists
-Inset Lists
-Lists with Links
-Nested Lists
-Lists with Icons or Thumbnail Images
-Split Button Lists
-List Dividers
-Search Filters
Form Controls - check boxes, slider, etc.
HTML5 Home
HTML5 Forms
HTML5 Reference
HTML5 Tags
HTML5 Canvas
Audio And Video
HTML5 new features
New Elements
New Attributes
Full CSS3 Support
Video and Audio
2D/3D Graphics
Local Storage
Local SQL Database
Web Applications
Native development kit (ndk) introductionRakesh Jha
Native development kit (ndk) introduction
Topics covered include •
o What is an NDK and Why NDK? •
o Java Native Interface (JNI) •
o Using NDK •
o NDK and JNI by Example •
o NDK's Stable APIs
• Android NDK Multithreading
o Introduction To NDK Native Threading
o Creating and terminating native threads at Android NDK
Build with pthreads
Thread creation
Thread termination
o Synchronizing native threads with conditional variables at Android NDK
Initialize and destroy conditional variables
o Synchronizing native threads with semaphore at Android NDK
Initialize and destroy a semaphore
o Managing data for native threads at Android NDK
Multithreading and concurrency in androidRakesh Jha
Here you will learn -
What is Multithreading
What is concurrency
Process Vs Thread
Improvements and issues with concurrency
Limits of concurrency gains
Concurrency issues
Threads pools with the Executor Framework
AsyncTask and the UI Thread
Code
3. What is Android windowing system
In computing, a windowing
system (or window system) is a type
of graphical user interface (GUI) which
implements the WIMP (windows, icons,
menus, pointer) paradigm for a user
interface.
4. What is Android windowing system
Most popular windowing systems are X11
and Wayland
Most popular widget toolkits
are GTK+/Clutter and Qt
Most popular desktop environments
are GNOME and the KDE Software
Compilation
5. X Window
The X Window System (sometimes referred to
as "X" or as "XWindows") is an open, cross-
platform, client/server system for managing a
windowed graphical user interface in a
distributed network.
is a windowing system for bitmap displays,
common on UNIX-like computer operating
systems.
11. SurfaceManager
It is used for compositing window manager
with off-screen buffering.
Off-screen buffering means you cant directly
draw into the screen, but your drawings go to
the off-screen buffer.
There it is combined with other drawings and
form the final screen the user will see.
This off screen buffer is the reason behind the
transparency of windows.
13. WindowManager
The interface that apps use to talk to the
window manager.
Use Context.getSystemService(Context.WIND
OW_SERVICE) to get one of these.
14. WindowManager
Each window manager instance is bound to a
particular Display.
To obtain a WindowManager for a different
display, use createDisplayContext(Display) to
obtain a Context for that display, then
use Context.getSystemService(Context.WINDO
W_SERVICE) to get the WindowManager.
16. ActivityManager
Interact with the overall activities running in the
system.
Information you can retrieve about the available
memory
Information you can retrieve about any processes
that are in an error condition.
Information you can retrieve about a running
process.
ActivityManager.MemoryInfo,
ActivityManager.RunningAppProcessInfo
17. An activity has one or more windows (e.g.
dialogs)
A window has one or more surfaces (e.g.
surface views)
However, in window manager, a window is
called a session
A surface is called a window
18. How Android Draws Views?
• When an Activity receives focus, it will be
requested to draw its layout.
• The Android framework will handle the
procedure for drawing, but the Activity must
provide the root node of its layout hierarchy.
19. How Android Draws Views?
• When an Activity receives focus, it will be
requested to draw its layout.
• The Android framework will handle the
procedure for drawing, but the Activity must
provide the root node of its layout hierarchy.
• Drawing the layout is a two pass process: a
measure pass and a layout pass.
21. Handling Gestures
Some examples of common multi-touch gestures
and actions you might use include:
Pinch to zoom in, spread to zoom out.
Basic dragging in order to move, adjust, scroll,
and position.
Flick to jump to the next screen or scroll extra
fast.
Tap and hold to open an item or context menu.
Multi-finger drag often scrolls faster!
22. Handling Gestures
Handling multi touch gesture
Detecting common gesture
Managing touch event
Animating a scroll gesture
Tracking movement
Dragging & scalling
23. Handling Gestures
Android provides special types of touch screen
events such as pinch , double tap, scrolls , long
presses and flinch. These are all known as
gestures.
24. Handling Gestures
Android provides GestureDetector class to
receive motion events and tell us that these
events correspond to gestures or not.
25. Handling Gestures
To use it , you need to create an object of
GestureDetector and then extend another
class with
GestureDetector.SimpleOnGestureListener to
act as a listener and override some methods.
26. Handling Gestures
GestureDetector myG;
myG = new GestureDetector(this,new Gesture());
class Gesture extends GestureDetector.SimpleOnGestureListener{
public boolean onSingleTapUp(MotionEvent ev) {
}
public void onLongPress(MotionEvent ev) {
}
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
float distanceY) {
}
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
}
}
}
27. Handling Pinch Gesture
Android provides ScaleGestureDetector class
to handle gestures like pinch e.t.c. In order to
use it , you need to instantiate an object of
this class. Its syntax is as follow: -
ScaleGestureDetector SGD; SGD = new ScaleGestureDetector(this,new
ScaleListener());
28. Handling Pinch Gesture
We have to define the event listener and override a function OnTouchEvent to
make it working.
public boolean onTouchEvent(MotionEvent ev) {
SGD.onTouchEvent(ev);
return true;
}
private class ScaleListener extends
ScaleGestureDetector.SimpleOnScaleGestureListener {
@Override
public boolean onScale(ScaleGestureDetector detector) {
float scale = detector.getScaleFactor();
return true;
}
}
29. Handling Pinch Gesture
Apart from the pinch gestures , there are other
methods avaialible that notify more about touch
events. They are listed below:
1 getEventTime()
This method get the event time of the current event being processed..
2 getFocusX()
This method get the X coordinate of the current gesture's focal point.
3 getFocusY()
This method get the Y coordinate of the current gesture's focal point.
4 getTimeDelta()
This method return the time difference in milliseconds between the previous accepted scaling event and the
current scaling event.
5 isInProgress()
This method returns true if a scale gesture is in progress..
6 onTouchEvent(MotionEvent event)
This method accepts MotionEvents and dispatches events when appropriate.
30. Handling Pinch Gesture
Use of ScaleGestureDetector class.
It creates a basic application that allows you to
zoom in and out through pinch.
32. Animation in Android
• Animation in android is possible from many
ways.
• making animation called tweened animation.
33. Animation in Android
• Animation in android is possible from many
ways.
• making animation called tweened animation.
34. Tween Animation
• Tween Animation takes some parameters such
as start value , end value, size , time duration ,
rotation angle e.t.c and perform the required
animation on that object.
35. Tween Animation
• In order to perform animation in android , call
a static function loadAnimation() of the class
AnimationUtils.
Animation animation =
AnimationUtils.loadAnimation(getApplicationContext(),
R.anim.myanimation);
second parameter, it is the name of the our animation xml file.
36. Sr.No Method & Description
1 start()
This method starts the animation.
2 setDuration(long duration)
This method sets the duration of an animation.
3 getDuration()
This method gets the duration which is set by above
method
4 end()
This method ends the animation.
5 cancel()
This method cancels the animation.
Tween Animation
38. Zoom in animation
• To perform a zoom in animation , create an
XML file under anim folder under res
directory, and put zoom xml code.
<set xmlns:android="http://schemas.android.com/apk/res/android"> <scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXScale="0.5" android:toXScale="3.0" android:fromYScale="0.5"
android:toYScale="3.0" android:duration="5000" android:pivotX="50%"
android:pivotY="50%" > </scale> </set>
39. Zoom in animation
• The
parameter fromXScale and fromYScale define
s the start point and the
parameters toXScale andtoYScale defines the
end point.
• The duration defines the time of animation
and the pivotX, pivotYdefines the center from
where the animation would start.
41. • Android offers a sophisticated and powerful
componentized model for building your UI, based
on the fundamental layout classes: View
and ViewGroup.
• A partial list of available widgets
includes Button, TextView,
EditText, ListView, CheckBox,
RadioButton, Gallery, Spinner, and the more
special-
purpose AutoCompleteTextView, ImageSwitcher,
and TextSwitcher.
• Among the layouts available
are LinearLayout, FrameLayout, RelativeLayout,
and others
42. • If none of the prebuilt widgets or layouts
meets your needs, you can create your own
View subclass.
43. View Hierarchy Design
• Sometimes your application's layout can slow
down your application. To help debug issues in
your layout, the Android SDK provides the
Hierarchy Viewer and lint tools.
44. View Hierarchy Design
• The Hierarchy Viewer application allows you
to debug and optimize your user interface
• It provides a visual representation of the
layout's View hierarchy
45. View Hierarchy Design
• Android lint is a static code scanning tool that
helps you optimize the layouts and layout
hierarchies of your applications, as well as
detect other common coding problems.
46. Using Hierarchy Viewer
• Connect your device or launch an emulator. To
preserve security, Hierarchy Viewer can only connect to
devices running a developer version of the Android
system.
• If you have not done so already, install the application
you want to work with.
• Run the application, and ensure that its UI is visible.
• From a terminal, launch hierarchyviewer from
the <sdk>/tools/ directory.
• Window will launched with device list
• Select apps name(packagename) and perform
operaion.
47.
48. Using Hierarchy Viewer
• The View Hierarchy window displays the View
objects that form the UI of the Activity that is
running on your device or emulator.
• You should see four panes:-
– Tree View:
– Tree Overview,
– Layout View,
– Properties View
49. Using Hierarchy Viewer
• When the UI of the current Activity changes,
the View Hierarchy window is not
automatically updated.
• To update it, click Load View Hierarchy at the
top of the window.
50.
51. Working with an individual View in
Tree View
• Each node in Tree View represents a single
View. Some information is always visible.
• Starting at the top of the node, you see the
following:
52. Working with an individual View in
Tree View
1. View class: The View object's class.
2. View object address: A pointer to View
object.
3. View object ID: The value of
the android:id attribute.
4. Performance indicators:
1. Green: Fastest, 50% faster than view object
2. Yellow : slower 50% of all the View objects
3. Red : slowest one in the tree
53. Working with an individual View in
Tree View
5. View index: The zero-based index of the View
in its parent View. If it is the only child, this is
0.
54. Using lint to Optimize Your UI
• The Android lint tool lets you analyze the XML
files that define your application's UI to find
inefficiencies in the view hierarchy.
• Note: The Android layoutopt tool has been
replaced by the lint tool beginning in ADT and
SDK Tools revision 16. The lint tool reports UI
layout performance issues in a similar way
as layoutopt, and detects additional problems.
55. Using lint to Optimize Your UI
• Improving Your Code with lint
• The Android SDK provides a code scanning
tool called lint that can help you to easily
identify and correct problems with the
structural quality of your code, without having
to execute the app or write any test cases.
56. Using lint to Optimize Your UI
• The lint tool checks your Android project
source files for potential bugs and
optimization improvements for correctness,
security, performance, usability, accessibility,
and internationalization.
• You can run lint from the command-line or
from the Eclipse environment.
57. Running lint from Eclipse
If the ADT Plugin is installed in your Eclipse
environment, the lint tool runs automatically
when you perform one of these actions:
Export an APK
Edit and save an XML source file in your
Android project (such as a manifest or layout
file)
Use the layout editor in Eclipse to make
changes
58. Running lint from the Command-Line
• To run lint against a list of files in a project
directory:
int [flags] <project directory>
lint --check MissingPrefix myproject
59. Configuring lint
You can configure lint checking at different
levels:
Globally, for all projects
Per project
Per file
Per Java class or method (by using
the @SuppressLint annotation), or per XML
element (by using the tools:ignoreattribute.
60. Configuring lint in Eclipse
You can configure global, project-specific, and
file-specific settings for lint from the Eclipse user
interface.
61. Global preferences
• Open Window > Preferences > Android > Lint
Error Checking.
• Specify your preferences and click OK.
62. Project and file-specific preferences
• Run the lint tool on your project by right-
clicking on your project folder in the Package
Explorer and selecting Android Tools > Run
Lint: Check for Common Errors.
• From the Lint Warnings view, use the toolbar
options to configure lint preferences for
individual projects and files in Eclipse.
63. Project and file-specific preferences
The options you can select include:
• Suppress this error with an annotation/attribute - If the
issue appears in a Java class, the lint tool adds
a@SuppressLint annotation to the method where the issue
was detected. If the issue appears in an .xml file, lintinserts
a tools:ignore attribute to disable checking for the lint issue
in this file.
• Ignore in this file - Disables checking for this lint issue in
this file.
• Ignore in this project - Disables checking for this lint issue
in this project.
• Always ignore - Disables checking for this lint issue globally
for all projects.
64. Configuring the lint file
You can specify your lint checking preferences
in the lint.xml file.
If you are creating this file manually, place it
in the root directory of your Android project.
If you are configuring lint preferences in
Eclipse, the lint.xml file is automatically
created and added to your Android project for
you.
65. Sample lint.xml file
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<!-- Disable the given check in this project -->
<issue id="IconMissingDensityFolder" severity="ignore" />
<!-- Ignore the ObsoleteLayoutParam issue in the specified files -->
<issue id="ObsoleteLayoutParam">
<ignore path="res/layout/activation.xml" />
<ignore path="res/layout-xlarge/activation.xml" />
</issue>
<!-- Ignore the UselessLeaf issue in the specified file -->
<issue id="UselessLeaf">
<ignore path="res/layout/main.xml" />
</issue>
<!-- Change the severity of hardcoded strings to "error" -->
<issue id="HardcodedText" severity="error" />
</lint>
66. Event Propagation and Event Handling
in Views
For each application, a ViewRootImpl object is
created to handle communications with the
remote system WindowManagerService object.
The communication is through a Linux pipe which
is encapsulated in an InputChannel object
(mInputChannel field in class ViewRootImpl).
TheViewRootImpl object also registers an
instance of InputEventReceiver when the
first View object is registered with it.
67. Event Propagation and Event Handling
in Views
public void setView(View view, ...) {
...
mInputEventReceiver = new WindowInputEventReceiver(mInputChannel,
Looper.myLooper());
...
}
The constructor of
class WindowInputEventReceiver (class WindowManagerService extends
from classInputEventReceiver) calls a native methond nativeInit(...):
69. Event Propagation and Event Handling
in Views
Three parameters are passed to the native function nativeInit:
1) The receiver object itself;
2) TheInputChannel object passed from the ViewRootImpl object.
3) The main message queue (an object of class MessageQueue) of the
application.
71. Event Propagation and Event Handling
in Views
Included in the event listener interfaces are the
following callback methods:-
onClick()
onLongClick()
onFocusChange()
onKey()
onTouch()
onCreateContextMenu()
72. Event Propagation and Event Handling
in Views
Included in the event listener interfaces are the
following callback methods:-
onClick()
onLongClick()
onFocusChange()
onKey()
onTouch()
onCreateContextMenu()
76. • An android application can run on many
devices in many different regions.
• In order to make your application more
interactive, your application should handle
text,numbers,files e.t.c in ways appropriate to
the locales where your application will be
used.
77. Localizing Strings
• In order to localize the strings used in your
application , make a new folder under res with
name ofvalues-local where local would be the
replaced with the region.
• For example, in the case of italy, the values-
it folder would be made under res. It is shown
in the image below:
79. Localizing Strings
• Once that folder is made, copy
the strings.xmlfrom default folder to the
folder you have created. And change its
contents. For example, i have changed the
value of hello_world string.