Jason Ankers
06/18/2021, 4:16 AMAbhishek Dewan
06/18/2021, 5:02 AMRavi
06/18/2021, 9:22 AMfuhao
06/18/2021, 10:01 AMalorma
06/18/2021, 11:52 AMAlertDialog
can be shown up in the same way as Snackbars
, using state host and etc...
https://github.com/alorma/ComposeDialogs
Any feedback? Do you belive it could be a good library?jannis
06/18/2021, 12:42 PMThis version (1.0.0-beta09) of the Compose Compiler requires Kotlin version 1.5.10 but you appear to be using Kotlin version 1.4.31 which is not known to be compatible. Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
I saw some people had the same problem with previous compose versions. But it seems they had no success in solving this problem. Anyone has an idea? I tried to include the kotlinCompilerVersion
. No success with or without it. I’m using Kotlin Gradle Scripts.cb
06/18/2021, 2:54 PMdimsuz
06/18/2021, 3:03 PMOutline
, can I create any shape, even non-convex one and it will cast a shadow? Can I do something like this? (this is a space between two `Surface`s)
Or do the pre-compose limitations to outlines still hold?Ciprian Grigor
06/18/2021, 3:19 PMUnable to find method ''java.lang.String com.android.utils.FileUtils.relativePossiblyNonExistingPath(java.io.File, java.io.File)''
...
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
Tolriq
06/18/2021, 4:04 PMvectorDrawables { useSupportLibrary = true }
is set. Is this necessary? Since compose does not use the appcompat layout inflater I would have supposed this have no effect.natario1
06/18/2021, 5:15 PMBasicTextField
and I want to use a BackHandler
to go out of it. However, if the text field has focus, the first "back" press is caught by the field to unfocus itself. Only the second one will invoke the back handler. Is there any way around this?Slackbot
06/18/2021, 8:28 PMColton Idle
06/18/2021, 9:16 PM@Composable
fun MyComposable(changed: () -> Unit)`
and I want to invoke the lambda passed in during a click would I do?
1. Modifier.clickable { changed() }
2. Modifier.clickable { changed }
3. Modifier.clickable { changed.invoke() }
Number 1 and 3 seem to work, but I feel like I can never remember what to use and when to use it. Any tips?tad
06/19/2021, 12:32 AMAditya Thakar
06/19/2021, 6:57 AMPaul Woitaschek
06/19/2021, 8:00 AMSlackbot
06/19/2021, 3:09 PMSlackbot
06/19/2021, 3:09 PMSlackbot
06/19/2021, 8:34 PMAbdalla Hassanin
06/20/2021, 3:12 AMAdib Faramarzi
06/20/2021, 4:03 AMKunal Raghav
06/20/2021, 9:46 AMgitai
06/20/2021, 11:01 AMremember()
over rememberSaveable()
? and … is it really required to explicitly call remember()
in such use-case?
For example, here (see code in reply) the compiler will presumably add code to the Button
composable content lambda to implicitly "remember" the captured MutableState<Boolean>
instance referenced by hidden
and restore it when the Button
is clicked - that is when executing the content lambda again during recomposition. Since this lambda in the only composable to run upon such event I don't see why you would explicitly remember hidden
at it’s declaration point, which kind of leads to a more basic question: Should we use remember()
/ rememberSaveable()
"defensibly" to guard against recompositions at higher levels which may happen "out of the blue" ?Shakil Karim
06/20/2021, 12:28 PMMjahangiry75
06/20/2021, 1:23 PMregisterForActivityResult(ActivityResultContracts.StartActivityForResult())
error in threadSe7eN
06/20/2021, 1:29 PMDaniel
06/21/2021, 3:14 AMLocalActivity
to use with some legacy stuff, so I'm thinking of making it a LocalMySpecificActivity
and adding methods like registerOnDestroy
to it. Is there a better solution?Attila Blenesi
06/21/2021, 6:57 AMTextUnit
from Android XML resources?
dimensionResource(...)
works great for dp
is there an equivalent for sp
? 🤔pavi2410
06/21/2021, 7:44 AMBottomNavigation
doesn't cast a shadow upwards, although I've set elevation = 16.dp
to it.Alex
06/21/2021, 8:48 AMAlex
06/21/2021, 8:48 AMAdam Powell
06/21/2021, 1:59 PMAlex
06/24/2021, 5:55 PMAdam Powell
06/24/2021, 6:55 PMLouis Pullen-Freilich [G]
06/24/2021, 7:03 PMAlex
06/25/2021, 8:47 AMLouis Pullen-Freilich [G]
06/25/2021, 1:56 PMthat this customization was possible via a style when using the xml based implementation of the OutlinedTextField and now it’s gone in the compose version.Parity between XML / Compose is a non-goal: we aim to implement the Material specification, and customization provided by the spec. Adding customization for things not in the spec makes it hard to reconcile our APIs with spec updates, and it makes it hard for us to define what our components actually support.
I completely understand your point about not wanting to bloat textfields, but completely reimplementing a TextField just to change the border size seems pretty strange to me?It’s not really about how large the change is - if there is a change from the component we have provided, it is natural to need to build your own. This very quickly devolves into a slippery slope of customization too - if you can change the border width in the public API, then maybe that will work for a while, but what if you then want to also change the border to be dashed, and add a separate internal divider between an icon and the text. At some point you will need to build your own, and if we don’t have the clear line of ‘we support the specification’, then it becomes very hard for developers to reason about what they can expect to do, and also very hard for us to manage feature requests and decide what is reasonable to add. The text field APIs are already some of if not the most complicated Material APIs due to their size, so ensuring they are easy to use and understand for the default cases is also important. On a side note we have received many requests to customize the internal padding, but I believe this is the first request for border width, so this would appear to be lower priority for most developers. Also as I mentioned previously, we would like for ‘reimplementing a text field’ to be a few lines of intermediary API (similar to other components like if you wanted to build your own Button or Tab), not the large amount of copy and pasting you would need currently. In that case, there really isn’t much cost to building your own version with a different border, most of the challenge here is because of how complicated text fields are, with all their different states and moving internal components.
Changing the outline shape was added recentlyThis is something explicitly mentioned in the spec - outlined text fields should use a shape from the theme by default, so naturally this should be customized locally too. Border width is fixed and not something that should be customized - it is intrinsic to the component itself.
Alex
07/05/2021, 5:30 PMlouiscad
07/05/2021, 5:33 PM