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) * -&gt ...

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

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

Android ORM framework GreenDao use details, high paid programmers will

The so-called ORM framework, object relational mapping, is used to make a mapping between relational databases and objects. In this way, when we operate the database, we don't need to deal with complex SQL statements, but just operate it as usual. 4, Project case demonstration ================================================================= ...

Added by stenk on Fri, 17 Dec 2021 07:10:19 +0200

Prototype patterns in Java

1. Introduction Prototype Refers to the use of prototype instances to develop the types of objects created and to create new objects by copying them When prototype mode is available When a system should be independent of its product creation, composition, and representationWhen the class to instantiate is made at runtime, such as dynami ...

Added by Roo on Fri, 17 Dec 2021 06:37:42 +0200

20 minutes to master Android gradle, the middle-aged crisis of programmers

Task declaration format To declare a task, you only need to add a task before the task name. For example, the following declares a hello task. task hello Usually, we attach some execution actions to the task, which are called actions, such as hello.doFirst{ println "hello first" } hello.doLast{ println "hello last" } You can a ...

Added by TheDeadPool on Fri, 17 Dec 2021 03:31:57 +0200

Introduction to Android Things development, a collection of large factories

Demo display and hardware construction - light This is a demo of operating the LED to make it flash. We will introduce the basic methods of operating the hardware through this demo. Let's see the final effect first: [external chain picture transfer failed. The source station may have anti-theft chain mechanism. It is recommended to save the p ...

Added by arcticwolf on Fri, 17 Dec 2021 01:44:32 +0200

Android network framework OkHttp source code analysis, BAT interview & Advanced

if (result == null) throw new IOException("Canceled"); return result; } catch (IOException e) { eventListener.callFailed(this, e); throw e; } finally { client.dispatcher().finished(this); } } We'll use it here `client` Object (actually created above) `RealCall` Passed in when `OkHttpClien ...

Added by wardo on Thu, 16 Dec 2021 22:39:37 +0200

Java design pattern -- Bridge Pattern

1, Introduction The 23 design modes are roughly divided into three categories: There are 5 kinds of creation modes: factory method mode, abstract factory mode, singleton mode, prototype mode and builder mode. 7 types (structural mode): adapter mode, decorator mode, agent mode, appearance mode, bridge mode, combination mode and sharing mode. ...

Added by unknownproto on Thu, 16 Dec 2021 18:19:48 +0200