alorma
09/09/2021, 1:22 PMSurfaces
on it, first of them has an elevation of 8.dp
, however the shadow is not displayed.
If i add some bottom padding to the Surface, then it shows... but... why is that? shouldn't shadow draw over other elements?Bradleycorn
09/09/2021, 3:15 PM@Preview
?
I tried adding a focus requester and requesting focus in a DisposableEffect, but as I suspected, no luck.Rick Regan
09/09/2021, 3:56 PMLaunchedEffect
in my top-level composable to read in app preferences. I have hardcoded defaults for the preferences so that my UI can initially compose. When the stored preferences are loaded, the UI recomposes to match them. This happens quickly, but it's noticeable. I was hoping there was a way to skip right to the stored preferences based composition, i.e., delaying startup composition until the preferences are loaded.rajesh
09/09/2021, 5:42 PMLazyVerticalGrid
to loading images. If there's any error while decoding image bitmap, it shouldn't be loaded (as per code in thread), but LazyVerticalGrid
is using empty cell (shown in image) instead of avoiding that item. what should i do to resolve it?Ash
09/09/2021, 10:33 PMdarkmoon_uk
09/10/2021, 3:11 AM@Preview
annotated functions do not end up in production code?"
☝️ This came as a fair challenge from within our team today.
I'm working in an environment where adherence to architectural layers, and guaranteed correctness is paramount. As such, it was fairly pointed out that @Preview
functions strictly belong in a different place to production code.
There's an obvious tension there between architectural purity and the practical benefits of placing them alongside `@Composable`'s (such as the intent behind the Code / Split / Design pane).
We've arrived at a place where it's deemed acceptable as long as we have a way of guaranteeing that @Preview
annotated functions cannot accidentally make it into a Release build (either as live or dead code). Do any easily configurable means exist today? If not, could we implement something using the recently released KSP?K Merle
09/10/2021, 7:48 AM@Composable
fun <T : FilterModel> FilterScreen(
listResult: Result<List<T>>,
filteredList: (list: List<T>) -> List<T>,
onItemSelect: (T) -> Unit,
navigate: () -> Unit
)
Peter Mandeljc
09/10/2021, 9:31 AMmyanmarking
09/10/2021, 9:38 AMJeff
09/10/2021, 10:16 AMshahroz
09/10/2021, 11:22 AMadjpd
09/10/2021, 11:32 AMСтоян Тинчев
09/10/2021, 12:00 PMZoltan Demant
09/10/2021, 12:39 PMTextField
(width) than the material design one? 🧵👀Dylan
09/10/2021, 2:13 PMTopAppBar
based on the scroll position within a LazyList
. The TopAppBar
is within a Scaffold
, and the Scaffold content is a NavGraph
. This NavGraph contains a composable which contains my LazyList. I tried to do it by creating an AppBarState
which holds the current elevation as a MutableState<Float>
and also the elevationRange (0f..4f
). I also created a LocalAppBarState
which holds the current AppBarState
. The elevation of my TopAppBar
is defined using LocalAppBarState.current.elevation.dp
.
To define the elevation I created a composable that return a LazyListState
. It uses the LocalAppBarState
to define the calculated elevation based on the LazyListState
.
Unfortunately, doing this cause my app to lag when scrolling. But I'm not sure I know any other way to do it. I read some things about Modifier.graphicsLayer
, but even after trying that the issue remains the same. Is there a better way to do it?
I will leave as the first comment in this thread the code for all of that.myanmarking
09/10/2021, 2:17 PMste
09/10/2021, 2:18 PMModifier
that disables any gesture detection of its children? I don't want children to override gestures of their parentsmyanmarking
09/10/2021, 3:23 PMgeorgiy.shur
09/10/2021, 3:48 PM@AndroidEntryPoint
class CustomComposeView(context: Context)
: AbstractComposeView(context, null, 0)
But I’m getting an error:
The base class, 'androidx.compose.ui.platform.AbstractComposeView', of the @AndroidEntryPoint, 'com.example.CustomComposeView', contains a constructor with default parameters. This is currently not supported by the Gradle plugin. Either specify the base class as described at <https://dagger.dev/hilt/gradle-setup#why-use-the-plugin> or remove the default value declaration.
I cannot modify the base class because I don’t own it and I don’t understand where should I specify the base class. Any ideas?myanmarking
09/10/2021, 3:56 PMJustin Yue
09/10/2021, 5:03 PMlaunchedEffect
of my main screen, but the app then momentarily shows the main screen before navigating to the auth screen if no user is logged in. I would like to remove the delay in navigating to the auth screen. I'm not entirely sure if using launchedEffect
in this case is best practice too.Waqas Tahir
09/10/2021, 5:07 PMmyanmarking
09/10/2021, 5:28 PMbrabo-hi
09/10/2021, 5:33 PMVinícius Santos
09/10/2021, 5:39 PMBradleycorn
09/10/2021, 8:10 PMTextField
composable with masking/formatting of input (for example to format a phone number or date)?rajesh
09/10/2021, 9:19 PMjosefdolezal
09/10/2021, 10:09 PMisLoading
variable alongside animating progress indicator’s visibilityTash
09/10/2021, 10:15 PMmutableStateOf
s or other snapshot state APIs outside of an Android integration test?
We are defining some models with snapshot state APIs that we would like to just have unit tests for, since we don’t have CI infra set up for Android integration tests.Sergey Y.
09/10/2021, 10:28 PMSergey Y.
09/10/2021, 10:28 PMandrew
09/11/2021, 4:59 PMSergey Y.
09/13/2021, 12:00 AMandrew
09/13/2021, 1:09 AMSergey Y.
09/13/2021, 6:50 PMandrew
09/19/2021, 6:34 PM