mg6maciej
05/22/2017, 12:59 PMp0
and p1
as argument names to make code shorter. Rather remove unnecessary ?
here and there.Moe
05/22/2017, 1:43 PMsankarvaiyapuri
05/22/2017, 1:51 PMcuddlecheek
05/22/2017, 2:51 PMrwachol
05/22/2017, 3:32 PMzak.taccardi
05/22/2017, 4:49 PMkotlin-android
plugin?khacpv
05/22/2017, 5:06 PMkotlin-android-extensions
only support for productFlavours without buildTypes. import kotlinx.android.synthetic.debug.activity_main
but not success. How do you know use the plugin with buildTypes (ex: debug & release)? 🙌ra1nmak3r
05/22/2017, 10:42 PMblakelee
05/23/2017, 6:14 AMviewModel.getClasses().observe(this, object : Observer<MutableList<Classes>> {
override fun onChanged(classes: MutableList<Classes>?) {
}
})
Kotlin is yelling at me about the object : Observer<MutableList<Classes>>
part
Is this the same as the previous?
viewModel.getClasses().observe(this, Observer<MutableList<Classes>> {
it?.let { classAdapter.notifyDataSetChanged() }
})
chris.zou
05/23/2017, 8:17 AMperson1 = Person(name = "chris", age = 18)
, and person2 = Person(name = "chris", age = 20)
, Is there a way that I can check the diff between person1 and person2 is property age
, besides checking the properties one-by-one myself?smuldr
05/23/2017, 9:06 AM* What went wrong:
Circular dependency between the following tasks:
:dto:compileReleaseKotlin
\--- :dto:kaptReleaseKotlin
\--- :dto:compileReleaseKotlin (*)
Anyone else with the same issue?igroeg
05/23/2017, 9:24 AMaudhil
05/23/2017, 12:37 PMmyanmarking
05/23/2017, 12:56 PMihor.kucherenko
05/23/2017, 5:02 PMjw
05/23/2017, 5:11 PMDaniel
05/23/2017, 9:19 PMjanechung
05/23/2017, 11:14 PMvmironov
05/24/2017, 1:25 PMremoveOnGlobalLayoutListener(this)
alex.hart
05/24/2017, 4:09 PMyperess
05/24/2017, 4:29 PMmyanmarking
05/24/2017, 4:41 PMdata API(val auth: AuthenticationApi) ...
jw
05/24/2017, 5:18 PM@JvmSuppressWildcard
to get rid of the extendskirillrakhman
05/24/2017, 5:24 PM@Binds @IntoMap @ClassKey(UserViewModel::class)
abstract fun bindUserViewModel(vm: UserViewModel) : UserViewModel
@Binds @IntoMap @ClassKey(UserViewModel::class)
abstract fun bindUserViewModel(vm: UserViewModel) : ViewModel
@Binds @IntoMap @ViewModelKey(UserViewModel::class)
abstract fun bindUserViewModel(vm: UserViewModel) : UserViewModel
@Binds @IntoMap @ViewModelKey(UserViewModel::class)
abstract fun bindUserViewModel(vm: UserViewModel) : ViewModel
where
@MustBeDocumented
@Target(AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
@MapKey
annotation class ViewModelKey(val value: KClass<out ViewModel>)
mg6maciej
05/24/2017, 8:39 PMinline fun <reified T : ViewModel> FragmentActivity.getViewModel(key: String? = null): T {
val provider = ViewModelProviders.of(this)
return if (key != null) {
provider.get(key, T::class.java)
} else {
provider.get(T::class.java)
}
}
usage:
userViewModel = getViewModel()
instead of:
userViewModel = ViewModelProviders.of(this).get(UserViewModel::class.java)
Paul Woitaschek
05/25/2017, 9:10 AMrwachol
05/25/2017, 9:19 AMravidsrk
05/25/2017, 12:43 PMmanzar
05/25/2017, 5:26 PMrwachol
05/26/2017, 8:13 AMrwachol
05/26/2017, 8:13 AMDavid W
05/26/2017, 11:41 AMrwachol
05/26/2017, 11:41 AMDavid W
05/26/2017, 11:41 AMrwachol
05/26/2017, 12:05 PMDavid W
05/26/2017, 12:06 PMMocking of final classes and methods is an incubating, opt-in feature. It uses a combination of Java agent instrumentation and subclassing in order to enable mockability of these types. As this works differently to our current mechanism and this one has different limitations and as we want to gather experience and user feedback, this feature had to be explicitly activated to be available ; it can be done via the mockito extension mechanism by creating the file src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker containing a single line:
mock-maker-inline
rwachol
05/26/2017, 12:37 PM