Page frame 1: Fragment + RadioGroup

With the increase of contact projects, start to summarize some knowledge points, so as to use and find more convenient in the future. Every project needs to build a page framework. So far, I have contacted three main categories:Fragment+RadioGroup , Fragment+LinearLayout, Fragment + ViewPager. Let's talk about the first on ...

Posted on Thu, 26 Mar 2020 09:10:49 -0700 by cyberRobot

Source code analysis of Android mainstream tripartite Library (VIII. In depth understanding of Dagger2 source code)

Preface To be an excellent Android Developer, you need a complete Knowledge system Here, let's grow up as we think. In the previous article, I analyzed the dependency injection framework ButterKnife in Android in detail, which helps us to solve the tedious problem of repeatedly writing findViewById ...

Posted on Thu, 27 Feb 2020 19:31:17 -0800 by hax

Solve the compatibility problem of the support library version: the support package is underlined in red when it is introduced

If the support library version of the referenced third-party library is lower (or inconsistent) than that in app build.gradle, the following problems may occur: all com.android.support libraries must use the exact same version specification(mixing versions can lead to runtime crashes) As shown in the figure below: It is difficult to chang ...

Posted on Mon, 09 Dec 2019 01:28:53 -0800 by Rabioza123

ButterKnife dump script

background Although ButterKnife helps us to save the tedious findViewById(), it is very fast and convenient to use, but it has advantages and disadvantages. During compilation, ButterKnife will generate additional class files, which contributes a lot to the increase of the number of methods of App, and it is inconvenient to us ...

Posted on Sun, 08 Dec 2019 17:19:33 -0800 by sungpeng

Create a universal adapter!!!

Recently, listView and GridView are often used in projects. It can be said that Listview GridView is almost a necessary component in projects. Android also provides a set of mechanism to bind data for these controls, that is, Adapter Recently, I took the time to build a universal adapter Look at some of our previous writings: public class Imag ...

Posted on Sun, 03 Nov 2019 08:47:28 -0800 by CrazeD

Minutes to read ButterKnife's source code

Why write this series of blogs? Because in the Android development process, generics, reflection, annotations will be used, almost all frameworks will use at least one or two of the above knowledge, such as Gson, generics, reflection, annotations, Retrofit also used generics, reflection, annotations. It is very important for us to learn thes ...

Posted on Thu, 10 Oct 2019 00:03:37 -0700 by new2phpcode

An article teaches you how to insert stubs during Android compilation so that programs can learn to write their own code.

Preface In recent years, compile-time piling technology has become more and more popular in Android circle. Whether it's ButterKnief, Dagger, VirtualAPK that can generate JAVA source code, or even Kotlin, a new language, all use compile-time pil ...

Posted on Tue, 13 Aug 2019 20:30:03 -0700 by shikhartandon

Comments under Java/Android

Links to the original text: https://www.jianshu.com/p/8b4f801bff10 What is annotation? java.lang.annotation, interface Annotation, introduced in JDK 5.0 and later versions. Annotations are special tags in code that can be read at compi ...

Posted on Tue, 06 Aug 2019 03:38:41 -0700 by mikeglaz

Snail Master's Chatting Dynamic Layout Framework: Thoughts and Implementation of Core Functions

Hello! Hello, I'm Mr. Snail. ~We met again. This article is the second one of Mr. Snail's chats about dynamic layout framework. In the last article, we explained the general idea of the framework and reviewed the basic usage of RecyclerView. So in this article, we will formally begin to build the framew ...

Posted on Wed, 31 Jul 2019 18:54:09 -0700 by paulareno

New android feature: DrawerLayout works with NavigationView

First look at the effect 20170120150737931.png The NavigationView and DrawerLayout controls have been added to the Android Design Support Library.Replace use in SlidingMenu project! Let's learn how to use DrawerLayout and NavigationView here! Add dependencies to your project: compile 'com.android.support:design:25.0.0' In Material ...

Posted on Mon, 08 Jul 2019 10:40:36 -0700 by laduch