Customizing Android's UI - ELinux

7m ago
7 Views
1 Downloads
648.16 KB
27 Pages
Last View : 3m ago
Last Download : 3m ago
Upload by : Tripp Mcmullen
Transcription

Customizing Android's UI Android Builders Summit 2015 Karim Yaghmour @karimyaghmour karim.yaghmour@opersys.com 1

These slides are made available to you under a Creative Commons ShareAlike 3.0 license. The full terms of this license are here: https://creativecommons.org/licenses/by-sa/3.0/ Delivered and/or customized by Attribution requirements and misc., PLEASE READ: This slide must remain as-is in this specific location (slide #2), everything else you are free to change; including the logo :-) Use of figures in other documents must feature the below “Originals at” URL immediately under that figure and the below copyright notice where appropriate. You are free to fill in the “Delivered and/or customized by” space on the right as you see fit. You are FORBIDEN from using the default “About” slide as-is or any of its contents. You are FORBIDEN from using any content provided by 3rd parties without the EXPLICIT consent from those parties. (C) Copyright 2013-2015, Opersys inc. These slides created by: Karim Yaghmour Originals at: www.opersys.com/community/docs 2

About Author of: Introduced Linux Trace Toolkit in 1999 Originated Adeos and relayfs (kernel/relay.c) Ara Android Arch Oversight Training, Custom Dev, Consulting, . 3

Agenda Architecture Launcher App System UI Kiosk App Screen Overlays Theming Boot Animation Other UI Elements References 4

1. Architecture Android Architecture Display Hardware Classic Linux Display Stack Display stack in Android HAL defininition HAL module Surface Flinger Window Manager 5

6

1.2. Display Hardware MMU IOMMU 7

1.3. Classic Linux display stack 8

1.4. Display stack in Android 9

10

1.5. HAL Definition h struct hwc procs: invalidate() vsync() struct hwc composer device: prepare() set() dump() registerProcs() query() *() 11

1.6. HAL module Skeleton /hardware/libhardware/modules/hwcomposer.cpp /system/lib/hw/hwcomposer.BOARD.so /system/lib/hw/gralloc.BOARD.so Ex. - Mot Xoom: hwcomposer.tegra.so gralloc.tegra.so Surface Flinger hook: Hardware – – HWComposer.cpp Provides fake vsync if none is provided in HW 12

1.7. Surface Flinger Actual server: Client side: /frameworks/native/services/surfaceflinger /frameworks/native/libs/gui Client / Server interface: ISurfaceComposerClient.cpp ISurfaceComposer.cpp This is NOT an aidl'ed service All communication is manually marshalled/unmarshalled 13

1.8. Window Manager Server side: wm/ – – Client side: /frameworks/base/core/java/android/view/ – – – WindowManagerService.java Session.java WindowManager.java WindowManagerImpl.java ViewRootImpl.java Interfaces: IWindowManager.aidl IWindowSession.aidl Parameters (incl. z-order): See WindowManager.java 14

2. Launcher This the “Home” App Compiled as part of AOSP See /packages/app/Launcher2 There's actually a real “Home” App: – development/samples/Home Android.mk: LOCAL OVERRIDES PACKAGES : Home 15

AndroidManifest.xml: activity . intent-filter action android:name "android.intent.action.MAIN" / category android:name "android.intent.category.HOME" / . At least two ways for it to be triggered: Activity Manager sends android.intent.category.HOME intent at startup Clicking on the “Home” button What this app DOESN'T do: Use any of the hidden APIs (LOCAL SDK VERSION : current) Be signed by the platform key (LOCAL CERTIFICATE : shared) Be persistent 16

3. System UI Comprises: Status Bar Navigation Bar Screen Shot Load Average Service Wallpaper Recent Activities USB settings A unique app See /frameworks/base/packages/SystemUI Connects to Status Bar Manager and gives an interface it can use to call back into Status Bar 17

4. Kiosk App Just replace the Launcher/Home with your home Implement an activity that catches: android.intent.category.HOME You may want to disable the status bar 18

5. Screen Overlays You can talk to the Window Manager directly Have it add a View above the current display Example: Load Average service in SystemUI 19

6. Theming Nothing really different from regular resources More art than programming See frameworks/base/core/res/res Generates /system/framework/framework-res.apk Lots of theming mods out there show how to manipulate this apk. But since you've got the sources . Examples: https://github.com/elelinux/HTC.Elegance https://github.com/nadeemsultan/HolofiedCM11Theme 20

More resources on Theming: -basic-rom-theming me-customization/ http://www.vogella.com/tutorials/AndroidStyles Themes/article.html http://www.phonesdevelopers.com/1717751/ 21

7. Boot animation Started by Surface Flinger “bootanim” binary /frameworks/base/cmds/bootanimation Relies on bootanimation.zip w/ PNGs (nothing but) See https://github.com/CyanogenMod/android vendor cm/tree/jellybean/pre built/common/bootanimation Must contain a desc.txt: width height fps p count pause path p count pause path 22

8. Other UI Elements Wallpaper Manager Service Notification Service App Widgets 23

8.1. Wallpaper Manager Service See /frameworks/base/services/java/com/android/se rver/WallpaperManagerService.java 24

8.2. Notification Service Toasts Status bar notifications Gets handle to Status Bar Service at instantiation Uses handle to communicate with Status Bar 25

8.3. App Widgets See /frameworks/base/services/java/com/android/se rver/AppWidgetService.java 26

Thank you . karim.yaghmour@opersys.com 27

16 AndroidManifest.xml: activity. intent-filter action android:name "android.intent.action.MAIN" / category android:name "android.intent.category.HOME" / . At least two ways for it to be triggered: Activity Manager sends android.intent.category.HOME intent at startup Clicking on the "Home" button What this app DOESN'T do: Use any of the hidden APIs (LOCAL_SDK_VERSION : current)

Related Documents:

2010 - May: Android 2.2 / Froyo 2010 - Dec: Android 2.3 / Gingerbread 2011 - Jan : Android 3.0 / Honeycomb - Tablet-optimized 2011 - May: Android 3.1 - USB host support 2011 - Nov: Android 4.0 / Ice-Cream Sandwich - merge Gingerbread and Honeycomb 2012 - Jun: Android 4.1 / Jelly Bean - Platform Optimization

Choosing custom touch functions 27 CUSTOMIZING INTUOS PRO 28 Customizing the pen 29 Adjusting tip feel and double-click 30 Adjusting eraser feel 31 Advanced tip and eraser pressure settings 31 Customizing tool buttons 32 Customizing the ExpressKeys 33 Customizing the Touch Ring 34 Tablet to screen mapping 35 Portion of screen area 37

Android Studio IDE Android SDK tool Latest Android API Platform - Android 6.0 (Marshmallow) Latest Android API emulator system image - Android 6.0 Android Studio is multi-platform Windows, MAC, Linux Advanced GUI preview panel See what your app looks like in different devices Development environment Android Studio 9

Android is not Linux (i.e. Uses own libraries, tools, ) Android is a complete stack on top of the Linux kernel Software Platform versus OS Android is an application framework on top of Linux facilitating rapid deployment in many domains Android is the enabler for a broad application developer base Android is Open .

SAP – Customizing Guide printed by Ahmad Rizki 1 of 341 SAP – Customizing Guide SAP Customizing - Table of Contents 1. General Setting 10 1.1. Set Countries 10 1.1.1. Define Countries 10 1.1.2. Set country–specific checks 12 1.1.3. Insert regions 13 1.2. Set Currencies 15 1.2.1. Check c

ADT (Android Development Tool) bundle or ! Eclipse ADT plug-in Android SDK or ! Android studio ! Download earlier SDK versions using SDK manager if needed . Android Virtual Device (AVD) ! Android emulator allows . Android App Essentials ! Layout ! View objects: UI widgets such as buttons, text box etc. .

Android Development Tools ADT A plug-in for Eclipse (see Eclipse) to develop Android applications. Android Operating system for smartphones. Android Market The Android distribution service of mobile applications. Android Lifecycle A model Android uses to handle the lifecycle of an activity in applications.

2.1 ASTM Standards:2 C165 Test Method for Measuring Compressive Properties of Thermal Insulations C203 Test Methods for Breaking Load and Flexural Proper-ties of Block-Type Thermal Insulation C303 Test Method for Dimensions and Density of Pre-formed Block and Board–Type Thermal Insulation C390 Practice for Sampling and Acceptance of Thermal Insulation Lots C578 Specification for Rigid .