wan phase
wan phase

Reputation: 1

Does Android activity embedding support vertical distribution?

Activity embedding optimizes apps on large screen devices by splitting an application's task window between two activities or two instances of the same activity. Activity embedding requires little or no refactoring of your app. But I found that two activities can only be distributed side by side, I wonder if it is possible to distribute two activities up and down? Thanks very much.

Upvotes: 0

Views: 78

Answers (1)

Jiaming
Jiaming

Reputation: 121

Yes, you can set top-bottom split by SplitAttributes.Builder#setLayoutDirection(TOP_TO_BOTTOM)

https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitAttributes.Builder#setLayoutDirection(androidx.window.embedding.SplitAttributes.LayoutDirection)

Note that activity embedding is currently (as of 2023) only supported on tablets and foldables, not regular phones.

Upvotes: 0

Related Questions