- saving Presenter's instance during screen rotation (See Wiki)
- don't keep activities mode support (See Wiki)
- onActivityResult events handling (See Wiki)
- permissions management (See Wiki)
- lifecycle events handling (See wiki)
- saving and restoring View state without onSaveInstanceState() and Bundle (See Wiki)
- Kotlin coroutines support (See Wiki)
- RxJava 1, 2 support (See Wiki)
See project sample and Wiki
- support for converting models of different levels of abstraction (See Wiki)
- support for collections converting (See Wiki)
- support for interfaces converting (See Wiki)
interface User {
val name: String
val password: String
}
data class UserRest(val name: String, val password: String)
data class UserDb(val name: String, val password: String)
data class UserImpl(override val name: String, override val password: String): User
val context: ConvertersContext = ConvertersContextImpl()
context.registerConverter { input: User -> UserDb(input.name, input.password) }
context.registerConverter { input: UserRest -> UserImpl(input.name, input.password) }
val userDb = UserDb("Name1", "Password1")
val userRest = UserRest("Name1", "Password1")
val userImpl = UserImpl("Name1", "Password1")
val convertedRestToImpl: User = context.convert(userRest)
val convertedImplToDb: UserDb = context.convert(userImpl)
assertEquals(userImpl, convertedRestToImpl)
assertEquals(userDb, convertedImplToDb)
You can use any of this dependencies
or just download zip and import module to be able to modify the sources
MIT License
Copyright (c) 2018 i-petro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.