Anastasia Rozovskaya
09/20/2021, 10:27 AMMichal
09/20/2021, 12:21 PMZoltan Demant
09/20/2021, 2:24 PMBox
that renders an arc with Canvas
and a centered `Text`; why is the Box
sizing wrong if contentAlignment is set to center? 🧵Bradleycorn
09/20/2021, 2:56 PM@Preview
composable, is there any way to get it to render a piece of UI with focus applied? I tried adding a FocusRequester
and using a LaunchedEffect
in the preview to request focus, but that doesn’t seem to work in the preview.Napa Ram
09/20/2021, 2:57 PMSusheel
09/20/2021, 3:56 PMtheapache64
09/20/2021, 4:43 PMMutableTransitionState
(MTS) with updateTransition
is only useful if we want to update the state within the composable. If we simply want to access the MTS#currentState
, MTS#targetState
and MTS#isIdle
, we can use Transition#currentState
, Transition#targetState
and Transition#isRunning
respectively. Please correct me if am wrong.Ernestas
09/20/2021, 5:55 PMPiotr Prus
09/20/2021, 7:26 PMIntrinsicSize
and layout.measure
, but I cannot make it work. I managed to have a square card, but items are not in center. More in thread 👇Bradleycorn
09/20/2021, 7:47 PMTextField
value and State.
Can someone explain why, given the following composable:
var text by remember { mutableStateOf("") }
TextField(
value = text,
onValueChange = { newText ->
Log.d("TEXTFIELD", "NewText: $newText")
val editedText = newText.replace(Regex("\\D"), "")
if (editedText.startsWith("1"))
text = editedText
}
)
If I type the number 5 into the text field four times, the result I see in LogCat is:
D/TEXTFIELD: NewText: 5
D/TEXTFIELD: NewText: 5
D/TEXTFIELD: NewText: 55
D/TEXTFIELD: NewText: 5
I’m stumped?itnoles
09/21/2021, 12:38 AMdambakk
09/21/2021, 8:18 AMTestNavHostController
as NavHostController
parameter (defaults to rememberAnimatedNavController
) but get an exception when the building the navgraph:
androidx.navigation.testing.TestNavigatorProvider$navigator$1 cannot be cast to com.google.accompanist.navigation.animation.AnimatedComposeNavigator
at com.google.accompanist.navigation.animation.NavGraphBuilderKt.composable(NavGraphBuilder.kt:124)
Doesnt the accompanist nav animation lib support testing yet?
(code in 🧵)Akram Bensalem
09/21/2021, 8:39 AMval mapView = rememberMapViewWithLifecycle()
Roman Polach
09/21/2021, 10:11 AMOrhan Tozan
09/21/2021, 10:27 AMsuppressKotlinVersionCompatibilityCheck
but don't say I didn't warn you!).`
while my kotlin version is currently at 1.5.21, with this in my root gradle file: classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
Jakub Doležal
09/21/2021, 11:23 AMModalBottomSheetLayout
. Clicking on Scrim
area above the modal doesn't close it.
According to a documentation a click should close it. Can you please confirm this is a bug?Joey
09/21/2021, 11:46 AMScrollableTabRowMinimumTabWidth
? Or do I have to copy the full implementation to make this change?Lilly
09/21/2021, 3:10 PMMichał Diner
09/21/2021, 4:05 PMcontent: @Composable ColumnScope.() -> Unit
in
content: @Composable () -> Unit
and invoking it in
AnimatedVisibility(...) {
content()
}
Cancels the ColumnScope?carbaj0
09/21/2021, 4:28 PMAsh
09/21/2021, 11:51 PMOG
09/22/2021, 5:31 AMjames
09/22/2021, 6:53 AMJoey
09/22/2021, 7:11 AMLuka
09/22/2021, 12:09 PMCicero
09/22/2021, 1:03 PMrajesh
09/22/2021, 2:49 PMorangy
data class ShapeStroke(val width: Dp, val color: Color)
I want to write a function
fun <S> Transition<S>.animateShapeStroke() : State<ShapeStroke>
so that it would just add child animations for width and color and return State<ShapeStroke>
instance. What’s proper way to do this?Alexa_Gal
09/22/2021, 7:10 PMandroidTest
and im having some problems trying to mock the ViewController of my view, maybe im doing something working but i would like to test only the view without the view controller (i already have the Unit test for my view controller)
how would you do it using hilt and compose-navigation (HiltAndroidTest
)Ink
09/22/2021, 9:19 PMdefaultMinSize
to e.g. 40.dp it looks good but I don't want that big
Code in thread: