Activity Source Analysis

  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. startActivity(new Intent(this,MainActivity.class)); After the startActivity method is started, the startActivityForResult method ...

Posted on Sat, 29 Jun 2019 15:15:25 -0400 by matt6805

TabLayout+Fragment Implementation Top Tab

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 dependencies { compile 'com.android.support:design:24.1.1' } In activity_main.xml layout file <LinearLayou ...

Posted on Sat, 29 Jun 2019 15:04:02 -0400 by error_22

Kotlin's simple and practical approach uses Kotlin's elegance to develop Android applications

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

A Summary of Learning Experiences about android Custom Controls

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 usage (2) EventBus thread pattern

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: ThreadMode: POSTING ThreadMode: MAIN ThreadMode: BACKGROUND ThreadM ...

Posted on Fri, 28 Jun 2019 18:52:51 -0400 by akelavlk

Android Learning Notes - Switch Button Toggle Button and Switch

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

Summary of the Implementation of Android gradient

Preface 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

An attempt to survive the Native process below Android 5.0

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: <activity android:name=".MainActivity"> ...

Posted on Thu, 27 Jun 2019 20:29:50 -0400 by rr1024

Working Principle of ThreadLocal

Summary 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

Implementation of Satellite Button by Android Attribute Animator

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