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 RulerView( | |
startValue: Int, | |
endValue: Int, | |
step: Int | |
) { | |
val density = LocalDensity.current | |
val scrollState = rememberScrollState() | |
val sectionWidth = 80.dp | |
var sliderValue by remember { mutableFloatStateOf(0.5f) } |
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
data class BarDataM(val value: Float, val label: String) | |
@Composable | |
fun BarChartComponent( | |
bars: List<BarDataM>, | |
barWidth: Dp, | |
spaceBetweenBars: Dp, | |
animateChart: Boolean | |
) { | |
var selectedBar by remember { mutableIntStateOf(-1) } |
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 FlipActionScreen() { | |
var flippedState by remember { mutableStateOf(false) } | |
val rotationY by animateFloatAsState( | |
targetValue = if (flippedState) 180f else 0f, | |
animationSpec = spring( | |
dampingRatio = Spring.DampingRatioHighBouncy, | |
stiffness = Spring.StiffnessVeryLow | |
) | |
) |
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
@file:OptIn( | |
ExperimentalSharedTransitionApi::class, ExperimentalMaterial3Api::class | |
) | |
package com.example.compose_debug | |
import androidx.activity.compose.BackHandler | |
import androidx.annotation.DrawableRes | |
import androidx.compose.animation.AnimatedContent | |
import androidx.compose.animation.AnimatedVisibilityScope |
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
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
WindowCompat.setDecorFitsSystemWindows(window, false) | |
super.onCreate(savedInstanceState) | |
setContent { | |
ColorPickerTheme { | |
Surface( | |
modifier = Modifier.fillMaxSize(), | |
color = MaterialTheme.colorScheme.background | |
) { |
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
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
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 MetaballEffect() { | |
var targetAngle by remember { mutableStateOf(0f) } | |
val animatedAngle by animateFloatAsState( | |
targetValue = targetAngle, | |
animationSpec = tween(durationMillis = 1000) | |
) | |
var toggle by remember { mutableStateOf(false) } |
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 InteractiveCanvas(maxWidth: Int, maxHeight: Int) { | |
val random = remember { Random.Default } | |
var touchPosition by remember { mutableStateOf(Offset.Unspecified) } | |
val heartSize = 75F | |
val heartPath = createHeartPath(heartSize) | |
val heartOffsets = remember { mutableStateListOf<Offset>() } | |
val heartColors = remember { mutableStateListOf<Color>() } | |
if (heartOffsets.isEmpty()) { |
NewerOlder