Yoshio Schermer
02/21/2022, 1:51 PMmertceyhan
02/21/2022, 2:01 PMsingleLine = true
on OutlinedTextField
. I’ve checked the case on EditText that comes from View class but it worked well. Is this bug or something else? Here is the code:
Column(modifier = Modifier.padding(16.dp)) {
var outlinedTextFieldValue by remember { mutableStateOf("") }
OutlinedTextField(
value = outlinedTextFieldValue,
onValueChange = { newValue ->
outlinedTextFieldValue = newValue
},
placeholder = { Text(text = "OutlinedTextField") },
singleLine = true,
maxLines = 1
)
AndroidView(factory = { context ->
EditText(context).apply {
hint = "EditText build by AndroidView"
maxLines = 1
isSingleLine = true
}
})
}
Ivan Skiridomov
02/21/2022, 3:35 PMRajashekar
02/21/2022, 4:30 PMval bottomSheetScaffoldState = rememberBottomSheetScaffoldState(
bottomSheetState = rememberBottomSheetState(
initialValue = BottomSheetValue.Expanded,
animationSpec = tween(durationMillis = 500, delayMillis = 100),
)
)
Surface(
color = MaterialTheme.colors.primary
) {
BottomSheetScaffold(
sheetShape = RectangleShape,
backgroundColor = MaterialTheme.colors.primary,
bottomSheetScaffoldState = bottomSheetScaffoldState,
sheetPeekHeight = 0.dp,
sheetGesturesEnabled = false,
sheetContent = { DialPadContent(viewModel, scaffoldState) },
) {
// Screen content
}
}
lbarqueira
02/21/2022, 5:05 PMste
02/21/2022, 6:00 PMPrimaryButton
, PrimaryIconButton
) with more LOC as side effect, or by taking multiple parameters (PrimaryButton(icon: Int?)
) with more control flow structures and overall complexity as a side effect?adjpd
02/21/2022, 6:46 PMtheapache64
02/21/2022, 7:05 PMkey
actually doing to slot table? 🤔 🧵Dan MacNeil
02/21/2022, 7:45 PMI'm having an issue with TextButtons in Compose 1.1.0.
Info:
When you give a button a background color it takes up a certain rectangular area.
If you add a border it draws a rectangle that is larger vertically.
--
The problem I'm having is when I add a background Modifier with a gradient fill.
In Compose 1.0.5 the gradient fill takes up the same area as the button background color.
In Compose 1.1.0 the gradient fill takes the larger area the same as the border takes.
This makes very tall ugly buttons. Is there a way to get the older functionality?
r4phab
02/22/2022, 7:49 AMsunnat629
02/22/2022, 7:58 AMScaffold
. ThanksBino
02/22/2022, 8:19 AMflowWithLifecycle
and keep na uiState in the viewmodel?
flowWithLifecycle
needs the views lifecycleOwner and should not be placed into the viewmodel.
But the content of the observed flow should be placed inside the viewmodel to reduce the composable.
As mentioned in this article by @Manuel Vivo it could sometimes be a use case
martinsumera
02/22/2022, 10:55 AMTobias Gronbach
02/22/2022, 1:01 PMval dialogModifier = Modifier
.padding(10.dp)
.background(MaterialTheme.colors.surface)
.width(400.dp)
But then build is failing with: @Composable invocations can only happen from the context of a @Composable function . What am I doing wrong?Matti MK
02/22/2022, 1:30 PMkrshmbb
02/22/2022, 1:53 PMJérémy CROS
02/22/2022, 3:39 PMIcon(
painter = painterResource(R.drawable.ic_where_am_i_navigation),
contentDescription = stringResource(R.string.content_description_button_where_am_i),
tint = iconTint
)
I’ll add screenshots of the poorly drawn image in a thread.
Two remarks: 1) not all our icons have the issue in compose, most are fine and 2) those “faulty” files worked perfectly in XML (using the standard <ImageButton>
)
Anything we’re missing?Gagan Deep
02/22/2022, 3:47 PMonGlobalLayout
in Compose world?Slackbot
02/22/2022, 4:47 PMBradleycorn
02/22/2022, 5:54 PMpath/to/products/{cateegory}/{id}
), I don’t want to just hard code strings throughout my application (like: navController.navigate("path/to/products/shirts/1234")
. If that route ever changes, I have to find and update it throughout my application. I’m curious what sort of architecture others have used to address this?
My current solution in the 🧵Ink
02/22/2022, 8:18 PMjames
02/22/2022, 9:52 PMandroid:windowSoftInputMode="adjustResize"
, whenever I hide the keyboard while that Modal is currently opened, the Modal re-animates in entirely, creating a really weird feeling UX. I've traced this back to `SwipeableState`'s internal function processNewAnchors()
which is comparing the old and new anchors (obviously different since the whole container is resized) and then re-animating the Modal from closed to open, even though it was already open
has anyone else seen a similar behaviour to this?Ravi
02/22/2022, 10:51 PMSimon Stahl
02/23/2022, 12:04 AMBottomSheetState
when used in BottomSheetScaffold
and decreasing the sheetPeekHeight
. Example code in commentSatria Adi Putra
02/23/2022, 8:06 AMziv kesten
02/23/2022, 5:04 PMtrevjones
02/23/2022, 5:28 PMNat Strangerweather
02/23/2022, 5:52 PMModifier.clickable
I still get no touch sound on my device. Was this ever reported, considered? Are there any workarounds?YASAN
02/23/2022, 7:21 PMColton Idle
02/23/2022, 7:58 PMLazyVerticalGrid
now supports reverseLayout. (I6d7d7, b/215572963, b/211753558)
• Add WindowInsets.only()
method to allow developers to include only dimensions from the WindowInsets. (I14c94, b/217768486)
• Added ComposableTarget
, ComposableTargetMarker
and ComposableOpenTarget
that allows compile time reporting of when a composable function is called targeting an applier it was not designed to use. (I don't understand this one but seems important)
• Add support for filter chips (I39a6e, b/192585545) (I think this means the little chip components are back! Nice!)
• Provided a way to adjust horizontal and vertical paddings in text fields. (OHHHHH YEAHHHH. This question comes up in this slack like once a week. Nice to have an answer to it)
• Added TextFieldDecorationBox
and OutlinedTextFieldDecorationBox
. Using them together with BasicTextField
will help you build custom text field based on Material Design text fields but with more options for customisation. (same as above. more customization)
• Adds Material 3 bottom app bar support (Ic432a)
• Some navigation drawer fixes/changesColton Idle
02/23/2022, 7:58 PMLazyVerticalGrid
now supports reverseLayout. (I6d7d7, b/215572963, b/211753558)
• Add WindowInsets.only()
method to allow developers to include only dimensions from the WindowInsets. (I14c94, b/217768486)
• Added ComposableTarget
, ComposableTargetMarker
and ComposableOpenTarget
that allows compile time reporting of when a composable function is called targeting an applier it was not designed to use. (I don't understand this one but seems important)
• Add support for filter chips (I39a6e, b/192585545) (I think this means the little chip components are back! Nice!)
• Provided a way to adjust horizontal and vertical paddings in text fields. (OHHHHH YEAHHHH. This question comes up in this slack like once a week. Nice to have an answer to it)
• Added TextFieldDecorationBox
and OutlinedTextFieldDecorationBox
. Using them together with BasicTextField
will help you build custom text field based on Material Design text fields but with more options for customisation. (same as above. more customization)
• Adds Material 3 bottom app bar support (Ic432a)
• Some navigation drawer fixes/changesChuck Jazdzewski [G]
02/23/2022, 10:32 PMAddedThese are inferred by the compiler plugin and allow detecting when an,ComposableTarget
andComposableTargetMarker
that allows compile time reporting of when a composable function is called targeting an applier it was not designed to use. (I don't understand this one but seems important)ComposableOpenTarget
@Composable
function is being used to target an applier that it wasn't designed for. For example, it can be used to prevent a Compose UI composable from being used in the context of a Compose for Web applications or vis versa.