Android imitation QQ space dynamic interface sharing function

Let's see the effect first:

With very little code, the data acquisition and processing of dynamic details and secondary comments, UI display and interaction are realized, with high decoupling, high reuse and high flexibility.

The dynamic list interface momentlistfragment supports pull-down refresh, pull-up loading and fuzzy search. It slides repeatedly and quickly, but it is still very smooth.

The caching mechanism enables the data to be loaded instantly after the interface is started.

The dynamic details interface momentactivity supports (cancel) like, (delete) comment, click name to jump to personal details, etc.

When there is only one picture, the picture will be enlarged, and if there is more than one picture, it will be displayed according to the Jiugong grid.

The commentcontainerview and momentview used are independent components, which can be used alone, listview or added to other viewgroups.

Commentcontainerview reuse

CommentContainerView.java

package apijson.demo.client.view;

comment_ container_ view.xml

Momentview reuse

MomentView.java

package apijson.demo.client.view;

moment_ view.xml

Because this project uses the zblibrary rapid development framework, it only uses very little code to realize the complex interface imitating QQ space and wechat circle of friends, and has high decoupling, high reuse and high flexibility.

The server is quickly built with the apijson (server) project. The client app and the server communicate through the apijson-json transmission structure protocol, which is very convenient and flexible and saves a lot of interfaces and documents!

Rxjava is very popular this year. It is almost a necessary skill in the Beijing market, so I also made an rxjava version of this project. Welcome to exchange and advice.

Java class implementing UI:

XML layout to implement UI:

Why is the XML layout corresponding to the momentlistfragment not implemented?

Because momentlistfragment inherits basehttplistfragment and internally uses xlistview as the default list view, you don't need to implement it yourself.

Java classes for data acquisition, submission and processing:

(Note: unlisted code files are either not related to dynamics, or apijson or zblibrary has been provided. Classes in server.model are provided by the server)

Imitates QQ space and wechat circle of friends, with high decoupling, high reuse and high flexibility

Download trial (test server address: 139.196.140.118:8080)

APIJSONClientApp.apk

Source code and documentation (remember to give a star)

https://github.com/TommyLemon/APIJSON

The above is the Android imitation QQ space dynamic interface sharing function introduced by Xiaobian. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

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
分享
二维码
< <上一篇
下一篇>>