本文主要对Volley源码进行分析。
Android签名
在Mac下进行JNI开发
本文主要讲述如何在Mac开发环境下进行JNI开发。
首先编写好Java文件,示例程序主要示范了Java访问C,C访问Java静态与非静态域。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Writing Better Adapters
Implementing adapters is one of the most frequent tasks for an Android developer. It’s the base for every list. Looking at apps, lists are the base of most apps.
The schema we follow to implement list views is often the same: a View with an adapter that holds the data. Doing this all the time can make us blind to what we are writing, even to ugly code. Even worse, we end up repeating that ugly code.
It’s time to take a close look into adapters.
RecyclerView Basics
The basic operations for RecyclerViews (but also applicable for ListView) are:
- Creating the view and the ViewHolder that holds the view information.
- Binding the ViewHolder to the data that the adapter holds, probably a list of model classes.
Implementing this is pretty straightforward and not much can be done wrong here.
Choreographer in Android
Choreographer is the one which acts like a interface between application view system and lower layer display system for rendering the views.
ViewRootImpl is the ViewParent or root below which only Activity window DecorView will be attached. All the view layouts set by the activity through setContentView()
will attached the DecorView whose parent is ViewRootImpl. Actually ViewRootImpl is not a View its just a ViewParent which handled and manages the View Hierarchies for displaying, handling input events etc.
The number of root views that are active in your process. Each root view is associated with a window, so this can help you identify memory leaks involving dialogs or other windows.