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

BaseActivity: Unified Writing of Common Logic

In the last article NetworkStateView At the end of the article, we can set up a unified NetworkStateView in BaseActivity to load multi-state of the interface. So let's talk about BaseActivity today. How to set up NetworkStateView in BaseActivity and some other functions of BaseActivity? We haven't seen NetworkStateView before. Once This article ...

Posted on Sat, 06 Jul 2019 13:50:11 -0700 by joon

Android 6.0: Dynamic Rights Management Solution

Reproduced from: http://blog.csdn.net/caroline_wendy/article/details/50587230 Android version 6.0 (Api 23) has introduced a number of new features that dramatically enhance the user experience and place new burdens on programmers. Dynamic rights management is like this, making it easier for users to control their privacy and re-adapting their ...

Posted on Sat, 06 Jul 2019 09:50:43 -0700 by mm00