gpaligot
08/24/2021, 7:11 PMColor
to a HSL representation but I can only find a HSL to RGB function in the Color
class. Someone can confirm me that the RGB to HSL function doesn't exist?Angeles Bilbao
08/24/2021, 8:39 PMadjpd
08/24/2021, 9:01 PMTextField
focus adding to the backstack problem.Stylianos Gakis
08/24/2021, 9:05 PMState<T>
or just T
. An example from “Crane” the official android samples inside thread 🧵Doris Liu
08/25/2021, 1:27 AMTin Tran
08/25/2021, 7:09 AMandroid:autoSizeMinTextSize="12sp"
android:autoSizeMaxTextSize="100sp"
Magnus Gudmandsen
08/25/2021, 8:16 AMSamiullah Kalhoro
08/25/2021, 9:03 AMDaniele Segato
08/25/2021, 9:11 AMrsktash
08/25/2021, 9:14 AMBenjO
08/25/2021, 10:13 AMRoundedCornerShape(0.dp, 28.dp, 28.dp, 0.dp)
.
the problem is that I need to keep them same CornerSize even when the composable width is really small (see the second picture). RoundedCornerShape adapts the corner size (see the third picture in greyscale)
does anyone have a hint on how to achieve such rendering ? Many thanks !danieldisu
08/25/2021, 11:00 AMHeikki Rauhala
08/25/2021, 11:36 AMlouiscad
08/25/2021, 12:23 PMComposeView
despite the State
objects being mutated from the class holding them?Rafiul Islam
08/25/2021, 12:53 PMNapa Ram
08/25/2021, 12:54 PMtylerwilson
08/25/2021, 12:57 PMrajesh
08/25/2021, 1:34 PMVitalNik
08/25/2021, 2:26 PMRafiul Islam
08/25/2021, 2:32 PMTin Tran
08/25/2021, 2:36 PMThe minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.compose.ui:ui-tooling:1.1.0-alpha02.
Todor Grudev
08/25/2021, 2:46 PMColton Idle
08/25/2021, 3:39 PMalign
, but it works fine if I just drop this image code into a Box. How can I make a reusable bottomAlignedImage composable like this?
@Composable
fun bottomAlignedImage(){
Image(
modifier = Modifier.fillMaxWidth().align(Alignment.BottomCenter),
painter = painterResource(id = R.drawable.myImage),
contentDescription = null
)}
bohregard
08/25/2021, 4:18 PMandroidx.compose.ui.platform.ComposeView
XML file.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="<http://schemas.android.com/apk/res/android>"
android:id="@+id/user_list_fragment_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical">
<androidx.compose.ui.platform.ComposeView
android:id="@+id/composeView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
// Composable
Column(
modifier = Modifier
.fillMaxWidth()
.fillMaxHeight()
.background(Color.White)
) {
Row(
modifier = Modifier.fillMaxWidth()
) {
...
}
LazyColumn(
modifier = Modifier.fillMaxWidth(),
state = listState
) {
...
}
}
If I set the height to a manual number, the last item shows. It’s like the Lazy column is being drawn off screen.
This is in a ViewPager fwiwKaustubh Patange
08/25/2021, 4:29 PMPopup
to achieve this functionality but it would be great if there is an official support from the team.rsktash
08/25/2021, 4:35 PMK Merle
08/25/2021, 4:58 PMScott Kruse
08/25/2021, 5:11 PMSergey Y.
08/25/2021, 5:48 PMNick
08/25/2021, 6:43 PMTheproperty is updated whenever the selected page changes. You can use thePagerState.currentPage
function to observe changes in a flow:snapshowFlow
LaunchedEffect(pagerState) {
snapshotFlow { pagerState.currentPage }.collect { page ->
// Selected page has changed...
}
}
Why can’t I just access the current page via pagerState.currentPage
? Why do I have to wrap it in a LaunchedEffect
and snapshotFlow
?Nick
08/25/2021, 6:43 PMTheproperty is updated whenever the selected page changes. You can use thePagerState.currentPage
function to observe changes in a flow:snapshowFlow
LaunchedEffect(pagerState) {
snapshotFlow { pagerState.currentPage }.collect { page ->
// Selected page has changed...
}
}
Why can’t I just access the current page via pagerState.currentPage
? Why do I have to wrap it in a LaunchedEffect
and snapshotFlow
?PagerState.currentTab
cb
08/25/2021, 6:53 PMNick
08/25/2021, 6:53 PM