plastix / kotlin-android-boilerplate Goto Github PK
View Code? Open in Web Editor NEWKotlin Android boilerplate project with MVVM architecture using RxJava, Dagger 2, and more!
License: MIT License
Kotlin Android boilerplate project with MVVM architecture using RxJava, Dagger 2, and more!
License: MIT License
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.
They have too many verifications. Good read: http://www.philosophicalhacker.com/post/how-we-misuse-mocks-for-android-tests
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
Hi,
Could you add sample of multiple fragments in one activity?
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.
I have created yeomon generator to create kotlin app using this boilerplate. https://github.com/ravidsrk/generator-kotlin-android-boilerplate
If this is useful, you can mention the same in your readme.
when i use subscribeWith in kotlin, it called is not a subtype of Observer<in Any!>!,do you know why?
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 ๐
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.
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.
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?
Just FYI...if you want to use a different version of Kotlin for your main app, this will conflict.
I'd rather not use mockito-kotlin because of this...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.