Android teaches you how to make app home page (pull-down refresh and automatic loading)

1、 Overview

As a programmer with three years of Android development experience, I'm going to practice the home page function of an app with you today. This home page is still very common in our daily contact. Although the page is simple, there are still a lot of function points involved. If the code is insufficient, I hope all my colleagues can give me some advice. Development library used in the page: the whole homepage architecture uses lrecyclerview, including drop-down refresh and automatic loading functions

compile 'com.github.jdsjlzx:LRecyclerView:1.3.3'

The infinite loop rotation chart uses convenientbanner, and the effect is still very smooth. You can also modify the transition animation according to your own needs

compile 'com.bigkoo:convenientbanner:2.0.5'

The glide image library is used for image loading. The method inside is to encapsulate the network request. The dependency is okhttp. The open source library okgo is used

compile 'com.lzy.net:okgo:2.1.4'

The others are the nine palaces grid

compile 'com.lzy.widget:ninegridview:0.2.0'

Automatically annotate the butterknife library, and so on

2、 Implementation effect diagram

1. The home page shows the rotation chart

2. Pull down refresh

3. Automatic loading

4. Cardview water ripple animation

3、 Core code

Lrecyclerview is used as the main framework, and the rotation map and classified grid list are placed in the index as headers_ Header.xml layout file.

IndexFragment.java

fragment_ index.xml

index_ header.xml

Campaignlistadapter.java

campaign_ list_ item.java

4、 Source download

http://xiazai.jb51.net/201701/yuanma/AndroidAPPDemo (jb51.net).rar

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>