A mimic Eyepetizer | first video open source app

  • This is an open source Demo that completely imitations eye-opening videos. I like the UI style of this app very much, so I imitate this app for the second time to learn and integrate related technologies.

  • No more nonsense, directly above, whether it is a commercial project or open source app, the first is definitely to see the edge

Effect:

The project structure

The open source project is developed in a componentized way, using MVVM + AndroidX + Jetpack components as the basic architecture.

  • Project structure diagram

  • App architecture diagram

App Function Introduction

Of course, since it is developed in my spare time based on my interest, without the company of UI sister and test sister, there are naturally some defects. Of course, I wrote this project more for learning and exercising the thinking of app architecture construction, hoping to help the friends who brush to this blog, learn and make progress together.

In terms of functions, I think there is nothing to say, which is shown on the UI. I believe that all of you here are familiar with them.

Application technology introduction

  • Mvvm Architecture Design About the various MVX differences, I will not go through one, Google good, about the Mvvm design package used in the project, please go here; Code is the best teacher, look directly at the source code.

  • Android X is an upgrade and migration version of the Android Support library. Now, new projects must be directly Android X.

  • Jetpack is a set of component development libraries from Google

Basically, these are the main ones that are used

App third-party dependencies

  • RxEasyHttp RxEasyHttp is a Github open source RxJava2+Retrofit2 to achieve simple and easy to use network request framework, in I found and observe the source code and design principles, found that really write good, a variety of business scenarios are basically designed, API design is also good, Of course, there are also some flaws, so the actual project needs to be based on their own business needs for secondary development, recommended to you read RxEasyHttp

  • Loadsir Loadsir is a third-party library for app page state management, which is also very practical. It is used to control the loading page, loading error page, empty page display, click retry, etc. From now on, we bid farewell to control the control of show, hint operation and ViewStub on the page of network loading failure. We can carry out base class encapsulation based on our own business. Please see the encapsulation of activity and Fragment base class in the base library of the project. Recommend to you read officer Loadsir

  • MMKV MMKV is a lightweight open source repository from Tencent. It is a great alternative to SharedPreferences. For details, see the official introduction

  • BaseRecyclerViewAdapterHelper believe in this library you should be very familiar with, do basic android development is used, not much said

  • SmartRefreshLayout is the same library that we use a lot,

  • Immersionbar, a third-party library that implements an immersive status bar, is also very common

  • Glide image loading library

  • Rxpermissions permissions load libraries

  • Logger Log print library. The log format is more comfortable to read

  • Utilcodex is an Android utility library with many utility classes that are not needed for a real project, so it is possible to copy the code as required without integration

  • BannerViewPager a third party cast diagram library, this library is relatively new, so the start number is less, but very useful, recommended

  • PagerBottomTabStrip a third-party navigation library, app in the bottom navigation is based on this library, very useful, come with a little red dot management

  • GsyVideoPlayer is a third-party video player library, based on bilibili open source iJkPlayer, customizable is also good, mainly use this library to achieve similar to twitter video list according to scrolling judgment automatic play,

Project Api

It is stated that all API interfaces in the project are captured from eye-opening app, all Copyrights belong to eye-opening APP, only for learning and reference, do not use for commercial purposes, if there is infringement, please contact the author to delete.

Home page

1. Discover more

  • Request address: baobab.kaiyanapp.com/api/v7/inde…

2. Daily recommendations

  • Request address: baobab.kaiyanapp.com/api/v5/inde…

3. Daily Selection

  • Request address: baobab.kaiyanapp.com/api/v5/inde…

community

1. Recommended

  • Request address: baobab.kaiyanapp.com/api/v7/comm…

2. Pay close attention to

  • Request address: baobab.kaiyanapp.com/api/v6/comm…

notice

1. The theme

  • Request address: baobab.kaiyanapp.com/api/v7/tag/…

2. Inform

  • Request address: baobab.kaiyanapp.com/api/v3/mess…

3. Interactive

  • Request address: baobab.kaiyanapp.com/api/v7/topi…

Video Details page

1. Related recommendations

  • Request address: baobab.kaiyanapp.com/api/v4/vide…
Parameters that instructions Whether must The default value
id Id of the currently playing video, obtained from the video item on the jump page is There is no
  1. comments
  • Request address: baobab.kaiyanapp.com/api/v2/repl…
Parameters that instructions Whether must The default value
videoId Id of the currently playing video, obtained from the video item on the jump page is There is no

Aok download

  • Install password: Darryrzhong

The project address

  • Android-MvvmComponent-App

Welcome to Darryrzhong for more.

A little red heart, please! Because your encouragement is the biggest motivation for my writing!

More exciting articles please pay attention

  • Personal blog: Darryrzhong
  • The Denver nuggets
  • Jane’s book
  • SegmentFault
  • MoOCs