amar_1995
01/31/2020, 12:56 PMjava.lang.ClassCastException: androidx.compose.GroupStart cannot be cast to androidx.ui.foundation.ScrollerPosition
It was working fine in dev03.
Can anyone help me to resolve this error and why this is occuring ??Ian Warwick
01/31/2020, 1:32 PMamar_1995
01/31/2020, 1:39 PMIan Warwick
01/31/2020, 1:41 PMamar_1995
01/31/2020, 1:44 PMIan Warwick
01/31/2020, 1:45 PMdev04
because I think +MaterialTheme is no longer neededMaterialTheme.colors().surface
can be this nowamar_1995
01/31/2020, 1:46 PMvar internationalState = observer(newArticleModel.internationalHeadline)
Surface(color = (MaterialTheme.colors()).surface, modifier = LayoutSize.Fill) {
if (internationalState == null) {
ShowLoading()
} else if (internationalState.isEmpty()) {
NoContentMore()
} else {
val scrollerPosition: ScrollerPosition = remember { ScrollerPosition(0f) }
println("MainActivity data here : " + internationalState)
Observe {
onCommit(scrollerPosition.isAtEndOfList) {
println("Is commit entered")
if(scrollerPosition.isAtEndOfList)
newArticleModel.loadMoreData()
}
}
VerticalScroller(scrollerPosition = scrollerPosition) {
Column(modifier = LayoutSize.Fill) {
println("Page rendering size " + PageSize.topHeadlineInternationalPageNo)
internationalState!!.forEach {
Ripple(bounded = true) {
Clickable() {
ArticleTicket(
backgroundColor = (MaterialTheme.colors()).background,
article = it
)
}
}
}
}
}
}
}
Dev04 codeIan Warwick
01/31/2020, 1:47 PMdev04
now in your project?composeOptions {
kotlinCompilerExtensionVersion "$compose_version"
}
to your gradle files?amar_1995
01/31/2020, 1:48 PMIan Warwick
01/31/2020, 1:48 PMval scrollerPosition: ScrollerPosition = remember { ScrollerPosition(0f) }
amar_1995
01/31/2020, 1:51 PMmatvei
01/31/2020, 1:52 PMIan Warwick
01/31/2020, 1:52 PMmatvei
01/31/2020, 1:53 PMremember {
remember {
}
}
Adam Powell
01/31/2020, 1:53 PMmatvei
01/31/2020, 1:54 PMAdam Powell
01/31/2020, 1:55 PMamar_1995
01/31/2020, 1:56 PM