This document discusses creating custom views in Android. It covers default views provided by Android, reasons for creating custom views, the responsibilities of views, and how to create custom views by extending the View class and implementing key methods like onDraw(), onMeasure(), and onLayout(). It also discusses compound views, view lifecycles, defining custom attributes, and using custom views in layout files.
ConstraintLayout is a new layout supported by Google that allows creating complex layouts with flat view hierarchies using constraints. It measures and positions views during the measure-layout-draw cycle. ConstraintLayout solves performance issues of other layouts like nested weighted LinearLayouts and RelativeLayouts. It uses anchors and constraints to position views, and has tools in the visual editor to design and infer constraints. ConstraintLayout aims to create efficient UIs with scalability and flatten view hierarchies for animations.
Journey of an event, the android touch - Marco Cova, FacebookDroidConTLV
This document summarizes the journey of a touch event in an Android application. It begins at the Activity level and travels through various views and view groups as it is dispatched and handled. Key methods involved include dispatchTouchEvent(), onInterceptTouchEvent(), and onTouchEvent(). It also provides an overview of touch event types like ACTION_DOWN and ACTION_MOVE as well as techniques for handling multi-touch events and touch delegates.
This document outlines an introduction to the Android window system presented by Chia-I Wu. It covers the basic building blocks of SurfaceManager, WindowManager, and ActivityManager. It discusses concepts under the hood like process view, zygote, and binder. It also provides guidance on development tools and code areas relevant to understanding the window system.
This document discusses creating custom views in Android. It covers default views provided by Android, reasons for creating custom views, the responsibilities of views, and how to create custom views by extending the View class and implementing key methods like onDraw(), onMeasure(), and onLayout(). It also discusses compound views, view lifecycles, defining custom attributes, and using custom views in layout files.
ConstraintLayout is a new layout supported by Google that allows creating complex layouts with flat view hierarchies using constraints. It measures and positions views during the measure-layout-draw cycle. ConstraintLayout solves performance issues of other layouts like nested weighted LinearLayouts and RelativeLayouts. It uses anchors and constraints to position views, and has tools in the visual editor to design and infer constraints. ConstraintLayout aims to create efficient UIs with scalability and flatten view hierarchies for animations.
Journey of an event, the android touch - Marco Cova, FacebookDroidConTLV
This document summarizes the journey of a touch event in an Android application. It begins at the Activity level and travels through various views and view groups as it is dispatched and handled. Key methods involved include dispatchTouchEvent(), onInterceptTouchEvent(), and onTouchEvent(). It also provides an overview of touch event types like ACTION_DOWN and ACTION_MOVE as well as techniques for handling multi-touch events and touch delegates.
This document outlines an introduction to the Android window system presented by Chia-I Wu. It covers the basic building blocks of SurfaceManager, WindowManager, and ActivityManager. It discusses concepts under the hood like process view, zygote, and binder. It also provides guidance on development tools and code areas relevant to understanding the window system.
Acrhitecture deisign pattern_MVC_MVP_MVVMDong-Ho Lee
Look over MVC, MVP, MVVM pattern in android.
and introduce android data binding library.
You can follow this with simple project.
https://github.com/withleedh/patternChat
References
https://realm.io/kr/news/eric-maxwell-mvc-mvp-and-mvvm-on-android/
This document discusses implementing Android design principles in custom views. It begins by outlining principles like "Never lose my stuff" and "Only show what I need when I need it". It then provides examples of implementing these in custom views, such as using a NavigationDrawer or animations. It discusses different types of custom views like compound views that extend existing views. The document also covers performance optimization techniques for custom views like using Canvas versus extending a ViewGroup. Finally, it suggests ideas for implementing the principle of giving "tricks that work everywhere", such as touch gestures.
1. Understanding Android Events
2. Event Listeners and Callback Methods
2.1 onClick()
2.2 onLongClick()
2.3 onFocusChange()
2.4 onKey()
2.5 onTouch()
2.6 Using a separate Listener class
2.7 Using a Named Inner Class for Event Handling
2.8 Handling Events by Having Main Activity Implement Listener Interface
2.9 Handling Events by Specifying the Event Handler Method in main.xml
2.10 Handling Events by Specifying the Event Handler Method in main.xml(cont.)
3. Exercise 5
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveBin Chen
SurfaceFlinger is a vital system service in Android system, responsible for the composting all the application and system layer and displaying them. In this slide,we looked in detail how surfaceFlinger was designed from Design Pattern's perspective.
The document provides an overview of the Android graphics subsystem and related components:
- It describes the main components of the graphics subsystem including SurfaceFlinger, Window Manager, and Activity Manager.
- It discusses graphics concepts such as surfaces, layers, and composition.
- It provides details on the use of OpenGL and hardware acceleration in Android.
- It summarizes the roles of various graphics libraries and interfaces like Skia, PixelFlinger, and Gralloc.
Android Data Binding in action using MVVM pattern - droidconUKFabio Collini
The document discusses Android Data Binding and the Model-View-ViewModel (MVVM) pattern. It covers the basics of data binding, using custom attributes with data binding, creating reusable UI components with data binding, implementing two-way data binding, and using data binding with RxJava and the MVVM pattern. The speaker presents code examples for setting up data binding in layout XML files and Java code, and binding data to views while ensuring automatic updates when the data changes.
Data Binding in Action using MVVM patternFabio Collini
The Data Binding framework was one of Google’s announcements at I/O 2015, it’s a big change in the code organization of an Android app. Some developers are sceptical about this framework but, if used in the “right way”, it’s very powerful and it allows to remove a lot of redundant boilerplate code from activities and fragments.
In this talk we’ll start from the Data Binding basic concepts and then we’ll see how to use it to improve the architecture of a typical Android application applying the Model View ViewModel pattern. Using this pattern you need to write less code to create an app that can be easily tested using JVM and instrumentation tests.
Acrhitecture deisign pattern_MVC_MVP_MVVMDong-Ho Lee
Look over MVC, MVP, MVVM pattern in android.
and introduce android data binding library.
You can follow this with simple project.
https://github.com/withleedh/patternChat
References
https://realm.io/kr/news/eric-maxwell-mvc-mvp-and-mvvm-on-android/
This document discusses implementing Android design principles in custom views. It begins by outlining principles like "Never lose my stuff" and "Only show what I need when I need it". It then provides examples of implementing these in custom views, such as using a NavigationDrawer or animations. It discusses different types of custom views like compound views that extend existing views. The document also covers performance optimization techniques for custom views like using Canvas versus extending a ViewGroup. Finally, it suggests ideas for implementing the principle of giving "tricks that work everywhere", such as touch gestures.
1. Understanding Android Events
2. Event Listeners and Callback Methods
2.1 onClick()
2.2 onLongClick()
2.3 onFocusChange()
2.4 onKey()
2.5 onTouch()
2.6 Using a separate Listener class
2.7 Using a Named Inner Class for Event Handling
2.8 Handling Events by Having Main Activity Implement Listener Interface
2.9 Handling Events by Specifying the Event Handler Method in main.xml
2.10 Handling Events by Specifying the Event Handler Method in main.xml(cont.)
3. Exercise 5
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveBin Chen
SurfaceFlinger is a vital system service in Android system, responsible for the composting all the application and system layer and displaying them. In this slide,we looked in detail how surfaceFlinger was designed from Design Pattern's perspective.
The document provides an overview of the Android graphics subsystem and related components:
- It describes the main components of the graphics subsystem including SurfaceFlinger, Window Manager, and Activity Manager.
- It discusses graphics concepts such as surfaces, layers, and composition.
- It provides details on the use of OpenGL and hardware acceleration in Android.
- It summarizes the roles of various graphics libraries and interfaces like Skia, PixelFlinger, and Gralloc.
Android Data Binding in action using MVVM pattern - droidconUKFabio Collini
The document discusses Android Data Binding and the Model-View-ViewModel (MVVM) pattern. It covers the basics of data binding, using custom attributes with data binding, creating reusable UI components with data binding, implementing two-way data binding, and using data binding with RxJava and the MVVM pattern. The speaker presents code examples for setting up data binding in layout XML files and Java code, and binding data to views while ensuring automatic updates when the data changes.
Data Binding in Action using MVVM patternFabio Collini
The Data Binding framework was one of Google’s announcements at I/O 2015, it’s a big change in the code organization of an Android app. Some developers are sceptical about this framework but, if used in the “right way”, it’s very powerful and it allows to remove a lot of redundant boilerplate code from activities and fragments.
In this talk we’ll start from the Data Binding basic concepts and then we’ll see how to use it to improve the architecture of a typical Android application applying the Model View ViewModel pattern. Using this pattern you need to write less code to create an app that can be easily tested using JVM and instrumentation tests.
When I learn more about Android's graphics system, and do more work about how to use CPU/GPU in more parallelized way to improve the graphics performance in Android,
I start to think that there are actually some big design mistakes in Android graphics system, especially the rendering architecture in the client side.Some mistakes have been solved after 3.x, especially above 4.1, but others can never be solved due to the compatible reason.
As developers, we need to know how the Android graphics system work, how to utilize the new features Android 3.x and 4.x provided, and how to do the optimization and overcome the shortage of Android.
Build local web server in 5 minutes with mongooserogeryi
Mongoose is a small and lightweight web server that can be built and running in just 5 minutes, supporting Windows, MacOS and Linux. It includes features like CGI, SSL, SSI and supports HTTP requests like GET, POST, HEAD, PUT and DELETE. The entire Mongoose source code is under 40kb and is written in C. It can be downloaded from the project's Google Code page at http://code.google.com/p/mongoose.