yousuf.haque
10/11/2017, 3:14 AMaddFunc
as a dep for plus3
, but if you delete that, and only have provideAddFunc
and val addFunc
on the component, everything works fine, and can be injected etcedwardwongtl
10/11/2017, 3:19 AM@Inject
on the fun providePlus3
?yousuf.haque
10/11/2017, 3:27 AMprivate val plus3 : (Int) -> Int by lazy { component.plus3 }
codeslubber
10/11/2017, 9:10 AMcodeslubber
10/11/2017, 9:12 AMcodeslubber
10/11/2017, 9:35 AMjw
10/11/2017, 3:31 PMdoug
10/11/2017, 4:16 PMjw
10/11/2017, 4:18 PMMarcin Wisniowski
12/10/2017, 3:32 AMmnaraniya
12/10/2017, 6:48 AMadam-mcneilly
12/10/2017, 6:54 AMval numbers = myString.filter { it.isDigit() }
vicky7230
12/10/2017, 9:31 AMuser
12/10/2017, 9:40 AMhttps://kotlinlang.slack.com/files/U6NMMDGMA/F8D7N9Q30/df.png▾
user
12/10/2017, 9:41 AMhttps://kotlinlang.slack.com/files/U6NMMDGMA/F8D7N9Q30/df.png▾
if else
, i.e.
if (boolean) null else "Invalid Email"
vicky7230
12/10/2017, 3:22 PMjkiefer
12/10/2017, 3:53 PMabstract class BaseActivity<T : ViewDataBinding, V : BaseViewModel> : AppCompatActivity() {
private val mViewDataBinding: T? = null
private val mBaseViewModel: V? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
}
jkiefer
12/10/2017, 3:53 PMjkiefer
12/10/2017, 3:54 PMshift + command + a
followed by convert to kotlin
works wonders on existing java classesvicky7230
12/10/2017, 5:42 PMuser
12/10/2017, 7:01 PMhttps://kotlinlang.slack.com/files/U6NMMDGMA/F8BTQU401/ba.png▾
stantronic
12/10/2017, 9:52 PMrkeazor
12/10/2017, 9:53 PMstantronic
12/10/2017, 9:56 PMdavid.bilik
12/10/2017, 9:57 PMdavid.bilik
12/10/2017, 9:57 PMdave08
12/11/2017, 3:04 AMlouiscad
12/11/2017, 7:09 AM@Deprecated
along with ReplaceWith
when the API stabilizes, and I know of the more traditional Android Architecture Components approach which is just using alpha and beta keywords. Could you help me decide by telling and possibly weighing the pros and cons you find in these approaches or others you know? Thanks for your help!gildor
12/11/2017, 11:17 AMadam-mcneilly
12/11/2017, 2:11 PM