Android UI System

1,050 views 17 slides Dec 08, 2015
Slide 1
Slide 1 of 17
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17

About This Presentation

Introduce Android UI System in Framework layer


Slide Content

Android's GUI system and experience
sharing
John Lu
2012/04/13

Agenda

Android GUI System architecture

Review: Service and Binder

How to start a application

Draw the application's view

SurfaceView for application's state

Experience sharing

Android GUI System architecture

Android GUI System architecture

Android GUI System architecture
Example

Review: Service and Binder

SDK-Service and Kernel-Service

Android's IPC: Binder

How to start a application

ActivityManagerService to start a applictation
process and start Activity.

When Application start that mean a Activity
start.

How to start a application
Start Process

How to start a application

A ActivityThread attach to ActivityManagerService.

From ActivityManagerService to start Activity.

Draw the application's view

SetContentView() in Activity.onCreate().

When create the surface?

When to draw our application view.

Surface for application's state

Surface's life is control by WindowManagerService.

Application's state will relate to surface.

Draw the application's view

Surface for application's state
WindowManagerService::relayoutWindow()
{

Surface = win.createSurfaceLocked();
// win is WindowState that create in WidowSession.add()

}

Surface for application's state
SurfaceSession

Experience sharing

AsyncTask dosen't work (Unidentified reason).

Dynamic Broadcast Receiver register and
unregister in Activity.

Surface used between in Create and Destroy.

Split the file in Assets if file over 1MByte.

Except the construct view object always work
between in onStart and onStop.

Experience sharing

onItemClick(AdapterView adapter, View
v, int position, int id), id is you need.

Dialog dismiss

Android Developers is your best friend
like Google. (e.g., Dev Guide, Resource,
etc.)

Summary

Android application manager is
ActivityManagerService.

Application GUI manager is
WindowManagerService.

View create need to before Activity resume.

Surface running between be created and
be destroyed.