pourpre
11/04/2020, 5:44 PMVivek Sharma
11/04/2020, 6:58 PMTash
11/04/2020, 7:58 PMAS 4.2 Canary 15
& 1.0.0-alpha04
:
e: java.lang.IllegalArgumentException: Unbound type parameters are forbidden: [Unbound private symbol org.jetbrains.kotlin.ir.symbols.impl.IrTypeParameterSymbolImpl@4decb5a, Unbound private symbol org.jetbrains.kotlin.ir.symbols.impl.IrTypeParameterSymbolImpl@45aa5e3d]
Haven't had success with isolating it to anything in particular. Anyone know what might be causing this?Gabriel
11/04/2020, 7:59 PMmutableStateOf
is something that was introduced as part of compose right?Gabriel
11/04/2020, 8:01 PMvar imageItems: List<ImageItem> by mutableStateOf(listOf())
private set
and then my mock looks like this
@Mock
lateinit var viewModel: ImageListViewModel
...
`when`(viewModel.imageItems).thenReturn(listOf())
but doing this gives me an error:
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object androidx.compose.runtime.State.getValue()' on a null object reference
would anyone know what I'm doing wrong?Manuel Lorenzo
11/04/2020, 11:07 PMLazyColumnFor
, and I’m also using the navigation for compose. My question is that when I click on an item from the composable that has the LazyColumnFor
I’m navigating to the detail composable of that item (let’s call it ItemDetail
) and here, I see that the content is between the top bar and the bottom nav bar of the scaffold of the parent component. Is it possible to have a reference to the top bar and the bottom nav bar? For example I want to add the back arrow to the top bar for the up navigation. Thanks in advance!Colton Idle
11/05/2020, 12:43 AMArchie
11/05/2020, 5:40 AMstringResource(...)
? Since navArgument(...)
isn't a @Composable
function, its not possible to do:
composable(
route = Screen.route + ...,
arguments = listOf(
navArgument("NAME") {
defaultValue = stringResource(id = R.string.placeholder)
},
),
) {
...
}
Kshitij Patil
11/05/2020, 6:14 AMKarthick
11/05/2020, 10:38 AMDavid Wadge
11/05/2020, 11:31 AMOutlinedTextField
not displaying the keyboard on focus?Grigorii Yurkov
11/05/2020, 12:12 PMImage
?Lilly
11/05/2020, 12:56 PMArun
11/05/2020, 2:29 PMDivider
composable for horizontal dividers. Will there be a counterpart for vertical?alorma
11/05/2020, 2:33 PMprefredHeight
won't it work?Grigorii Yurkov
11/05/2020, 3:54 PMValueAnimator
with some function from compose, or we still have to use it? In my case I need to show CircularProgressIndicator
animation from 0% to 100% with 500ms duration triggered by button clickDavid Attias
11/05/2020, 4:23 PMVivek Sharma
11/05/2020, 6:09 PMTash
11/05/2020, 6:20 PMtransitionDefinition
to build out the flow. Is that the best way to accomplish something like this?grandstaish
11/05/2020, 7:54 PMLinearGradient
brush in a parent draw modifier, and have a child composable’s draw modifier later use that same LinearGradient
. (This would ensure that I have the same colours and size when the child uses it.)
Follow up q: is there anything that I can use within a draw scope that would allow me to know the current composable’s coordinate offset relative to another parent? I.e. the compose equivalent of offsetDescendantRect
redrield
11/05/2020, 8:12 PMFloatingActionButton
that I'm missing? cause the only solution i can seem to find is just copying the declaration from compose and adding a new parametergpaligot
11/05/2020, 8:16 PMnavController.navigate("my_route")
, I got an error because it doesn’t find any signature with just a string as first parameter.
Someone have any idea why?
My full source code:
@Composable
fun Screen() {
val navController = rememberNavController()
NavHost(navController, startDestination = "movies") {
composable("movies") {
MovieHome(navController = navController, movies = movies) {
navController.navigate("movies_detail")
}
}
composable("movies_detail") {
MovieDetails(movie = joker)
}
}
}
Vincent tiensi
11/05/2020, 9:26 PMLazyColumn
with pager.flow.collectAsLazyPagingItems
? Right now in order to save both state and items I’ve been lifting out the collectAsLazyPagingItems
output and storing it directly in the fragment since I can only call this method in a @composable and the queried list item data is nested into the PagePresenter.Patrick Yin
11/05/2020, 11:03 PMView.announceForAccessibility(String)
?redrield
11/06/2020, 1:07 AMziv kesten
11/06/2020, 8:44 AMKshitij Patil
11/06/2020, 9:00 AMAndroidView
?Ashwani Singh
11/06/2020, 2:07 PMKamilH
11/06/2020, 2:18 PMpositionInRoot
after that I would like to show another composable which would be full screen (would have the same size as root) and then position some composable in a position I gathered before. Is something like that possible? Maybe there is a method that will let me put (or try to put if it’s in bounds) placable
position relative to root?James Ward
11/06/2020, 3:23 PM@Composable
fun MyButton() {
Button(onClick = {
launchInComposition {
delay(10)
}
}) {
Text("hello, world")
}
}
And getting: @Composable invocations can only happen from the context of a @Composable function
James Ward
11/06/2020, 3:23 PM@Composable
fun MyButton() {
Button(onClick = {
launchInComposition {
delay(10)
}
}) {
Text("hello, world")
}
}
And getting: @Composable invocations can only happen from the context of a @Composable function
@Composable
fun MyButton() {
val scope = remember { CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate) }
onActive { onDispose { scope.cancel() } }
Button(onClick = {
scope.launch {
delay(1000)
println("asdf")
}
}) {
Text("hello, world")
}
}
Grigorii Yurkov
11/06/2020, 4:08 PMrememberCoroutineScope()