Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animate in the authorization dialogs to spec #374

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SeedVaultSimulator/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
android:name=".ui.AuthorizeActivity"
android:finishOnCloseSystemDialogs="true"
android:noHistory="true"
android:theme="@style/Theme.SeedVaultImpl.Transparent" />
android:theme="@style/Theme.SeedVaultImpl.NoActionBar.Transparent" />

<!-- NOTE: Order set below that of the privileged alias in case an app holds both
permissions. Apps normally should hold only one of the two permissions, but the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
Expand Down Expand Up @@ -59,6 +61,8 @@ class AuthorizeActivity : ComponentActivity() {
NavHost(
modifier = Modifier.fillMaxSize(),
navController = navController,
enterTransition = { EnterTransition.None },
exitTransition = { ExitTransition.None },
startDestination = "auth"
) {
composable("auth") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ fun NonPrivilegedAuthorizeContents(
testTagsAsResourceId = true
},
sheetState = sheetState,
scrimColor = Color.Transparent, // scrim provided at window level by backgroundDimEnabled in theme
contentWindowInsets = { BottomSheetDefaults.windowInsets.only(WindowInsetsSides.Top) },
onDismissRequest = onCancel
) {
Expand Down
10 changes: 5 additions & 5 deletions SeedVaultSimulator/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
<style name="Theme.SeedVaultImpl.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>

<style name="Theme.SeedVaultImpl.Transparent" parent="android:Theme">
<style name="Theme.SeedVaultImpl.NoActionBar.Transparent">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:backgroundDimEnabled">true</item> <!-- window provides scrim over transparent areas -->
<item name="android:windowAnimationStyle">@null</item> <!-- window contents provide entry/exit animations -->
</style>

</resources>