Chris Johnson
09/27/2021, 7:30 PMACTION_DOWN
and ACTION_UP
but still allow a LazyColumn to have ACTION_MOVE
for scroll? My use case is: I want to allow a full screen list to scroll, but I want to do something when a finger is lifted up such as snap the list to a specific positionRavin Jain
09/27/2021, 9:43 PMaccompanist
library and hiltAggregateDepsDebug
* What went wrong:
Execution failed for task ':app:hiltAggregateDepsDebug'.
> Could not resolve all files for configuration ':app:hiltCompileOnlyDebug'.
> Could not resolve io.github.aakira:napier:1.4.1.
Required by:
project :app > com.google.accompanist:accompanist-permissions:0.18.0
project :app > com.google.accompanist:accompanist-pager:0.18.0
> The consumer was configured to find attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'. However we cannot choose between the following variants of io.github.aakira:napier:1.4.1:
- commonMainMetadataElements-published
- debugApiElements-published
- debugRuntimeElements-published
- iosArm64ApiElements-published
- iosArm64MetadataElements-published
- iosX64ApiElements-published
- iosX64MetadataElements-published
- jsApiElements-published
- jsRuntimeElements-published
- jvmApiElements-published
- jvmRuntimeElements-published
- metadataApiElements-published
myanmarking
09/27/2021, 10:44 PMNathan Castlehow
09/28/2021, 3:14 AMJordan Silva
09/28/2021, 10:49 AMAccessibilityChecks.enable()
. However I noticed the View Hierarchy printed from Espresso only had a ComposeView
and AndroidComposeView
with no extra information like text, content description.
+---->AndroidComposeView{id=-1, visibility=VISIBLE, width=1080, height=1808, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@6460a4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+----->RippleContainer{id=-1, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@ef261c2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------>RippleHostView{id=-1, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@508ebd3, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
Another issue I had migrating to Compose is that our Espresso tests will fail after a simple screen migration. 😐
If we have a simple screen with just a Text. And we migrate to Compose, Espresso won’t find that Text anymore.
So, just creating an Activity with a Text, and changing that to ComposeView and adding a Compose Text (with the same information). If we try to do the following code, it won’t find the View.
Espresso.onView(withText(R.string.app_intro)).check(matches(isDisplayed()))
I found this answer, so I guess I have to implement new tests while migrating to compose:
https://github.com/android/compose-samples/commit/a6907c5dc236e9c18f062c44453b1c15359962cf#commitcomment-51521777
----------
So, after this huge text, I have 2 questions 😬
1. Will Compose Semantics Test or Test libraries have something similar to Espresso AccessibilityChecks.enable()
?
2. How can I check colors, images and other components properties like Modifiers/borders? These are not visible with SemanticsNode using Jetpack Compose tests.
a. Right now I’m having to check with Snapshots (then some workarounds on top of Snapshot to work across different APIs)myanmarking
09/28/2021, 11:19 AMjulioromano
09/28/2021, 11:44 AMNapa Ram
09/28/2021, 12:11 PMmyanmarking
09/28/2021, 1:47 PMJob Guldemeester
09/28/2021, 1:54 PMModifier.clip
the composable is shaped correctly but the inner content of the composable disappears in one of the screens where we use the composable.
Could it be that composable interferes with the Modifier.graphicsLayer
used in other screens?mattinger
09/28/2021, 1:55 PMAnimatedNavHost(
navController = navController,
startDestination = router.currentStep.id,
exitTransition = { _, _ ->
slideOutOfContainer(
AnimatedContentScope.SlideDirection.Left,
animationSpec = tween(700)
)
},
enterTransition = { _, _ ->
slideIntoContainer(
AnimatedContentScope.SlideDirection.Left,
animationSpec = tween(700)
)
})
However, not a single one of my transitions is animated. It all still seems to just pop in and out like it would with the standard NavHost. (as a side note, i’ve tried putting animation specs in the composable function as well for the individual routes with no luck.myanmarking
09/28/2021, 2:08 PMmodifier.run {
if(featureA){
modifierX()
} else{
this
}
}
ste
09/28/2021, 4:51 PMrememberSaveable
a Parcelable
(I need it to encapsulate the Process
object); should I just declare an object
at this point?myanmarking
09/28/2021, 5:29 PMImage(
modifier = Modifier
.fillMaxSize(),
painter = painterResource(id = state.itemList[page].imageRes),
contentDescription = null,
contentScale = ContentScale.Crop
)
This is loading a webp image. Maybe it is related to the image size. But most of the times it has no lag. What could it be ?Kirill Langer
09/28/2021, 6:36 PMNesting 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()
Anyone have an idea for how I can add the grid pressure display inside a column of rows that arranges the displays?Jason Roberts
09/29/2021, 5:39 AMJob Guldemeester
09/29/2021, 7:49 AMModifier.clip
to apply a custom shape when there is an Image
composable + bitmap somewhere in the view (separated from the shape). The clipped shape disappears when the bitmap reaches a certain size or multiple bitmaps in the view reach a certain combined size. Though the limits can differ on different devices.Daniel Oliveira
09/29/2021, 10:17 AMjulioromano
09/29/2021, 10:55 AMjossiwolf
09/29/2021, 11:28 AMmyanmarking
09/29/2021, 11:32 AMmyanmarking
09/29/2021, 11:39 AM<b>
?AmrJyniat
09/29/2021, 12:11 PMTolriq
09/29/2021, 12:42 PMFelix Schütz
09/29/2021, 12:55 PMNavHost
)? Should I report an issue on the Google Issue Tracker instead?myanmarking
09/29/2021, 1:25 PMkenkyee
09/29/2021, 1:48 PMmyanmarking
09/29/2021, 2:25 PMste
09/29/2021, 3:54 PMReverseRow
code in threadWaqas Tahir
09/29/2021, 5:04 PMWaqas Tahir
09/29/2021, 5:04 PMhfhbd
09/29/2021, 5:12 PMruntime
is shared with all targets.Waqas Tahir
09/29/2021, 5:24 PM