This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am pauloaapereira on github. | |
* I am pauloaapereira (https://keybase.io/pauloaapereira) on keybase. | |
* I have a public key ASAb0owbfXYKW4RipZIxTWW92PdJeiYsX6CphR-9l-lG6go | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val infiniteTransition = rememberInfiniteTransition() | |
val scale by infiniteTransition.animateFloat( | |
initialValue = 1f, | |
targetValue = 1.2f, | |
animationSpec = infiniteRepeatable( | |
animation = tween(1000), | |
repeatMode = RepeatMode.Reverse | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun Pulsating(pulseFraction: Float = 1.2f, content: @Composable () -> Unit) { | |
val infiniteTransition = rememberInfiniteTransition() | |
val scale by infiniteTransition.animateFloat( | |
initialValue = 1f, | |
targetValue = pulseFraction, | |
animationSpec = infiniteRepeatable( | |
animation = tween(1000), | |
repeatMode = RepeatMode.Reverse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pulsating { | |
Surface( | |
color = MaterialTheme.colors.primary, | |
shape = CircleShape, | |
modifier = Modifier.size(100.dp), | |
content = {} | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
private fun Background() { | |
Box( | |
modifier = Modifier | |
.fillMaxSize() | |
.scale(scaleX = 1.1f, scaleY = 1.3f), | |
contentAlignment = Alignment.Center | |
) { | |
Image( | |
painter = painterResource(id = if (MaterialTheme.colors.isLight) R.drawable.light_welcome_bg else R.drawable.dark_welcome_bg), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
private fun LogoAndActions(onLoginClick: () -> Unit = {}) { | |
Box( | |
modifier = Modifier.fillMaxSize(), | |
contentAlignment = Alignment.BottomCenter | |
) { | |
Box( | |
modifier = Modifier.fillMaxHeight(.5f), | |
contentAlignment = Alignment.TopCenter | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExperimentalComposeUiApi | |
@Composable | |
fun Login(onLoginClick: () -> Unit = {}) { | |
Surface(color = MaterialTheme.colors.background) { | |
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { | |
Column( | |
horizontalAlignment = Alignment.CenterHorizontally, | |
verticalArrangement = Arrangement.Center | |
) { | |
Text( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExperimentalComposeUiApi | |
@Composable | |
fun BloomTextInput( | |
modifier: Modifier = Modifier, | |
label: String, | |
value: String = "", | |
@DrawableRes leadingIcon: Int? = null, | |
keyboardType: KeyboardType = KeyboardType.Text, | |
onValueChanged: (String) -> Unit = {} | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun Home() { | |
Scaffold( | |
bottomBar = { BloomBottomBar() } | |
) { | |
... | |
} | |
} |
OlderNewer