Skip to content

Commit 70e3cd7

Browse files
authored
Merge pull request #150 from android/feature/xr/about-screen
Add Spatial layout for AboutScreen
2 parents ed1078c + 7620282 commit 70e3cd7

File tree

4 files changed

+321
-125
lines changed

4 files changed

+321
-125
lines changed

app/src/main/java/com/android/developers/androidify/navigation/MainNavigation.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import androidx.compose.runtime.mutableStateOf
3131
import androidx.compose.runtime.remember
3232
import androidx.compose.runtime.setValue
3333
import androidx.compose.ui.platform.LocalContext
34+
import androidx.compose.ui.platform.LocalUriHandler
3435
import androidx.compose.ui.unit.IntOffset
3536
import androidx.hilt.navigation.compose.hiltViewModel
3637
import androidx.lifecycle.viewmodel.navigation3.rememberViewModelStoreNavEntryDecorator
@@ -184,13 +185,20 @@ fun MainNavigation() {
184185
}
185186
entry<About> {
186187
val context = LocalContext.current
188+
val uriHandler = LocalUriHandler.current
187189
AboutScreen(
188190
onBackPressed = {
189191
backStack.removeLastOrNull()
190192
},
191193
onLicensesClicked = {
192194
context.startActivity(Intent(context, OssLicensesMenuActivity::class.java))
193195
},
196+
onPrivacyClicked = {
197+
uriHandler.openUri("https://policies.google.com/privacy")
198+
},
199+
onTermsClicked = {
200+
uriHandler.openUri("https://policies.google.com/terms")
201+
}
194202
)
195203
}
196204
},

0 commit comments

Comments
 (0)