Napa Ram
08/17/2021, 5:47 PMMohamed Ibrahim
08/17/2021, 8:04 PMColton Idle
08/17/2021, 10:30 PMrobnik
08/17/2021, 10:37 PMText
to stay centered when it overflows. My label in BottomNavigationItem
is overflowing a bit, but going off-center to the right. Image in thread.Ink
08/17/2021, 11:05 PMColumn {
Row()
LazyColumn()
}
How Can I make my Row scrollable? I want to scroll Row in the same time when I'm scrolling LazyColumnAlexander Black
08/18/2021, 12:15 AMjava.lang.IllegalStateException: Nesting scrollable in the same direction layouts like LazyColumn and Column(Modifier.verticalScroll()) is not allowed. If you want to add a header before the list of items please take a look on LazyColumn component which has a DSL api which allows to first add a header via item() function and then the list of items via items().
here’s my code so far:
Column {
SearchViewSearchBarInactive({})
LazyColumn {
item { Carousel(books, "New York Times Best Sellers") } // this is a lazy row with images in it
item { Carousel(books, "Award Winning") }
item { Carousel(books, "Note Worthy Performances") }
item { Carousel(books, "Trending") }
item {
Text("Categories",
style = MaterialTheme.typography.h3,
modifier = Modifier.padding(start = 8.dp, top = 32.dp, bottom = 10.dp),
color = MyAppTheme.colors.textPrimary)
}
item { CategoryView() } // this is my grid view
}
}
Colton Idle
08/18/2021, 1:31 AMScott Kruse
08/18/2021, 3:08 AMArrangement.SpaceBetween
? Im trying to left align Text, and right align another Text. The problem is my left aligned text can be long, and it's causing my right aligned text to wrap or be hidden completelyNapa Ram
08/18/2021, 4:02 AMNikola Milovic
08/18/2021, 7:09 AMval model by component.models.subscribeAsState()
val profile = model.profile
val about = remember { mutableStateOf(TextFieldValue(profile.about)) }
val email = remember { mutableStateOf(TextFieldValue(profile.email)) }
Firstly the values for about and email are "" empty string but later on they get updated and the state updates. Is there a way to achieve this behaviour?
As I need this values later on for values in my textfields
TextField(
value = email.value,
onValueChange = { email.value = it },
label = { Text("Email") },
readOnly = !isEditing
)
Vitaliy Zarubin
08/18/2021, 8:55 AMExecution failed for task ':app:checkDebugDuplicateClasses'.
Florian
08/18/2021, 10:27 AMonBackground
make sense?rajesh
08/18/2021, 10:52 AMremember
?rajesh
08/18/2021, 11:41 AMUtkarsh Tiwari
08/18/2021, 12:04 PMtalkback a11y
doesn't focus on the text anymore. Doesn't anyone know what could be wrong with this approach?
var isTextPressed by remember { mutableStateOf(false) }
Text(
modifier = Modifier
.pointerInput(Unit) {
detectTapGestures(
onPress = {
isTextPressed = true
if (tryAwaitRelease()) {
isTextPressed = false
}
},
onTap = {
onClick.invoke()
}
)
}
...
...
)
Marcin Środa
08/18/2021, 12:23 PMAli Kabiri
08/18/2021, 1:03 PMtylerwilson
08/18/2021, 2:17 PMSergey Y.
08/18/2021, 2:40 PMdp->px
and px->dp
transformations.
Because the Layout system works with Dp
and the Canvas system accepts Px
.
Are there any recommendations or best practices on how to reduce the conversion of these units?
Reduce repeatability of the code.
The more they used in the code, the more it adds noise. 🧵VitalNik
08/18/2021, 2:46 PMdeepLinks
list from Composable
at all and it does not seem right. Thanks!Andrew Leung
08/18/2021, 3:45 PMOrhan Tozan
08/18/2021, 3:57 PMChachako
08/18/2021, 4:31 PMColton Idle
08/18/2021, 5:46 PMVsevolod Kaganovych
08/18/2021, 6:34 PMTextField
with label. I want to change the fontSize
of label but leave the behaviour that it becomes smaller when it floats to the top. If I change font size, the animation of decreasing size is gone and label has the same size in focused and unfocused mode. But if I don't set manually fontSize
, everything works as expected. Any suggestions? Code in thread.Colton Idle
08/18/2021, 8:00 PM@Composable
fun MyBottomNav(navController: NavController, items: List<Screen>, userManager: UserManager
) {
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentDestination = navBackStackEntry?.destination
if(currentDestination?.hierarchy?.any { it.route == Screen.Home.route } == true) {
BottomNavigation(...
Florian
08/18/2021, 10:15 PMSmorg
08/18/2021, 10:25 PMhiltViewModel
calls (from the androidx.hilt.naviagtion.compose
lib) returns a new instance of the retrieved viewmodel as opposed to returning the same viewmodel scoped to a navigation graph where it is first retrieved. Any ideas what I might be missing?rnett
08/19/2021, 1:01 AMdetectDragGesturesAfterLongPress
consumes the position change events). Is there any support for this I'm not seeing, or has anyone implemented anything similar?darkmoon_uk
08/19/2021, 2:08 AMfocusable(...)
does not seem to be working as advertised?
I'm trying to make a Box
(or Surface
- I'm not fussy 😁) be focusable so have modified it to:
• be .focusable(true)
✅
• have a focusOrder(myFocusRequester)
✅
Documentation suggests this is all we need for a custom composable to be focused, and yet, when I call requestFocus()
on my `Box`'s focus requester, the previously focused component (a regular TextField
) does not appear to 'let go' of it's focus, also TalkBack does not shift it's highlight to the Box
component.
What else do I need to do to effect a full transfer of focus over to my custom component?darkmoon_uk
08/19/2021, 2:08 AMfocusable(...)
does not seem to be working as advertised?
I'm trying to make a Box
(or Surface
- I'm not fussy 😁) be focusable so have modified it to:
• be .focusable(true)
✅
• have a focusOrder(myFocusRequester)
✅
Documentation suggests this is all we need for a custom composable to be focused, and yet, when I call requestFocus()
on my `Box`'s focus requester, the previously focused component (a regular TextField
) does not appear to 'let go' of it's focus, also TalkBack does not shift it's highlight to the Box
component.
What else do I need to do to effect a full transfer of focus over to my custom component?rnett
08/19/2021, 2:28 AMfocusOrder
first, that's gotten me a couple of times.darkmoon_uk
08/19/2021, 2:37 AM