Attach a flow chart of the whole start-up process of Activity. The blue font indicates the class where the calling method is located. For example, Application Thread represents the inner class of Activity Thread.
After the startActivity method is started, the startActivityForResult method ...
Posted on Sat, 29 Jun 2019 15:15:25 -0400 by matt6805
Use of Material Design (1) Use of TabLyout
Use TabLayout+Fragment to implement the top tab
Wednesday, September/7, 2016
Look at the picture first.
With Tablayout, you first need to add Design packages to your project
In activity_main.xml layout file
Posted on Sat, 29 Jun 2019 15:04:02 -0400 by error_22
The 2017 Google I/O Global Developers Conference was held at Shoreline Amphitheatre, Mountain View City, California, USA, from 17 to 19 May 2017. Google fully introduced the application of AI in various fields at this conference. It also introduced iOS version voice assistant, the latest version of Android O and VR eyeglasses series. The mos ...
Posted on Sat, 29 Jun 2019 14:21:34 -0400 by ShaolinF
I went to an interview the other day and was asked a question.
If I want to customize a viewgroup with a line, which method do we need to call?
I've read some articles about customized view before, but I can't understand the real thing inside. I just know three methods: measure, layout and draw, so I didn't answer them.
Here is a summary:
Posted on Fri, 28 Jun 2019 20:36:39 -0400 by nextman
Summary of EventBus 3.0 Use (I) Simple Use This paper introduces the simple use of EventBus 3.0.
ThreadMode.MAIN thread mode is used when declaring subscription methods by specifying thread mode.
@Subscribe(threadMode = ThreadMode.MAIN)
EventBus has four threading modes:
Posted on Fri, 28 Jun 2019 18:52:51 -0400 by akelavlk
Reference: http://www.runoob.com/w3cnote/android-tutorial-toggle button-switch.html
The basic UI controls for Android introduced in this section are: Toggle Button and Switch, which are both switch components, but the latter need to be used after Android 4.0, so the minsdk in Android Manifest.xml file needs to be >= 14, otherwise error wil ...
Posted on Fri, 28 Jun 2019 16:20:05 -0400 by happyme
In daily Android development, a large part of the need to use gradient color, sometimes the UI will provide us with a set of corresponding image resources, so that we can use it directly, of course, we can also achieve color gradient through code:
1. Implementing color gradient in XML
A relatively simple way to achieve color gradi ...
Posted on Fri, 28 Jun 2019 16:18:09 -0400 by pouncer
Recently, bloggers have tried the Native survival mechanism of Android version 5.0 or less, and they feel fruitful. Write a blog entry here.
Firstly, the whole process of life preservation is described in the form of pictures.
First is the control registered in Android Manifest:
Posted on Thu, 27 Jun 2019 20:29:50 -0400 by rr1024
ThreadLocal is a class used to store data inside threads. What does that mean? ThreadLocal focuses on Local, which means that the stored data can only be accessed by the corresponding thread. Other threads are not accessible. Whichever thread exists, it can only be fetched by which thread. How did that work?
ThreadLocal object is the k ...
Posted on Thu, 27 Jun 2019 18:43:48 -0400 by Haggen
1. Animator and Animation
Animator framework is an Animation framework added after Android 4.0. Compared with the previous Animation framework, Animator can control Animation more and more finely, and is simpler and more efficient than before. The use of Animator can be seen everywhere in 4.0 source code.
Before 3.0, Android provided us with fr ...
Posted on Thu, 27 Jun 2019 17:53:57 -0400 by GaryE