v300: Pre-release tasks#470
Conversation
| verticalAlignment = Alignment.CenterVertically | ||
| ) { | ||
| val size = (LocalConfiguration.current.screenWidthDp * 0.20).dp | ||
| val size = LocalWindowInfo.current.containerDpSize.width * 0.20f |
| Text( | ||
| modifier = Modifier.align(Alignment.CenterHorizontally), | ||
| text = stringResource(R.string.copyright_text), | ||
| text = stringResource(R.string.copyright_text, currentYear), |
There was a problem hiding this comment.
Bug fix to ensure to provide year (2026) copyright.
| Box( | ||
| modifier = Modifier | ||
| .fillMaxSize() | ||
| .padding(top = TopAppBarDefaults.TopAppBarExpandedHeight) |
There was a problem hiding this comment.
Ensure that on samples lib bottom sheet content overflow, the top app bar doesn't obscure the sheet contents. Using sheet in landscape mode is an easy workflow to get content overflow:
Ideally a Scaffold innerPadding will provide spacing for all screens, but since this is an overlay content on top of a sample we need to consider content overflow. A sample MapView can be contained in various containers (Column/Box/Row) so we cannot rely placing the BottomSheet within the container.
The solution I took is to abstract the spacing needed for any sample which can then freely apply the bottom sheet outside of the screen's scaffold.
| .verticalScroll(rememberScrollState()) | ||
| .animateContentSize(), |
There was a problem hiding this comment.
There seemed to be inconsistencies of bottom sheets being scrollable and not scrollable. This change ensures all sampleslib bottom sheets are scrollable if content overflows.
There was a problem hiding this comment.
Sample issues found in cert, the screen uses Scaffold and BottomSheetScaffold causing content overlaps. Changed layout to simplify launching a sheet via a FAB.
| LazyColumn { | ||
| items(clusterInfoList.size) { index -> | ||
| HorizontalDivider( | ||
| modifier = Modifier.padding(horizontal = 12.dp), | ||
| color = Color.LightGray | ||
| ) | ||
| Text( | ||
| modifier = Modifier.padding(horizontal = 30.dp, vertical = 16.dp), | ||
| text = clusterInfoList[index] | ||
| ) | ||
| } | ||
| clusterInfoList.forEach { annotatedString -> | ||
| HorizontalDivider( | ||
| modifier = Modifier.padding(horizontal = 12.dp), | ||
| color = Color.LightGray | ||
| ) | ||
| Text( | ||
| modifier = Modifier.padding(horizontal = 30.dp, vertical = 16.dp), | ||
| text = annotatedString | ||
| ) |
There was a problem hiding this comment.
This PR makes the bottom sheet itself a scrollable, so no need for LazyColumn here.
| ) { | ||
| Column(modifier = Modifier | ||
| .fillMaxHeight(0.4f) | ||
| .verticalScroll(rememberScrollState()), |
There was a problem hiding this comment.
This PR makes the bottom sheet itself a scrollable, so no need for rememberScrollState here.
There was a problem hiding this comment.
Cert issue: This sample will crash on rotation with an object already owned exception on the displayed graphic. Updated sample to use remember and launched effect to set the graphic on composition.
| // URL of the Portland buildings scene server | ||
| private val portlandBuildingsSceneLayerUrl = | ||
| "https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Portland/SceneServer" | ||
| "https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer" |
There was a problem hiding this comment.
Update to use new common design data.
rchintapalli
left a comment
There was a problem hiding this comment.
Exploratory viewshed sample worked fine on samsung tablet, seems to have issues on Pixel.
Approving to merge all other improvements and handle the sample for pixel devices separately



Description
Run Inspect code on the samples project to find deprecated usages, unused resources, and code style warnings.
To build an apk using this branch:
Links and Data
Sample issue:
kotlin/issues/7433