bj0
11/08/2017, 5:47 PMNumberFormatException
than your string probably isn't able to be represented as a Long
Minty
11/09/2017, 8:40 AMkingsley.gomes
11/09/2017, 11:24 AMval flowable = mWebService?.getData
flowable?.subscribeOn(<http://io.reactivex.schedulers.Schedulers.io|io.reactivex.schedulers.Schedulers.io>())
?.subscribe({ response ->
Logger.i(TAG, "onNext $response")
return true //<------------ how do I return this
}, { throwable ->
Logger.i(TAG, "onError $throwable")
}, {
Logger.i(TAG, "onCompleted")
})
kenkyee
11/09/2017, 11:28 AMkhanhbkqt
11/10/2017, 2:39 AMRegan Russell
11/10/2017, 3:52 AMMinty
11/10/2017, 7:14 AMrkeazor
11/10/2017, 1:08 PMnil2l
11/10/2017, 1:22 PMnoahconnors
11/10/2017, 2:23 PMrkeazor
11/11/2017, 7:35 PMrwachol
11/11/2017, 10:36 PMPavlo Liapota
11/13/2017, 7:54 AM0 -> { -> FragmentA() }
Kulwinder Singh
11/13/2017, 10:08 AMrealm.where(DataPan::class.java).findAll().deleteAllFromRealm()
only deletes DataPan but not fields that are inside DataPan
like time
of type TimeInfo
is not deleted (edited)
please anybody help with thisoday
11/13/2017, 11:03 AMmnawrot
11/13/2017, 12:37 PMBaseViewModelFactory<VM>
class to provide new architecture component's view models.
i wanted to call isAssignable(...)
function before i create actual viewmodel, to check if everything is fine, but in order to do that, the viewmodel type VM
have to be reified and i dont know how to call inline reified function from overriden ViewModelProviders.Factory create()
function
currently i got something like this :
abstract class BaseViewModelFactory<out VM : Any>(private val viewModelClass: KClass<VM>) : ViewModelProvider.Factory {
@Suppress("unchecked_cast")
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
require(modelClass.isAssignableFrom(viewModelClass.java)) {
"Could not instantiate ${javaClass.simpleName} class"
}
return createViewModel() as T
}
abstract protected fun createViewModel(): VM
}
is there a way to avoid passing viewModelClass in constructor and somehow use reified type parameter here?Eduard Boloș
11/13/2017, 7:53 PMitnoles
11/13/2017, 9:44 PMneuber
11/14/2017, 12:01 AMedwardwongtl
11/14/2017, 8:12 AMmenegatti
11/14/2017, 8:16 AMIDENTITY
is the default one, which means gson will convert fields whose names are exactly the same as the keys in your json objectPaul Woitaschek
11/14/2017, 11:02 AMadinugroho
11/14/2017, 4:08 PMsngrekov
11/14/2017, 4:23 PMtgmcians
11/14/2017, 5:04 PMFederico Oldrini
11/15/2017, 9:20 AMMinty
11/15/2017, 9:31 AMsmilecs
11/15/2017, 1:47 PMprivate fun providesGson(): Gson {
val gsonBuilder = GsonBuilder()
gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE)
return gsonBuilder.create()
}
dr.henry
11/15/2017, 6:33 PMedwardwongtl
11/16/2017, 6:00 AMval date
and val source
?edwardwongtl
11/16/2017, 6:00 AMval date
and val source
?oianmol
11/16/2017, 6:01 AMgildor
11/16/2017, 6:03 AMTextMessage(text = "my text")
and should work already with your codeTextMessage("my text")
insteadoianmol
11/16/2017, 6:05 AMgildor
11/16/2017, 6:07 AMoianmol
11/16/2017, 6:07 AMTextMessage(text = "my text")
gildor
11/16/2017, 6:08 AMdata class TextMessage(
var text: String,
override var date: Long = 0L,
override var source: MessageSource = MessageSource.BOT,
override var type: MessageType = MessageType.TEXT
) : Message()