Brief discussion on source code - EventBus(v3.2.0)
EventBus official website
usage method
Step 1: define events
Subscribed event class
public static class MessageEvent { /* Additional fields if needed */ }
Step 2: prepare subscribers
The @ Subscribe annotation declaration is required for the subscription method. You can set the thread to handle the event, etc @Subscribe(threadMode = Th ...
Posted by OhLordy on Thu, 11 Nov 2021 10:25:52 +0100
Android - Kotiln basics tutorial
preface
In the previous article, we mainly explained the knowledge points corresponding to Kotlin string, number type and standard library function. In this article, we will explain the knowledge points related to Kotlin set.
1. List set
1.1 read only set
val list = listOf("json", "jack", "jacky")
fun main{
//Read only list; Cannot writ ...
Posted by Julian Pedley on Thu, 11 Nov 2021 04:30:35 +0100
Design and analysis of camera sensor driver code on zhanrui platform
Basic configuration and file path description of Camera driver
The driver configuration path is: \ device\sprd\platform\board\camera\sensor_config.xmlThe path of the driver code is: \ vendor \ SPRD \ modules \ libcamera \ sensor \ sensor_ Under DRV \ classic, there are drivers from various sensor manufacturers, such as Galaxy core, Superpix, S ...
Posted by cluce on Wed, 10 Nov 2021 07:01:18 +0100
Source code details the init.rc syntax rules of Android 9.0(P) system startup process
1. General
in the previous chapter Source code details the init process of Android 9.0 § system startup process (phase I) and Source code details the init process of Android 9.0 system startup process (phase II) Explained that after the first two phases of init, the attribute system and SELinux system have been established, but ...
Posted by adige72 on Mon, 08 Nov 2021 23:52:28 +0100
The way to advanced Android [3] after reading this article, I won't be Android animation framework again. I kneel on the washboard
Android animation can act on View/ViewGroup, activity and Fragment to achieve cool interaction effects. After several days of exploration, we have made clear the use of all kinds of animation and the implementation principle of animation, which is recorded below.Although there are several categories of Android animation, the implementation core ...
Posted by rklapwijk on Mon, 08 Nov 2021 01:32:35 +0100
Advanced Android [2] ten minutes to thoroughly understand the View event distribution mechanism
prefaceAndroid event distribution mechanism is the foundation that Android developers must understandThere are a large number of articles on Android event distribution mechanism on the Internet, but there are some problems: incomplete content, unclear ideas, no source code analysis, complex simple problems and so onToday, I will comprehensively ...
Posted by spider22 on Sat, 06 Nov 2021 14:34:55 +0100
Source code analysis of EventBus
usage method
The use method is very simple, according to Official documents The introduction is divided into three steps.
Step 1: define events
public static class MessageEvent { }
Step 2: prepare subscribers
Define subscription methods to handle received events.
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(Messa ...
Posted by jvalarta on Sat, 06 Nov 2021 05:17:21 +0100
Android Getting Started tutorial | RecyclerView practical use
RecyclerView actual useMake a list with RecyclerView. Display test data.This example is divided into the following steps:Determine the data. Analog data is used here.Design UI and presentation.Write layout and adapter.Analog dataA skillful woman can't make bricks without rice. Simulation data is simulation demand.Create a new DataTest class and ...
Posted by stokie-rich on Fri, 05 Nov 2021 21:31:49 +0100
Android gets results from other activities: registerForActivityResult()
Android gets results from other activities: registerForActivityResult()brief introductionActivity Result APIs can replace the startActivityForResult method to start an activity to obtain resultsActivity Result APIs can replace the requestPermissions method to request runtime permissionsbackgroundStarting an activity (whether in this application ...
Posted by thebighere on Thu, 04 Nov 2021 23:51:33 +0100
Use of JNI (Android studio)
1, Role of JNI:
1. Make JAVA interact with other local languages (C, C + +);
2. Call C, C + + and other language codes in JAVA code or C, C + + call JAVA code.
Because JAVA has the characteristics of cross platform, the interaction ability between JAVA and local code is weak. Using JNI feature can enhance the interaction ability between JAVA ...
Posted by spivey on Thu, 04 Nov 2021 09:57:28 +0100