Status Update
Comments
cl...@google.com <cl...@google.com>
cl...@google.com <cl...@google.com> #2
You may create a LazyPagingItems
through the extension
To construct a Flow<PagingData>
from static sample data for your preview, you can use
ap...@google.com <ap...@google.com> #3
The preview did compile, but no items displayed, other UI components such as Button works fine though.
The code now:
@Preview
@Composable
fun Preview() {
val usersFlow = flowOf(
PagingData.from(
listOf(
User("123", "33423", "2211", "Makanan", "Dapur", "Risal", "User", "Masakka")
)
)
)
DefaultTheme {
Surface() {
MainUi(
users = usersFlow.collectAsLazyPagingItems(),
onEditItem = {},
onDeleteItem = {}
) {
}
}
}
}
ap...@google.com <ap...@google.com> #4
I don't know if this is related but the IDE give me this message
High number of internal exceptions has been detected. This indicates a serious problem with the IDE. Please consider clean reinstall of Android Studio. If the problem persists, please report a bug by following the link below.
Build: AI-203.7717.56.2031.7583922, 202107261959,
AI-203.7717.56.2031.7583922, JRE 11.0.10+0-b96-7249189x64 JetBrains s.r.o., OS Linux(amd64) v5.11.0-7620-generic, screens 1920.0x1080.0, 1920.0x1080.0
AS: Arctic Fox | 2020.3.1; Kotlin plugin: 203-1.5.21-release-328-AS7717.8; Android Gradle Plugin: 7.0.0; Gradle: 7.0.2; Gradle JDK: version 11.0.10; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
Description
This is partially in response to
A sample use case is when db write happens but the paging source does not invalidate in time, resulting in paging source loading wrong data.