RecyclerView -- give you a non-card sliding list

https://www.jianshu.com/p/519bb23987ca   What will you learn after reading this article? RecyclerView adds a head, a tail, or a view somewhere in the list list RecyclerView+SwipeRefreshLayout for drop-down refresh Paging Load Data List optimization scheme Use Glide to load pictures, press the back key while sliding, and App c ...

Posted by severndigital on Sun, 01 Dec 2019 12:02:03 -0800

Take you 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 these k ...

Posted by madmindz on Thu, 10 Oct 2019 02:21:26 -0700

Understanding and Use of Android Annotations

Why annotations As an Android developer, first look at some familiar code: setContentView(R.layout.activity_main); Toolbar toolbar = findViewById(R.id.toolbar); new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.xxx, parent, false))); Non-ellipsible code like this, which appears in large numbers everywhere, is copied ov ...

Posted by majik92 on Thu, 19 Sep 2019 18:51:04 -0700

Android Advanced Drawing - Custom View Fully Mastered

In the previous case, we used some controls of the system to generate our custom controls by combining. The implementation of the custom controls can also be accomplished by inheriting View from the custom class. Beginning with this blog, we inherited View through a custom class to implement some of our custom controls. We learn through a case, ...

Posted by simonsays on Sun, 25 Aug 2019 21:40:56 -0700

IntentService, run out

IntentService IntentService, which can be seen as a combination of Service and Handler Thread, stops automatically after completing its mission, and is suitable for scenarios where UI-independent tasks need to be handled by worker threads. IntentService is a class that inherits from Service and handles asynchronous requests. There is a ...

Posted by abhi_madhani on Wed, 17 Jul 2019 14:20:16 -0700

The most detailed use of TabLayout

TabLayout is a container control that provides horizontal display of Tab. It's often used in conjunction with ViewPager. I'll give you a full explanation of its usage. I haven't seen it in more detail than I have. Demonstration Adding dependencies This is the class under the Android Design package, which is the UI package ...

Posted by MinDFreeZ on Mon, 15 Jul 2019 16:35:23 -0700

The Way to Android Framework: The Use of ButterKnife

I. Introduction: ButterKnife is a relatively easy-to-understand open source framework for annotations. 1. Powerful View binding and Click event handling functions, simplify the code and improve development efficiency; 2. Handle the ViewHolder binding problem in Adapter conveniently; 3. The running time will not affect the efficien ...

Posted by pineapple1 on Thu, 04 Jul 2019 11:53:13 -0700

Integration of RxJava+Retrofit 2.0+MVP Patterns in Android

Working Principle of MVP The above is the working principle of MVP. The Presenter Operations View and Mode s, which everyone notices, are directly invoked through interfaces. MVP workflow Presenter is responsible for logical processing. Model provides data. View is responsible for display.   As a new mode, View does not us ...

Posted by han2754 on Sat, 22 Jun 2019 16:09:23 -0700

Android About Handler Memory Leakage

In the last article Full Analysis of Android Handler Mechanism In this article, we analyze the Hanlder mechanism from the point of view of source code, and then continue to learn about Handler. This article focuses on the memory leaks that Handler may cause and solutions. 1. Why does memory leak occur? When we use Handler in our daily life ...

Posted by Mijii on Fri, 21 Jun 2019 17:22:43 -0700

Generating code using APT in Android

APT is not new anymore, although we all know what it is: APT (short for Annotation Processing Tool) parses annotations at code compilation time and generates new Java files. But to be able to write a framework using APT by yourself is to really understand it, so this article imitates butterknife Write your own to enhance your impression. Fi ...

Posted by glence on Fri, 21 Jun 2019 13:00:03 -0700