Skip to content

Conversation

@JonEckenrode
Copy link
Contributor

No description provided.

@snippet-bot
Copy link

snippet-bot bot commented Mar 24, 2025

Here is the summary of changes.

You are about to add 2 region tags.
You are about to delete 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@JonEckenrode JonEckenrode requested a review from riggaroo March 24, 2025 22:36
setContentView(R.layout.activity_main);

// [START android_activity_embedding_splitAttributesBuilder_java]
SplitAttributes.Builder splitAttributesBuilder = new SplitAttributes.Builder()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to note, we generally create functions that separate out each snippet logically, otherwise reading the file in its entirety is a bit difficult if they are all in the same function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reorganized the files to group related snippets.

.setSplitType(SplitAttributes.SplitType.ratio(0.33f))
.setLayoutDirection(SplitAttributes.LayoutDirection.LEFT_TO_RIGHT);

if (WindowSdkExtensions.getInstance().getExtensionVersion() >= 6) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Whats the version number mean here? You might want to include a constant that describes this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The version number indicates the required build version. I took this snippet from a codelab. I can't find any docs that explain how the version numbers map to build versions. The closest I've come is https://developer.android.com/guide/sdk-extensions#extension-names. I filed b/406244784 to hopefully get this documented.

@JonEckenrode JonEckenrode requested a review from riggaroo March 25, 2025 18:50
@JonEckenrode JonEckenrode merged commit e638bb2 into main Mar 26, 2025
5 checks passed
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