Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6817ec52 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Animating button alpha instead of visibility" into main

parents 13641b6b af925a58
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -18,8 +18,7 @@ package com.android.systemui.inputdevice.tutorial.ui.composable

import android.content.res.Configuration
import androidx.annotation.RawRes
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
@@ -34,8 +33,10 @@ import androidx.compose.foundation.layout.width
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
@@ -75,9 +76,8 @@ fun ActionTutorialContent(
                VerticalDescriptionAndAnimation(actionState, config, Modifier.weight(1f))
            }
        }
        AnimatedVisibility(visible = actionState is Finished, enter = fadeIn()) {
            DoneButton(onDoneButtonClicked = onDoneButtonClicked)
        }
        val buttonAlpha by animateFloatAsState(if (actionState is Finished) 1f else 0f)
        DoneButton(onDoneButtonClicked, Modifier.graphicsLayer { alpha = buttonAlpha })
    }
}