πŸš€ An Android project template using Kotlin/MVP/ReactiveX. It provides a generator to fast create a Kotlin Android template project.
Python Kotlin
Switch branches/tags
Clone or download
nekocode Merge pull request #23 from dsebastien/master
Added python 3 version of the install script
Latest commit bb8503b Mar 7, 2018

README.md

README

Apache 2.0 License

This project template makes it easy to get started with Kotlin in Android development. It provides a python script that can generate a new Android project using Kotlin/MVP/ReactiveX. Just paste and execute the following command at a terminal prompt (it depends on the requests lib).

python -c "$(curl -fsSL https://raw.githubusercontent.com/nekocode/Kotlin-Android-Template/master/project_generator.py)"

If you're using python 3:

python -c "$(curl -fsSL https://raw.githubusercontent.com/nekocode/Kotlin-Android-Template/master/project_generator_python3.py)"

Project Structure

This project demonstrates a basic Model-View-Presenter (MVP) architecture. It uses headless Fragment to implement Presenter because the Fragment provides lifecycle callbacks and can be recreated automatically by the FragmentManager. And the project entirely separates the business logic code into a submodule so you can maintain and test them separately.

This project uses the router APIs (UIRouter.kt) generated by Meepo to navigate between Activities. You can call these APIs directly in the Presenter just like here. And this project uses Robolectric to test the data services (/bussiness logic). Check the GankServiceTest.kt for more detail.

Contribution

Feel free to contribute to this project by either raising issues or handing in pull requests.