kirillrakhman
10/10/2016, 12:41 PMvmironov
10/10/2016, 2:09 PMneilc
10/10/2016, 2:43 PMwithoutclass
10/10/2016, 5:22 PMsreich
10/10/2016, 8:28 PMrharter
10/10/2016, 8:28 PMrharter
10/10/2016, 8:30 PMonCreate
, I want to setContentView(R.layout.foo)
and then configure subviewswithoutclass
10/10/2016, 10:05 PMbrianwernick
10/10/2016, 10:07 PMitemView
to access the synthetic properties (e.g. itemView.titleTextView.text = “foo”
)brianwernick
10/10/2016, 10:07 PMwithoutclass
10/10/2016, 10:26 PMval button by lazy { findViewById(R.id.button) }
withoutclass
10/10/2016, 10:27 PMshaunhubbard
10/11/2016, 12:21 AMstepan.zalis
10/11/2016, 9:42 AMstepango
10/11/2016, 9:43 AMopen
bamdmux
10/11/2016, 9:47 AMchi
10/11/2016, 2:53 PMUnresolved reference: databinding
Error:Execution failed for task ':app:compileDebugKotlinAfterJava'.
> Compilation error. See log for more details
rameshbhupathi
10/12/2016, 6:04 AMkko
10/12/2016, 9:56 AMPresenter
calling View
always happens on UI thread. How (if at all?) does everyone else deal with this?uhe
10/12/2016, 10:10 AMscheduler.after(30.seconds) {
onMainThread {
view?.updateFoo()
}
}
3. If the presenters trigger backend stuff in the model, it kind of depends on your architecture. If you're using EventBus you could use ThreadMode.MAIN
. If you're using Rx you could use main thread schedulers.uhe
10/12/2016, 10:10 AMkko
10/12/2016, 10:11 AMkko
10/12/2016, 10:12 AMkko
10/12/2016, 10:12 AMPresenter
calls back to the View
, stuff like view.errorMessage = "something"
kko
10/12/2016, 10:13 AMview
is usually implemented by Activity
or Fragment
and just forwards to actual UI elementskko
10/12/2016, 10:14 AMPresenter
that does the marshalling to UI thread and I constantly need to think what thread I will be calling the View
on...kko
10/12/2016, 10:14 AMkko
10/12/2016, 10:15 AMkko
10/12/2016, 10:16 AMkko
10/12/2016, 10:26 AMval activity = breakAbstractionAndGetActivityInstance()
activity.runOnUiThread{
view.someStuff("hello")
}
I have
ui(view) {
someStuff("hello")
}