Three ways to enable threads in Android
Three ways to enable threads in Android
In multithreaded programming, we often use three classes: handler, thread and Runnable. Do you know the relationship between them?
First of all Android The minimum unit of CPU allocation of is Thread, and Handler is generally created in a Thread, so Handler and Thread are bound to each ...
Posted by access9 on Fri, 27 Mar 2020 08:00:45 -0700
The processing of Android return key in ionic 3 learning
The processing of Android return key in ionic 3 learning
About provider
Understand the provider of ionic3
provider is a concept defined by ionic itself, similar to our service on angular. There are some similarities and differences between the two.
Contrast:
Difference
technology
Commands used
file name
Route ...
Posted by nabeelkhan on Thu, 26 Mar 2020 09:53:08 -0700
Rich text parser
From http://blog.csdn.net/stephen2wong/article/details/72235930
RichText
Rich text parser on Android platform
Streaming operation
Low invasiveness
Support Html and Markdown format text
Support image click and long press events
Link click event and long press event
Support setting pictures in loading and loading errors
Suppo ...
Posted by perrio on Tue, 24 Mar 2020 09:19:19 -0700
Android SharedPreferences tool class to set cache time
Using ACache also sets the cache time, but ACache is emptied when the cache is cleared.
SharedPreferences storage is time-free by default.
The general idea is to record the current time when you store it and how long to store it.When you fetch the data, determine how long it has been stored, and if it exceeds the set storage ...
Posted by damic on Mon, 23 Mar 2020 09:49:35 -0700
[Android] Retrofit source code learning
[Android] Retrofit source code learningThe process of using Retrofit#Create a Retrofit object through Builder:CopyRetrofit retrofit = new Retrofit.Builder().baseUrl("").addConverterFactory().build();Using Java annotation to describe APICopypublic interface MyApi {
@GET("/api")
Call<Data> getData();
}Create api object and Call object throu ...
Posted by jdiver on Fri, 20 Mar 2020 04:34:57 -0700
CoordinatorLayout uses detail: creating a foldable suspension effect
1. Introduction
CoordinatorLayout follows the Material style and is included in the support Library, which combines AppbarLayout, CollapsingToolbarLayout, and others to produce a variety of cool folding suspension effects.
As Top View
Interact with one or more subviews as a container
2.AppBarLayout
It is inherited from LinearLayout and the de ...
Posted by Control Pad on Thu, 19 Mar 2020 21:39:34 -0700
Integration of Proto3 on Android
Proto 3 and proto 2 are very different. Most of the Internet is about proto 2. Because of the habit of using the latest library, we insist on integrating proto 3
build.gradle configuration under Project directory
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle: ...
Posted by IceHawk on Thu, 19 Mar 2020 11:15:27 -0700
Design mode - callback function and observer mode
There are many places in the Android framework that use callback mode, such as the life cycle of Activity, button click event, etc.
The following is the basic model of callback:
public class A {
private CallBack callback;
//Register an event
public void register(CallBack callback){
this.callba ...
Posted by TheTitans on Thu, 19 Mar 2020 08:02:42 -0700
Android Platform Access to OneNET
1. Introduction to OneNET
China Mobile Internet of Things Open Platform is a PaaS Internet of Things Open Platform created by China Mobile.
The platform can help developers easily access and connect devices, provide comprehensive Internet of Things solutions, and realize data acquisition, data storage and data display of Internet of Things devi ...
Posted by son.of.the.morning on Tue, 17 Mar 2020 19:14:45 -0700
Red packet rain of wechat applet implemented by css3
Recently, the company needs to do a wechat red packet rain function. The basic online search is to use canvas, which is not very skilled in canvas, so I wrote one with css. This method works well for apple, but there will be a jam situation on Android. After several optimizations, there will be a little ...
Posted by [Demonoid] on Tue, 17 Mar 2020 08:03:26 -0700