@@ -42,6 +42,7 @@ import androidx.xr.compose.subspace.layout.SpatialAlignment
4242import androidx.xr.compose.subspace.layout.SubspaceModifier
4343import androidx.xr.compose.subspace.layout.aspectRatio
4444import androidx.xr.compose.subspace.layout.fillMaxHeight
45+ import androidx.xr.compose.subspace.layout.fillMaxSize
4546import androidx.xr.compose.subspace.layout.fillMaxWidth
4647import androidx.xr.compose.subspace.layout.movable
4748import androidx.xr.compose.subspace.layout.offset
@@ -58,6 +59,7 @@ import com.android.developers.androidify.util.TabletPreview
5859import com.android.developers.androidify.xr.DisableSharedTransition
5960import com.android.developers.androidify.xr.MainPanelWorkaround
6061import com.android.developers.androidify.xr.RequestHomeSpaceIconButton
62+ import com.android.developers.androidify.xr.SquiggleBackgroundSubspace
6163
6264@Composable
6365fun HomeScreenContentsSpatial (
@@ -67,43 +69,35 @@ fun HomeScreenContentsSpatial(
6769 onAboutClicked : () -> Unit ,
6870) {
6971 DisableSharedTransition {
70- Subspace {
72+ SquiggleBackgroundSubspace {
7173 MainPanelWorkaround ()
74+ Orbiter (
75+ position = ContentEdge .Top ,
76+ offsetType = OrbiterOffsetType .OuterEdge ,
77+ offset = 32 .dp,
78+ alignment = Alignment .End ,
79+ ) {
80+ RequestHomeSpaceIconButton (
81+ modifier = Modifier
82+ .size(64 .dp, 64 .dp)
83+ .padding(8 .dp),
84+ )
85+ }
86+ SpatialPanel (SubspaceModifier .fillMaxSize()) {
87+ HomeScreenSpatialMainContent (dancingBotLink, onClickLetsGo, onAboutClicked)
88+ }
7289 SpatialPanel (
7390 SubspaceModifier
91+ .fillMaxWidth(0.2f )
92+ .fillMaxHeight(0.8f )
93+ .aspectRatio(0.77f )
94+ .resizable(maintainAspectRatio = true )
7495 .movable()
75- .resizable( )
76- .fillMaxWidth( 1f )
77- .aspectRatio( 1.7f ),
96+ .align( SpatialAlignment . CenterRight )
97+ .offset(z = 10 .dp )
98+ .rotate( 0f , 0f , 5f ),
7899 ) {
79- Orbiter (
80- position = ContentEdge .Top ,
81- offsetType = OrbiterOffsetType .OuterEdge ,
82- offset = 32 .dp,
83- alignment = Alignment .End ,
84- ) {
85- RequestHomeSpaceIconButton (
86- modifier = Modifier
87- .size(64 .dp, 64 .dp)
88- .padding(8 .dp),
89- )
90- }
91- HomeScreenSpatialMainContent (dancingBotLink, onClickLetsGo, onAboutClicked)
92- Subspace {
93- SpatialPanel (
94- SubspaceModifier
95- .fillMaxWidth(0.2f )
96- .fillMaxHeight(0.8f )
97- .aspectRatio(0.77f )
98- .resizable(maintainAspectRatio = true )
99- .movable()
100- .align(SpatialAlignment .CenterRight )
101- .offset(z = 10 .dp)
102- .rotate(0f , 0f , 5f ),
103- ) {
104- VideoPlayer (videoLink)
105- }
106- }
100+ VideoPlayer (videoLink)
107101 }
108102 }
109103 }
0 commit comments