Android bitmap cache strategy, understand these, and come to Alibaba directly
How to avoid consuming too much traffic? When the program loads a picture from the network for the first time, it caches it on the mobile device, so that when the picture is used again, it does not need to download it from the network again, saving traffic for users.
At present, a commonly used cache algorithm is lru (least recently used). It ...
Added by redmonkey on Fri, 17 Dec 2021 19:51:33 +0200
Android Getting Started tutorial | Android compressed string
Android compressed stringAndroid can compress strings. When transmitting a large number of simple text, you can compress the string before sending it. The receiver receives it and then decompresses it. You can also compress the string and store it in the database.Class library usedGZIPInputStreamGZIPOutputStreamCode exampleimport java.io.ByteAr ...
Added by Carlo Gambino on Fri, 17 Dec 2021 17:41:23 +0200
DASCTF August - RE&Crypto
littlejunk is too painful. I've been doing it for a day and a half under the careful tips of my seniors. The clown is myself. Even if ida bullies me, dev gives me a bug.
RE
1. py check in
After unpacking the classic python packaged exe program, the pyinstxtracker fixes the file header of the non suffix file named py, and then decompiles ...
Added by kevdoug on Fri, 17 Dec 2021 15:55:00 +0200
Singleton mode of Glide design mode
Singleton definition
It belongs to the creation mode; Only one object is created globally.
Glide usage form
Glide.with(context). . .
Glide single case writing
context check
/**
* @see #with(android.app.Activity)
* @see #with(android.app.Fragment)
* @see #with(androidx.fragment.app.Fragment)
* @see #with(androidx.fragment.app ...
Added by mwkdesign on Fri, 17 Dec 2021 13:35:46 +0200
Android-_ Skillfully_ Imitation ant forest water drop dynamic effect, launched in the whole network
/*
* Treatment idea:
* ->Customize a ViewGroup container with forest water droplets as a whole rather than a single view
* ->Loop create view
* ->Randomly set the position for the view (randomly select from some fixed sets to ensure that the water droplets do not coincide as much as possible)
* -> ...
Added by JasonHarper on Fri, 17 Dec 2021 12:57:17 +0200
Android cultivation series (XIII), BAT interview documents
This is the loading animation:
case MSG_TOP_DRAW:
if (mTopCircleAnimaRadius < mTopCircleMaxRadius - 2 * topIntervalDistance) {
mTopCircleAnimaRadius += topIntervalDistance;
} else {
mTopCircleAnimaRadius = mTopSmallCircleRadius + topIntervalDistance;
}
drawTimingThread.removeMessage ...
Added by begeiste on Fri, 17 Dec 2021 09:29:38 +0200
Android gradle automated multi-channel packaging and analysis of underlying principles
/**
* Automatically download 360 reinforcement protection, or you can download it yourself and put it in the root directory
*/
def download360jiagu() {
// Download 360 compressed package
File zipFile = file(packers["zipPath"])
if (!zipFile.exists()) {
if (!zipFile.parentFile.exists()) {
zipFile.parentFile.mkdirs()
...
Added by coffeeguy on Fri, 17 Dec 2021 09:10:12 +0200
(original) handwriting a picture cutting tool
Introduction and effect display
Recently, the function of image clipping is used in the project, so a custom View supporting clipping is written Then I made a simple demo project. Share it here Let's look at the specific effect first The first is an entry page, which is a button that supports jumping to the clipping page Of course, a fixed pic ...
Added by blackthunder on Fri, 17 Dec 2021 08:47:02 +0200
2020 Android interview key and difficult points (10000 words), dry goods and fine talk
JNI principle:
[analysis of registration process of Dalvik virtual machine JNI method]
Example: when libnanosleep When the so file is loaded, the function JNI_OnLoad will be called. In function JNI_ In onload, the parameter vm describes the Dalvik virtual machine in the current thread. A JNIEnv object can be obtained by calling its member fun ...
Added by turek on Fri, 17 Dec 2021 08:35:25 +0200
Kotlin style, it should be written like drawable!
prefaceGenerally, we customize shape s and selector s under res/drawable to meet some UI designs. However, because the final conversion of xml to drawable needs to be created through IO or reflection, there will be some performance loss. In addition, with the increase and modularization of the project, many common styles can not be reused quick ...
Added by Mr. Tech on Fri, 17 Dec 2021 08:26:47 +0200