Jason Inbody
08/06/2021, 3:15 AMpublic void onBraintreeSubmit(View v) {
DropInRequest dropInRequest = new DropInRequest()
.tokenizationKey("sandbox_************");
startActivityForResult(dropInRequest.getIntent(this), REQUEST_CODE);
}
Jason Inbody
08/06/2021, 4:57 AMrememberLauncherForActivityResult
?PHondogo
08/06/2021, 8:28 AMCLOVIS
08/06/2021, 10:26 AMval Component = fc<RProps> {
if (…)
useRef() // big no no
}
Is that an issue Compose shares? Or is this safe?
@Composable
fun Component() {
if (…)
val a by remember { … }
}
myanmarking
08/06/2021, 10:37 AMcurtjrees
08/06/2021, 10:46 AMFlorian
08/06/2021, 10:57 AMJan Skrasek
08/06/2021, 11:02 AM.verticalScroll(rememberScrollState())
.horizontalScroll(rememberScrollState())
makes it scrollable just one direction at a time.Nacho Ruiz Martin
08/06/2021, 11:07 AMTiago Nunes
08/06/2021, 2:12 PMSurface(
shape = MaterialTheme.shapes.medium,
modifier = Modifier
.clip(MaterialTheme.shapes.medium)
.size(imageSize),
) {
Image(
painter = rememberImagePainter(
data = imageUrl,
builder = {
crossfade(true)
error(R.drawable.ic_box)
placeholder(R.drawable.ic_box)
},
),
contentDescription = null,
contentScale = ContentScale.Crop,
modifier = Modifier
.fillMaxSize(),
)
}
Azam Khan
08/06/2021, 3:28 PMcomposable
of the bottom nav screens but I'm not sure if my bottom nav animations will work after that. Is there any other way to fix this? Code in thread 🧵Florian
08/06/2021, 3:44 PMJordan Carlyon
08/06/2021, 3:45 PMjava.lang.IllegalStateException: Nesting scrollable in the same direction layouts like ScrollableContainer and LazyColumn is not allowed.
I have a LazyColumn
in a Fragment
with a LinearLayout
This all works fine until I attempt to add .verticalScroll(rememberScrollState())
to the LazyColumn
and I get the above errorAnthony
08/06/2021, 3:56 PMNavGraph
architecture? For example, we have a outer Navgraph
for an onboarding process which then leads down into a main screen which houses bottom navigation with it's own Navhost
. Or would it be recommended to have one Navgraph
and to simply show the bottom navigation bar when the screens using it are displayed to the user?Jzach
08/06/2021, 4:11 PMInk
08/06/2021, 4:19 PMFlorian
08/06/2021, 4:36 PMArtem
08/06/2021, 4:44 PMBottomSheetScaffold
to already existed XML layout, but it overlay all my views with white background. Pictures in thread.Tash
08/06/2021, 5:26 PMJason Inbody
08/06/2021, 5:59 PMJoey
08/06/2021, 6:15 PMChris Fillmore
08/06/2021, 6:44 PMaccompanist-navigation-material
in action?tad
08/06/2021, 6:58 PMrememberNotNull
function that doesn't recalculate its value when passed a null key. Can someone point me in the right direction?Anthony
08/06/2021, 7:07 PMby remember {mutableStateof(")}
and when the user clicks save, all the fields are passed into an object which is saved back into the database. Or would it be better to simply edit the object in the viewmodel on every single change that occurs to it and have the UI observe it?Chuck Stein
08/06/2021, 7:11 PMChris Fillmore
08/06/2021, 9:19 PMHarsh Bhakta
08/06/2021, 10:32 PMColton Idle
08/06/2021, 11:31 PMColumn{
BasicInput()
EmailInput()
PhoneInput()
}
A few team members have argued that the validation shouldn't be baked into a composable, so we originally were doing all checks in a ViewModel and not in the composable, but the issue is, someone builds a new screen, the add EmailInput() but forgets to add the validation in the VM for the new screen and now we're back at square 1.
What would you do?Alexander Black
08/06/2021, 11:42 PMMohamed Ibrahim
08/07/2021, 1:20 AMMohamed Ibrahim
08/07/2021, 1:20 AMColton Idle
08/07/2021, 2:43 AMIan Lake
08/07/2021, 2:44 AMcomposable
destinations within a NavHost
are contained within that NavHost
. If you want to hide the bottom nav on certain destinations, we've talked about that a number of times: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1627490432392100?thread_ts=1627477759.324500&cid=CJLTWPH7S