morozov
08/16/2017, 3:20 PMclass AccountModelNode private constructor(val key: String, val isLeaf: Boolean) {
constructor(key: String, value: AccountCardViewModel) : this(key, true) {
this.value = value
}
constructor(key: String, list: List<AccountModelNode>) : this(key, false) {
this.list = list
}
var value: AccountCardViewModel? = null
private set
var list: List<AccountModelNode>? = null
private set
}
and AccoundCardViewModel
- data class, which has some fields:
data class AccountCardViewModel(
val isAutomatic: Boolean = false,
val currencyCode: String = "",
val description: String = "")
How do I use only the AccountCardViewModel fields instead of the AccoundCardViewModel class in the model?arekolek
08/16/2017, 3:56 PMwith
keyword would be of help? https://kotlinlang.org/docs/reference/idioms.html#calling-multiple-methods-on-an-object-instance-with
Do you have an example of what you’d like to do / be able to write?peasee
08/16/2017, 8:14 PMthomazfb
08/16/2017, 8:20 PMpeasee
08/16/2017, 8:22 PMpeasee
08/16/2017, 8:22 PMthomazfb
08/16/2017, 8:23 PMthomazfb
08/16/2017, 8:24 PMthomazfb
08/16/2017, 8:24 PMpeasee
08/16/2017, 8:26 PMthomazfb
08/16/2017, 8:29 PMsenthilkumarv
08/17/2017, 8:44 AMmorozov
08/17/2017, 8:44 AMAccountModelNode(loginGuid, listOf(createLoginSummaryModelNode(loginGuid, realm))
if my AccountModelNode need second parameter like List<AccountModelNode> ?leosan
08/17/2017, 8:50 AM@Parcelize
I'm a suppose to implement something?user
08/17/2017, 8:51 AMhttps://kotlinlang.slack.com/files/U4QQQ0J1H/F6PSGH212/screen_shot_2017-08-17_at_09.49.24.png▾
leosan
08/17/2017, 8:52 AMteachmyselftocode
08/17/2017, 9:06 AMsmilecs
08/17/2017, 9:28 AMmenegatti
08/17/2017, 9:29 AMSavedInstanceState
and getting the store data latermenegatti
08/17/2017, 9:29 AMdnjaramba
08/17/2017, 9:30 AMsmilecs
08/17/2017, 9:31 AMonSaveInstanceState
and put reusable things in the bundlegildor
08/17/2017, 9:31 AMdnjaramba
08/17/2017, 9:34 AMdnjaramba
08/17/2017, 9:34 AMsmilecs
08/17/2017, 9:35 AMsmilecs
08/17/2017, 9:36 AMsmilecs
08/17/2017, 9:36 AMsmilecs
08/17/2017, 9:37 AMgildor
08/17/2017, 9:39 AMshows a white screen and closeslooks like a crash or someone called finish() inside your activity during initialisation of UI