Giter Site home page Giter Site logo

plastix / kotlin-android-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
279.0 279.0 49.0 4.8 MB

Kotlin Android boilerplate project with MVVM architecture using RxJava, Dagger 2, and more!

License: MIT License

Kotlin 98.86% Shell 1.14%
android android-sdk android-studio kotlin

kotlin-android-boilerplate's People

Contributors

marcinmoskala avatar plastix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kotlin-android-boilerplate's Issues

Using Service

Hi,

I'm trying to learn Dagger 2 and MVP pattern and find this repo really clean. I want to use MediaPlayer and in DetailActivity and create also a Background Service. How should I implement Module or Component for this purpose?

Thanks

Issue using PresenterFragment

Hey,
I'm trying to extend PresenterFragment to use like you do with Activites,
however, i'm getting an issue:

kotlin.UninitializedPropertyAccessException: lateinit property presenterLoaderProvider has not been initialized
                                                                                       at com.github.tehras.loanapplication.ui.base.PresenterFragment.onCreateLoader(PresenterFragment.kt:69)

Any ideas why this could be happening?

Fragment Example on MVVM

I like the boilerplate and I plan on basing my app off it, however I have a bottom navigation view with multiple views for my app, so I'd like to see a Fragment example for MVVM. I'm still learning and I fear I will do it wrongly then I end up leaking and only finding out while in production.

subscribeWith

when i use subscribeWith in kotlin, it called is not a subtype of Observer<in Any!>!,do you know why?

Is this really using package by feature?

In this comment in your reddit post about this project, you said that this project is organized using the package by feature approach. I read the article that you linked to, and I think I sort of understand the idea. However, after examining the structure of your project, I couldn't really see any similarities to what was shown in the article. To be fair, I don't see any files called model, presenter or view, but, I do see data and ui, which sort of sounds like model and view to me. I'm not trying to judge or anything, just understand. I don't know if you'll agree with me, but I think this is a really good example of package by feature. Sorry if this came off as cynical or rude, it's definitley not my intention ๐Ÿ˜„. Hopefully you can shed some light on this for me ๐Ÿ˜†

Rewrite to MVVM architecture

I recently got a chance to use MVVM & Android Databinding in a project and I really like it. I like to think of MVVM has the evolution of MVP since the "presenter" (ViewModel) doesn't contain an instance of the View.

Callback for when the presenter is available for use in the activity?

I am trying to call my presenter method when the activity is created. But it fails because the presenter is not initialised.

How do I handle situations like this? Is it a good idea to have a callback from PresenterActivity when the presenter is loaded?

Thanks

EDIT: Turns out due to the Presenter Loader concept, the presenter will be available onResume() of the activity.

Minor improvements

  • I think ViewGroup.show()/ViewGroup.hide() extension methods are redundant. ViewGroup is a View.
  • View.toggleVisibility() would be a useful addition:
View.toggleVisibility() {
  visibility = if (visibility == View.VISIBLE) View.GONE else VIew.VISIBLE
}

Sorry, too lazy to make a PR currently.

Fragments

Hi,
Could you add sample of multiple fragments in one activity?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.