### note: please replace the Himalayan key in lib_common’s manifest with your own, otherwise it will prompt access overlimits. github.com/TanZhiL/Zhu…

This project is for reference only, not for commercial use.

Update log:

Qomolangma FM 1.0 2019-10.09
  • Friends share au
Qomolangma FM 1.0 2019-09.25
  • Layout optimization to avoid transition drawing
  • Improve status management and improve user experience
Qomolangma FM 1.0 2019-09.20
  • Sound batch download
  • Voice search
  • Album subscribe
  • Sounds like
  • Optimize startup speed
  • Add a mock AD page
  • Integrated Bugly exception reporting, full update, hot update
Qomolangma FM 1.0 2019-09.13
  • First Release

Function demonstration

Main features (including but not limited to):

  • The album to show
  • Sound display and playback
  • Radio presentation and broadcasting
  • The host showed
  • Voice to download
  • Display and play history

To be improved (including but not limited to):

  • The user login
  • To optimize the user interface (UI)
  • Optimize performance
  • Fix the bug
  • More and more

Rapid experience

Download:

Click me to download the experience

The project architecture

This project adopts retrofit+ RxJavA2 + RxAndroid + Arouter + MVVM +fragmentation to realize the single activity and multiple fragme componentization architecture

  • App: Responsible for managing various business components and packaging APK, without specific business functions;
  • Lib_common: a functional component that supports the foundation of service components and provides most of the functions required by service components.
  • Module_main: belongs to a service component and specifies the APP startup page and main screen.
  • Module_home: Home page display, including popular, classification, boutique, anchor, radio, display and broadcast, etc.
  • Module_listen: I listen, including subscribe, like, play history, download, etc.
  • Module_discover: discovers, including subsequent extended functions.
  • Module_user: user management module.

Componentized implementation:

Zumlangma FM client uses Ali ARouter as a route to realize communication jump between components

Integration pattern and component pattern transformation

The Module property is configured in the build.gradle file of each component. When we develop in component mode, the business component should be in the Application property. At this time, the business component is an Android App that can be independently developed and debugged. When we switch to integration mode development, the business components should be in the Library property so that they can be relied upon by our “app shell project” to form a fully functional app

Open the root directory of the Project and find the gradle.properties file. Change isModule to your desired development mode (true/false) and click the “Sync Project” button to synchronize the Project

isModule=false
Copy the code

if (isModule.toBoolean()) {
    apply plugin: 'com.android.application'
} else {
    apply plugin: 'com.android.library'
}
Copy the code

AndroidManifest merge problem between components

We can create an Androidmanifest.xml file for the business component in component development mode and specify the androidmanifest.xml file path according to isModule. Let business components use different Androidmanifest.xml in integration mode and component mode so that form collisions can be avoided for the module_main component as follows:

sourceSets {
        main {
            if (isModule.toBoolean()) {
                manifest.srcFile 'src/main/module/AndroidManifest.xml'
            } else {
                manifest.srcFile 'src/main/AndroidManifest.xml'}}}Copy the code

Application in component mode

Create an Application in the Debug directory of each component and configure it in the Androidmanifest.xml directory of module.

Application in integrated development mode

The main open source libraries used

  • Quick Section programming open Source library github.com/TanZhiL/OkA…
  • Himalayas SDK open.ximalaya.com/
  • Fragmentation github.com/YoKeyword/F…
  • Okhttp github.com/square/okht…
  • Retrofit github.com/square/retr…
  • Rxpermissions permissions github.com/tbruyelle/R…
  • BaseRecyclerViewAdapterHelper github.com/CymChad/Bas…
  • Loadsir status management github.com/KingJA/Load…
  • Lottie animation github.com/airbnb/lott…
  • SmartRefreshLayout github.com/scwang90/Sm…
  • MagicIndicator github.com/hackware199…

Thank you

  • Thanks to all the open source library masters
  • Github.com/geduo83/Fly MVVM reference…
  • Prototype platform www.xiaopiu.com/

The problem of feedback

Welcome to add star, call github.com/TanZhiL/Zhu…

About the author

Tan Zhilong

The open source project

  • Quick Section programming open Source library github.com/TanZhiL/OkA…
  • High imitation Himalayan listening Android client github.com/TanZhiL/Zhu…

License

Copyright (C)  tanzhilong Zhumualangma Framework Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except inThe compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed toin writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copy the code