Skip to content

v300: Pre-release tasks#470

Merged
shubham7109 merged 9 commits intov.nextfrom
v300/pre-release-tasks
Apr 10, 2026
Merged

v300: Pre-release tasks#470
shubham7109 merged 9 commits intov.nextfrom
v300/pre-release-tasks

Conversation

@shubham7109
Copy link
Copy Markdown
Collaborator

@shubham7109 shubham7109 commented Apr 8, 2026

Description

Run Inspect code on the samples project to find deprecated usages, unused resources, and code style warnings.

  • See below PR comments for ALL project refinements aimed to resolve issues found while running all samples v300 cert.

To build an apk using this branch:

./gradlew assembleDebug -D build=300.0.0-4928
./gradlew assembleRelease -D build=300.0.0-4928

Links and Data

Sample issue: kotlin/issues/7433

@shubham7109 shubham7109 self-assigned this Apr 8, 2026
@shubham7109 shubham7109 marked this pull request as ready for review April 8, 2026 23:29
verticalAlignment = Alignment.CenterVertically
) {
val size = (LocalConfiguration.current.screenWidthDp * 0.20).dp
val size = LocalWindowInfo.current.containerDpSize.width * 0.20f
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code warning:

Image

Text(
modifier = Modifier.align(Alignment.CenterHorizontally),
text = stringResource(R.string.copyright_text),
text = stringResource(R.string.copyright_text, currentYear),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fix to ensure to provide year (2026) copyright.

Box(
modifier = Modifier
.fillMaxSize()
.padding(top = TopAppBarDefaults.TopAppBarExpandedHeight)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  • Before:
    • Image
  • After:
    • Image

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.

Comment on lines +84 to +85
.verticalScroll(rememberScrollState())
.animateContentSize(),
Copy link
Copy Markdown
Collaborator Author

@shubham7109 shubham7109 Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sample issues found in cert, the screen uses Scaffold and BottomSheetScaffold causing content overlaps. Changed layout to simplify launching a sheet via a FAB.

Comment on lines -75 to +82
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
)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR makes the bottom sheet itself a scrollable, so no need for LazyColumn here.

) {
Column(modifier = Modifier
.fillMaxHeight(0.4f)
.verticalScroll(rememberScrollState()),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR makes the bottom sheet itself a scrollable, so no need for rememberScrollState here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to use new common design data.

Copy link
Copy Markdown
Collaborator

@rchintapalli rchintapalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@shubham7109 shubham7109 merged commit 8d00cb9 into v.next Apr 10, 2026
1 check passed
@shubham7109 shubham7109 deleted the v300/pre-release-tasks branch April 10, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants