Simple practice of Android Hook mechanism

brief introductionWhat is HookHook is also called "hook". It can intercept and monitor the transmission of events in the process of event transmission, and integrate its own code with the system method. In this way, when these methods are called, we can execute our own code, which is also the idea of aspect oriented programming (AOP). ...

Added by mjlively on Wed, 02 Mar 2022 12:25:05 +0200

Tiktok is convenient, small air conditioning special effect html+css+js

Look at the effect first (the source code is at the end): The video effect is as follows, with sound effect Station B: A fan shared this effect with me. I thought it was very interesting, and then studied it. The specific implementation is as follows (there may be many codes, but they are relatively simple. Come on): Implementation process ...

Added by theoph on Tue, 01 Mar 2022 21:36:05 +0200

An in-depth understanding of the principle and mechanism of SharedPreference

1, SharedPreferences is easy to use1. CreateThe first parameter is the name of the stored xml file, and the second parameter is the opening method, which is generally usedContext.MODE_PRIVATE; SharedPreferences sp=context.getSharedPreferences("name", Context.MODE_PRIVATE);2. Write//You can create a new SharedPreference to manipulate the stored ...

Added by DotSPF on Tue, 01 Mar 2022 11:07:28 +0200

OKio source code analysis

Okio article reading and writing timeout detection mechanism. Firstly, it will introduce several important classes in okio, and then provide a code for reading and writing files with Okio api. According to this code, it will analyze the overall reading and writing process, and analyze why okio is more efficient than using Java io directly. Fina ...

Added by blackmamba on Mon, 28 Feb 2022 08:06:06 +0200

Glide's caching mechanism

Glide's cache is divided into two modules, one is memory cache and the other is hard disk cache. The function of memory cache is to prevent duplicate data from being read; The function of hard disk cache is to prevent applications from repeatedly downloading and reading data from the network or other places. Cache Key of Glide The code that ...

Added by davidprogramer on Sun, 27 Feb 2022 23:38:07 +0200

Event distribution mechanism of View

What did the VIew incident include The event of View actually refers to MotionEvent, that is, a series of actions such as clicking, sliding and lifting the screen. It has the following four event types ACTION_DOWN: the finger just touched the screenACTION_MOVE: move your finger on the screenACTION_UP: the moment when the finger is release ...

Added by jlh3590 on Sun, 27 Feb 2022 12:00:31 +0200

Writing gradle scripts using Kotlin

Writing gradle scripts using Kotlin summary IDE support Build importSyntax highlighting 1Semantic editor 2IntelliJ IDEA✓✓✓Android Studio✓✓✓Eclipse IDE✓✓✖CLion✓✓✖Apache NetBeans✓✓✖Visual Studio Code (LSP)✓✓✖Visual Studio✓✖✖ Kotlin syntax highlighting in Gradle Kotlin DSL scriptsGradle Kotlin DSL scripts supports code completion, navigatio ...

Added by npereira on Thu, 24 Feb 2022 17:17:49 +0200

How to publish Android library to Maven central warehouse

preface This article is used to record how to upload your library to maven central warehouse, First, we need to register the jira account of sonatype, and then apply to create our own repo. After the official review, we can have our own space;We use gradle's maven publish and signing plug-ins to simplify the operation of packaging and uploadi ...

Added by Caps on Thu, 24 Feb 2022 17:13:41 +0200

Android QQ course design

1. Preface: for the small project written after learning Android for a month in 2017, the document has only been completed recently. The project and document are original and released to remember a few years ago. Due to the projects written in 2017, the code and technology are backward, but it can provide some ideas for writing similar projects ...

Added by Felex on Wed, 23 Feb 2022 16:05:41 +0200

Detailed explanation of Looper mechanism

preface Previously, there was an article on JAVA layer Looper Introduction and MessageQueue Introduction of There is also a very detailed article on the Internet introduce Use a diagram to illustrate the mechanism of looper operation As the name suggests, looper is polling. The purpose of polling is to find messages in the Message queue and ...

Added by VladSun on Wed, 23 Feb 2022 15:56:15 +0200