SlideShare a Scribd company logo
1 of 33
The Android GUI Framework
Android experience day
December 2008

Markus Pilz
Peter Wlodarczak
Agenda
1. Introduction
2. Anatomy
3. A real word example
4. Life cycle
5. Trends
6. Findings
Why Android
 Android was designed as a platform for
software development
 Android is open
 Android is free
 Community support
 Tool support
Android Platform
Anatomy I
 Android is Linux based
 GUI is fully written in Java
 Java 1.5 support
 Widget toolkit
 XML based GUI
 Single Touch screen
Anatomy II
 Activity
 Intent, IntentFilter, IntertReceiver
 View
 Service
 Content provider
Anatomy III
 Storage
 AIDL
 Security
 Life cycle management
 Native calls (not officially)

 NLS support
A real word example I
 A translator for Android
 If you are in a country where no one
understands your language

 You cannot read anything
 You have your mobile
phone always with you
 No additional device needed
A real word example II
 Uses the Google translator
 Uses XMPP for data transmission
 Can be extended with new languages
 Adaptive GUI
 GUI fully defined in XML
A real word example III

Lets see it
A real word example IV
 Used Eclipse for development
 ANT script and make for build
 Uses persistence of user data
 Uses touch screen and keyboard input
A real word example V
The AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.greenliff.translator">
<application android:icon="@drawable/logo">
<activity android:label="@string/settings" android:name="Settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:label="@string/app_name" android:name="Translate">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="@string/ocr" android:name="OCR">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>
A real word example V
The AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.greenliff.translator">
<application android:icon="@drawable/logo">
<activity android:label="@string/settings" android:name="Settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:label="@string/app_name" android:name="Translate">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="@string/ocr" android:name="OCR">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>
A real word example V
The AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.greenliff.translator">
<application android:icon="@drawable/logo">
<activity android:label="@string/settings" android:name="Settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:label="@string/app_name" android:name="Translate">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="@string/ocr" android:name="OCR">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>

Launch
A real word example VI
The AndroidManifest.xml

 Used for security
 Define permissions, e. g.
<uses-permission android:name="android.permission.RECEIVE_SMS" />

 Give other Activities access
A real word example VII
An XML snipped of the main Activity
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="fill_parent"
Text reference
android:layout_height="wrap_content"
android:background="@drawable/blue"
android:text="@string/translate_to_1"/>
<EditText
android:id="@+id/toTranslate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:layout_below="@id/linLayout“
android:hint="Type here..." />
.....
A real word example VII
An XML snipped of the main Activity
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="fill_parent"
Text reference
android:layout_height="wrap_content"
android:background="@drawable/blue"
android:text="@string/translate_to_1"/>
<EditText
android:id="@+id/toTranslate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:layout_below="@id/linLayout“
android:hint="Type here..." />
.....
A real word example VIII
 Could also be developed purely in Java
 XML cannot be debugged
 Not all the attributes can be defined in XML
A real word example IX
A code snipped of the Translate Activity
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Window wp = getWindow();
mContext = wp.getContext();
setTheme(android.R.style.Theme_Light);
setContentView(R.layout.main);
mLayout = (LinearLayout) this.findViewById(R.id.linLayout);
mToTranslate = (EditText) this.findViewById(R.id.toTranslate);
setShowLanguages();
mEnge = (LinearLayout) this.findViewById(R.id.enge);
LANGUAGE_LAYOUT[0] = mEnge;
de2en = (Button) this.findViewById(R.id.de2en);
de2en.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
if(!connect()) {
notLoggedInAlert();
} else {
doConnect("de2en@bot.talk.google.com");
rearrange(mEnge);
}
}
});
....
A real word example IX
A code snipped of the Translate Activity

Set layout

@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Window wp = getWindow();
mContext = wp.getContext();
setTheme(android.R.style.Theme_Light);
setContentView(R.layout.main);
mLayout = (LinearLayout) this.findViewById(R.id.linLayout);
mToTranslate = (EditText) this.findViewById(R.id.toTranslate);
setShowLanguages();
mEnge = (LinearLayout) this.findViewById(R.id.enge);
LANGUAGE_LAYOUT[0] = mEnge;
de2en = (Button) this.findViewById(R.id.de2en);
de2en.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
if(!connect()) {
notLoggedInAlert();
} else {
doConnect("de2en@bot.talk.google.com");
rearrange(mEnge);
}
}
});
....
A real word example IX
A code snipped of the Translate Activity

Set layout

@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Find
Window wp = getWindow();
mContext = wp.getContext();
setTheme(android.R.style.Theme_Light);
setContentView(R.layout.main);
mLayout = (LinearLayout) this.findViewById(R.id.linLayout);
mToTranslate = (EditText) this.findViewById(R.id.toTranslate);
setShowLanguages();
mEnge = (LinearLayout) this.findViewById(R.id.enge);
LANGUAGE_LAYOUT[0] = mEnge;
de2en = (Button) this.findViewById(R.id.de2en);
de2en.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
if(!connect()) {
notLoggedInAlert();
} else {
doConnect("de2en@bot.talk.google.com");
rearrange(mEnge);
}
}
});
....

elements
A real word example IX
A code snipped of the Translate Activity

Set layout

@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Find
Window wp = getWindow();
mContext = wp.getContext();
setTheme(android.R.style.Theme_Light);
setContentView(R.layout.main);
mLayout = (LinearLayout) this.findViewById(R.id.linLayout);
mToTranslate = (EditText) this.findViewById(R.id.toTranslate);
setShowLanguages();
mEnge = (LinearLayout) this.findViewById(R.id.enge);
LANGUAGE_LAYOUT[0] = mEnge;
de2en = (Button) this.findViewById(R.id.de2en);
de2en.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
if(!connect()) {
notLoggedInAlert();
} else {
doConnect("de2en@bot.talk.google.com");
rearrange(mEnge);
}
}
});

Add behavior

....

elements
A real word example X
Call an other Activity

@Override
public boolean onOptionsItemSelected(Menu.Item item) {
switch (item.getId()) {
case 0:
showLogin();
break;
case 1:
Intent intent = new Intent(Translate.this, Settings.class);
intent.putExtras(mShownLanguages);
startSubActivity(intent, SETTINGS);
break;
} // switch
return true;
}
A real word example X
Call an other Activity

Start an Activity

@Override
public boolean onOptionsItemSelected(Menu.Item item) {
switch (item.getId()) {
case 0:
showLogin();
break;
case 1:
Intent intent = new Intent(Translate.this, Settings.class);
intent.putExtras(mShownLanguages);
startSubActivity(intent, SETTINGS);
break;
} // switch
return true;
}
A real word example X
Call an other Activity

Start an Activity

@Override
public boolean onOptionsItemSelected(Menu.Item item) {
switch (item.getId()) {
case 0:
showLogin();
break;
case 1:
Intent intent = new Intent(Translate.this, Settings.class);
intent.putExtras(mShownLanguages);
startSubActivity(intent, SETTINGS);
break;
} // switch
Pass data to
return true;
}

new Activity
A real word example XI
Store user data

@Override
protected void onPause() {
Persistent store
super.onPause();
SharedPreferences.Editor ed = mPrefs.edit();
for(int i = 0; i < SUPPORTED_LANGUAGES.length; i++) {
ed.putBoolean(SUPPORTED_LANGUAGES[i],
mShownLanguages.getBoolean(SUPPORTED_LANGUAGES[i]));
}
ed.commit();
}
A real word example XII
Store user data
 Preferences
 Database
 Files

 Content provider
 Network
Life cycle
 Life cycle not directly controlled by application
 System can kill an application to free up
memory

 Controll through onCreate(), onPause(),
onStop() ... methods
 Android has different types of processes,
visible processes, service processes,
background processes ...

 Services can be used for long-lived
background processes
Trends I
 Eyes-free user interfaces
 Other user interfaces like tones, vibrant alarm,
sensors, actuators
 Leverage hearing and touch
 Camera input


Ubiquitous computing technologies
Trends II
 Speech recognition
 Accelerometer
 Magnetic compass
 Location self-awareness


Locating others



Sensing the environment
Findings
 Android uses proven technology like Java,
XML and Linux
 It offers a rich API for application development
 There is an initial learning effort
 Android doesn‘t have many of the limitations
other mobile platforms have
 Trend towards eyes-free user interfaces
Some figures
 Q4 2007 more than 3 billion mobile subscribers
(world population 6.7 billion)
 1.14 billion handsets delivered in 2007
(computers 271.2 million)

 118 million where smart phones
 Currently more than 30 mobile platforms
 Symbian leads with 65% share, ahead of
Microsoft on 12%, RIM on 11%, Apple on 7%, and
Linux at 5%
Thank you for the attention

Questions?

Find out more at:
http://code.google.com/android

More Related Content

What's hot

Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVP
Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVPMicrosoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVP
Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVPGilbok Lee
 
Android architecture
Android architecture Android architecture
Android architecture Trong-An Bui
 
What is Android?
What is Android?What is Android?
What is Android?ndalban
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfacesC.o. Nieto
 
The Glass Class - Tutorial 3 - Android and GDK
The Glass Class - Tutorial 3 - Android and GDKThe Glass Class - Tutorial 3 - Android and GDK
The Glass Class - Tutorial 3 - Android and GDKGun Lee
 
Android application development the basics (2)
Android application development the basics (2)Android application development the basics (2)
Android application development the basics (2)Aliyu Olalekan
 
Android Tutorial
Android TutorialAndroid Tutorial
Android TutorialFun2Do Labs
 
Five android architecture
Five android architectureFive android architecture
Five android architectureTomislav Homan
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebPatrick Chanezon
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A NutshellTed Chien
 
Open social 2.0 sandbox ee and breaking out of the gadget box
Open social 2.0 sandbox  ee and breaking out of the gadget boxOpen social 2.0 sandbox  ee and breaking out of the gadget box
Open social 2.0 sandbox ee and breaking out of the gadget boxRyan Baxter
 
Introduction to Android Fragments
Introduction to Android FragmentsIntroduction to Android Fragments
Introduction to Android FragmentsSergi Martínez
 
Android Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestAndroid Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestDenis Minja
 

What's hot (20)

Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVP
Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVPMicrosoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVP
Microsoft MVP ComCamp 2014 발표자료 / 윈도우 8.1 앱개발 새로운 API들 / 이길복, 주신영 MVP
 
Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
Android architecture
Android architecture Android architecture
Android architecture
 
What is Android?
What is Android?What is Android?
What is Android?
 
Android Components
Android ComponentsAndroid Components
Android Components
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfaces
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android
AndroidAndroid
Android
 
Android overview
Android overviewAndroid overview
Android overview
 
Android 3
Android 3Android 3
Android 3
 
The Glass Class - Tutorial 3 - Android and GDK
The Glass Class - Tutorial 3 - Android and GDKThe Glass Class - Tutorial 3 - Android and GDK
The Glass Class - Tutorial 3 - Android and GDK
 
Android application development the basics (2)
Android application development the basics (2)Android application development the basics (2)
Android application development the basics (2)
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
 
Five android architecture
Five android architectureFive android architecture
Five android architecture
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
 
Open social 2.0 sandbox ee and breaking out of the gadget box
Open social 2.0 sandbox  ee and breaking out of the gadget boxOpen social 2.0 sandbox  ee and breaking out of the gadget box
Open social 2.0 sandbox ee and breaking out of the gadget box
 
Introduction to Android Fragments
Introduction to Android FragmentsIntroduction to Android Fragments
Introduction to Android Fragments
 
Android Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestAndroid Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifest
 
Android Application Fundamentals.
Android Application Fundamentals.Android Application Fundamentals.
Android Application Fundamentals.
 

Similar to Android gui framework

Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recieversUtkarsh Mankad
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectJoemarie Amparo
 
Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1Amit Saxena
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android ProgrammingRaveendra R
 
Synapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldSynapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldTarunsingh198
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentAly Abdelkareem
 
Android Development for Beginners with Sample Project - Day 1
Android Development for Beginners with Sample Project - Day 1Android Development for Beginners with Sample Project - Day 1
Android Development for Beginners with Sample Project - Day 1Joemarie Amparo
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android AppsGil Irizarry
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development PracticesRoy Clarkson
 
ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)Kenji Sakashita
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologiesjerry vasoya
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdfImranS18
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidDenis Minja
 

Similar to Android gui framework (20)

Android TCJUG
Android TCJUGAndroid TCJUG
Android TCJUG
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
Android Intro
Android IntroAndroid Intro
Android Intro
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample Project
 
Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1Android Tutorial For Beginners Part-1
Android Tutorial For Beginners Part-1
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android Programming
 
Synapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldSynapseindia android apps introduction hello world
Synapseindia android apps introduction hello world
 
Android
AndroidAndroid
Android
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android Minnebar
Android MinnebarAndroid Minnebar
Android Minnebar
 
Android Development for Beginners with Sample Project - Day 1
Android Development for Beginners with Sample Project - Day 1Android Development for Beginners with Sample Project - Day 1
Android Development for Beginners with Sample Project - Day 1
 
Android
AndroidAndroid
Android
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
 
ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologies
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdf
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_android
 
Compose In Practice
Compose In PracticeCompose In Practice
Compose In Practice
 

More from Sri Harsha Pamu

Lec23-CS110 Computational Engineering
Lec23-CS110 Computational EngineeringLec23-CS110 Computational Engineering
Lec23-CS110 Computational EngineeringSri Harsha Pamu
 
Lec21-CS110 Computational Engineering
Lec21-CS110 Computational EngineeringLec21-CS110 Computational Engineering
Lec21-CS110 Computational EngineeringSri Harsha Pamu
 
Lec19-CS110 Computational Engineering
Lec19-CS110 Computational EngineeringLec19-CS110 Computational Engineering
Lec19-CS110 Computational EngineeringSri Harsha Pamu
 
Lec16-CS110 Computational Engineering
Lec16-CS110 Computational EngineeringLec16-CS110 Computational Engineering
Lec16-CS110 Computational EngineeringSri Harsha Pamu
 
Lec15-CS110 Computational Engineering
Lec15-CS110 Computational EngineeringLec15-CS110 Computational Engineering
Lec15-CS110 Computational EngineeringSri Harsha Pamu
 
Lec14-CS110 Computational Engineering
Lec14-CS110 Computational EngineeringLec14-CS110 Computational Engineering
Lec14-CS110 Computational EngineeringSri Harsha Pamu
 
Lec12-CS110 Computational Engineering
Lec12-CS110 Computational EngineeringLec12-CS110 Computational Engineering
Lec12-CS110 Computational EngineeringSri Harsha Pamu
 
Lec10-CS110 Computational Engineering
Lec10-CS110 Computational EngineeringLec10-CS110 Computational Engineering
Lec10-CS110 Computational EngineeringSri Harsha Pamu
 
Lec09-CS110 Computational Engineering
Lec09-CS110 Computational EngineeringLec09-CS110 Computational Engineering
Lec09-CS110 Computational EngineeringSri Harsha Pamu
 
Lec08-CS110 Computational Engineering
Lec08-CS110 Computational EngineeringLec08-CS110 Computational Engineering
Lec08-CS110 Computational EngineeringSri Harsha Pamu
 
Lec07-CS110 Computational Engineering
Lec07-CS110 Computational EngineeringLec07-CS110 Computational Engineering
Lec07-CS110 Computational EngineeringSri Harsha Pamu
 
Lec06-CS110 Computational Engineering
Lec06-CS110 Computational EngineeringLec06-CS110 Computational Engineering
Lec06-CS110 Computational EngineeringSri Harsha Pamu
 
Lec04-CS110 Computational Engineering
Lec04-CS110 Computational EngineeringLec04-CS110 Computational Engineering
Lec04-CS110 Computational EngineeringSri Harsha Pamu
 
Lec03-CS110 Computational Engineering
Lec03-CS110 Computational EngineeringLec03-CS110 Computational Engineering
Lec03-CS110 Computational EngineeringSri Harsha Pamu
 
Lec02-CS110 Computational Engineering
Lec02-CS110 Computational EngineeringLec02-CS110 Computational Engineering
Lec02-CS110 Computational EngineeringSri Harsha Pamu
 
Lec01-CS110 Computational Engineering
Lec01-CS110 Computational EngineeringLec01-CS110 Computational Engineering
Lec01-CS110 Computational EngineeringSri Harsha Pamu
 
Lec1- CS110 Computational Engineering
Lec1- CS110 Computational EngineeringLec1- CS110 Computational Engineering
Lec1- CS110 Computational EngineeringSri Harsha Pamu
 
Lec25-CS110 Computational Engineering
Lec25-CS110 Computational EngineeringLec25-CS110 Computational Engineering
Lec25-CS110 Computational EngineeringSri Harsha Pamu
 

More from Sri Harsha Pamu (20)

Lec23-CS110 Computational Engineering
Lec23-CS110 Computational EngineeringLec23-CS110 Computational Engineering
Lec23-CS110 Computational Engineering
 
Lec21-CS110 Computational Engineering
Lec21-CS110 Computational EngineeringLec21-CS110 Computational Engineering
Lec21-CS110 Computational Engineering
 
Lec19-CS110 Computational Engineering
Lec19-CS110 Computational EngineeringLec19-CS110 Computational Engineering
Lec19-CS110 Computational Engineering
 
Lec16-CS110 Computational Engineering
Lec16-CS110 Computational EngineeringLec16-CS110 Computational Engineering
Lec16-CS110 Computational Engineering
 
Lec15-CS110 Computational Engineering
Lec15-CS110 Computational EngineeringLec15-CS110 Computational Engineering
Lec15-CS110 Computational Engineering
 
Lec14-CS110 Computational Engineering
Lec14-CS110 Computational EngineeringLec14-CS110 Computational Engineering
Lec14-CS110 Computational Engineering
 
Lec13
Lec13Lec13
Lec13
 
Lec12-CS110 Computational Engineering
Lec12-CS110 Computational EngineeringLec12-CS110 Computational Engineering
Lec12-CS110 Computational Engineering
 
Lec10-CS110 Computational Engineering
Lec10-CS110 Computational EngineeringLec10-CS110 Computational Engineering
Lec10-CS110 Computational Engineering
 
Lec09-CS110 Computational Engineering
Lec09-CS110 Computational EngineeringLec09-CS110 Computational Engineering
Lec09-CS110 Computational Engineering
 
Lec08-CS110 Computational Engineering
Lec08-CS110 Computational EngineeringLec08-CS110 Computational Engineering
Lec08-CS110 Computational Engineering
 
Lec07-CS110 Computational Engineering
Lec07-CS110 Computational EngineeringLec07-CS110 Computational Engineering
Lec07-CS110 Computational Engineering
 
Lec06-CS110 Computational Engineering
Lec06-CS110 Computational EngineeringLec06-CS110 Computational Engineering
Lec06-CS110 Computational Engineering
 
Lec04-CS110 Computational Engineering
Lec04-CS110 Computational EngineeringLec04-CS110 Computational Engineering
Lec04-CS110 Computational Engineering
 
Lec03-CS110 Computational Engineering
Lec03-CS110 Computational EngineeringLec03-CS110 Computational Engineering
Lec03-CS110 Computational Engineering
 
Lec02-CS110 Computational Engineering
Lec02-CS110 Computational EngineeringLec02-CS110 Computational Engineering
Lec02-CS110 Computational Engineering
 
Lec01-CS110 Computational Engineering
Lec01-CS110 Computational EngineeringLec01-CS110 Computational Engineering
Lec01-CS110 Computational Engineering
 
Lec1- CS110 Computational Engineering
Lec1- CS110 Computational EngineeringLec1- CS110 Computational Engineering
Lec1- CS110 Computational Engineering
 
Lec25-CS110 Computational Engineering
Lec25-CS110 Computational EngineeringLec25-CS110 Computational Engineering
Lec25-CS110 Computational Engineering
 
Android..imp google
Android..imp googleAndroid..imp google
Android..imp google
 

Recently uploaded

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Recently uploaded (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Android gui framework

  • 1. The Android GUI Framework Android experience day December 2008 Markus Pilz Peter Wlodarczak
  • 2. Agenda 1. Introduction 2. Anatomy 3. A real word example 4. Life cycle 5. Trends 6. Findings
  • 3. Why Android  Android was designed as a platform for software development  Android is open  Android is free  Community support  Tool support
  • 5. Anatomy I  Android is Linux based  GUI is fully written in Java  Java 1.5 support  Widget toolkit  XML based GUI  Single Touch screen
  • 6. Anatomy II  Activity  Intent, IntentFilter, IntertReceiver  View  Service  Content provider
  • 7. Anatomy III  Storage  AIDL  Security  Life cycle management  Native calls (not officially)  NLS support
  • 8. A real word example I  A translator for Android  If you are in a country where no one understands your language  You cannot read anything  You have your mobile phone always with you  No additional device needed
  • 9. A real word example II  Uses the Google translator  Uses XMPP for data transmission  Can be extended with new languages  Adaptive GUI  GUI fully defined in XML
  • 10. A real word example III Lets see it
  • 11. A real word example IV  Used Eclipse for development  ANT script and make for build  Uses persistence of user data  Uses touch screen and keyboard input
  • 12. A real word example V The AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.greenliff.translator"> <application android:icon="@drawable/logo"> <activity android:label="@string/settings" android:name="Settings"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> <activity android:label="@string/app_name" android:name="Translate"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:label="@string/ocr" android:name="OCR"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> </application> </manifest>
  • 13. A real word example V The AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.greenliff.translator"> <application android:icon="@drawable/logo"> <activity android:label="@string/settings" android:name="Settings"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> <activity android:label="@string/app_name" android:name="Translate"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:label="@string/ocr" android:name="OCR"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> </application> </manifest>
  • 14. A real word example V The AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.greenliff.translator"> <application android:icon="@drawable/logo"> <activity android:label="@string/settings" android:name="Settings"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> <activity android:label="@string/app_name" android:name="Translate"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:label="@string/ocr" android:name="OCR"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> </application> </manifest> Launch
  • 15. A real word example VI The AndroidManifest.xml  Used for security  Define permissions, e. g. <uses-permission android:name="android.permission.RECEIVE_SMS" />  Give other Activities access
  • 16. A real word example VII An XML snipped of the main Activity <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="vertical"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linLayout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:layout_width="fill_parent" Text reference android:layout_height="wrap_content" android:background="@drawable/blue" android:text="@string/translate_to_1"/> <EditText android:id="@+id/toTranslate" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:drawable/editbox_background" android:layout_below="@id/linLayout“ android:hint="Type here..." /> .....
  • 17. A real word example VII An XML snipped of the main Activity <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="vertical"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linLayout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:layout_width="fill_parent" Text reference android:layout_height="wrap_content" android:background="@drawable/blue" android:text="@string/translate_to_1"/> <EditText android:id="@+id/toTranslate" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:drawable/editbox_background" android:layout_below="@id/linLayout“ android:hint="Type here..." /> .....
  • 18. A real word example VIII  Could also be developed purely in Java  XML cannot be debugged  Not all the attributes can be defined in XML
  • 19. A real word example IX A code snipped of the Translate Activity @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Window wp = getWindow(); mContext = wp.getContext(); setTheme(android.R.style.Theme_Light); setContentView(R.layout.main); mLayout = (LinearLayout) this.findViewById(R.id.linLayout); mToTranslate = (EditText) this.findViewById(R.id.toTranslate); setShowLanguages(); mEnge = (LinearLayout) this.findViewById(R.id.enge); LANGUAGE_LAYOUT[0] = mEnge; de2en = (Button) this.findViewById(R.id.de2en); de2en.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if(!connect()) { notLoggedInAlert(); } else { doConnect("de2en@bot.talk.google.com"); rearrange(mEnge); } } }); ....
  • 20. A real word example IX A code snipped of the Translate Activity Set layout @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Window wp = getWindow(); mContext = wp.getContext(); setTheme(android.R.style.Theme_Light); setContentView(R.layout.main); mLayout = (LinearLayout) this.findViewById(R.id.linLayout); mToTranslate = (EditText) this.findViewById(R.id.toTranslate); setShowLanguages(); mEnge = (LinearLayout) this.findViewById(R.id.enge); LANGUAGE_LAYOUT[0] = mEnge; de2en = (Button) this.findViewById(R.id.de2en); de2en.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if(!connect()) { notLoggedInAlert(); } else { doConnect("de2en@bot.talk.google.com"); rearrange(mEnge); } } }); ....
  • 21. A real word example IX A code snipped of the Translate Activity Set layout @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Find Window wp = getWindow(); mContext = wp.getContext(); setTheme(android.R.style.Theme_Light); setContentView(R.layout.main); mLayout = (LinearLayout) this.findViewById(R.id.linLayout); mToTranslate = (EditText) this.findViewById(R.id.toTranslate); setShowLanguages(); mEnge = (LinearLayout) this.findViewById(R.id.enge); LANGUAGE_LAYOUT[0] = mEnge; de2en = (Button) this.findViewById(R.id.de2en); de2en.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if(!connect()) { notLoggedInAlert(); } else { doConnect("de2en@bot.talk.google.com"); rearrange(mEnge); } } }); .... elements
  • 22. A real word example IX A code snipped of the Translate Activity Set layout @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Find Window wp = getWindow(); mContext = wp.getContext(); setTheme(android.R.style.Theme_Light); setContentView(R.layout.main); mLayout = (LinearLayout) this.findViewById(R.id.linLayout); mToTranslate = (EditText) this.findViewById(R.id.toTranslate); setShowLanguages(); mEnge = (LinearLayout) this.findViewById(R.id.enge); LANGUAGE_LAYOUT[0] = mEnge; de2en = (Button) this.findViewById(R.id.de2en); de2en.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if(!connect()) { notLoggedInAlert(); } else { doConnect("de2en@bot.talk.google.com"); rearrange(mEnge); } } }); Add behavior .... elements
  • 23. A real word example X Call an other Activity @Override public boolean onOptionsItemSelected(Menu.Item item) { switch (item.getId()) { case 0: showLogin(); break; case 1: Intent intent = new Intent(Translate.this, Settings.class); intent.putExtras(mShownLanguages); startSubActivity(intent, SETTINGS); break; } // switch return true; }
  • 24. A real word example X Call an other Activity Start an Activity @Override public boolean onOptionsItemSelected(Menu.Item item) { switch (item.getId()) { case 0: showLogin(); break; case 1: Intent intent = new Intent(Translate.this, Settings.class); intent.putExtras(mShownLanguages); startSubActivity(intent, SETTINGS); break; } // switch return true; }
  • 25. A real word example X Call an other Activity Start an Activity @Override public boolean onOptionsItemSelected(Menu.Item item) { switch (item.getId()) { case 0: showLogin(); break; case 1: Intent intent = new Intent(Translate.this, Settings.class); intent.putExtras(mShownLanguages); startSubActivity(intent, SETTINGS); break; } // switch Pass data to return true; } new Activity
  • 26. A real word example XI Store user data @Override protected void onPause() { Persistent store super.onPause(); SharedPreferences.Editor ed = mPrefs.edit(); for(int i = 0; i < SUPPORTED_LANGUAGES.length; i++) { ed.putBoolean(SUPPORTED_LANGUAGES[i], mShownLanguages.getBoolean(SUPPORTED_LANGUAGES[i])); } ed.commit(); }
  • 27. A real word example XII Store user data  Preferences  Database  Files  Content provider  Network
  • 28. Life cycle  Life cycle not directly controlled by application  System can kill an application to free up memory  Controll through onCreate(), onPause(), onStop() ... methods  Android has different types of processes, visible processes, service processes, background processes ...  Services can be used for long-lived background processes
  • 29. Trends I  Eyes-free user interfaces  Other user interfaces like tones, vibrant alarm, sensors, actuators  Leverage hearing and touch  Camera input  Ubiquitous computing technologies
  • 30. Trends II  Speech recognition  Accelerometer  Magnetic compass  Location self-awareness  Locating others  Sensing the environment
  • 31. Findings  Android uses proven technology like Java, XML and Linux  It offers a rich API for application development  There is an initial learning effort  Android doesn‘t have many of the limitations other mobile platforms have  Trend towards eyes-free user interfaces
  • 32. Some figures  Q4 2007 more than 3 billion mobile subscribers (world population 6.7 billion)  1.14 billion handsets delivered in 2007 (computers 271.2 million)  118 million where smart phones  Currently more than 30 mobile platforms  Symbian leads with 65% share, ahead of Microsoft on 12%, RIM on 11%, Apple on 7%, and Linux at 5%
  • 33. Thank you for the attention Questions? Find out more at: http://code.google.com/android