This file contains hidden or 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
import androidx.compose.animation.core.RepeatMode | |
import androidx.compose.animation.core.VectorConverter | |
import androidx.compose.animation.core.animateValue | |
import androidx.compose.animation.core.infiniteRepeatable | |
import androidx.compose.animation.core.keyframesWithSpline | |
import androidx.compose.animation.core.rememberInfiniteTransition | |
import androidx.compose.foundation.Image | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.BoxWithConstraints |
This file contains hidden or 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
import androidx.compose.runtime.* | |
import androidx.compose.ui.platform.LocalLifecycleOwner | |
import androidx.lifecycle.* | |
import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner | |
import androidx.lifecycle.viewmodel.compose.viewModel | |
import kotlinx.coroutines.* | |
import kotlinx.coroutines.flow.* | |
@Composable | |
fun rememberViewModelStoreOwner( |
This file contains hidden or 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?) { | |
super.onCreate(savedInstanceState) | |
enableEdgeToEdge() | |
setContent { | |
BorderPathTheme { | |
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> | |
Box( | |
modifier = Modifier | |
.fillMaxSize() |
This file contains hidden or 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 MainContent( | |
changeSystemBarStyle: (SystemBarStyle) -> Unit | |
) { | |
Scaffold( | |
modifier = Modifier.fillMaxSize(), | |
containerColor = Color.Black | |
) { paddingValues -> | |
LaunchedEffect(Unit) { |
This file contains hidden or 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
#!/bin/zsh | |
function get_devices() { | |
all_devices=$(command adb devices) | |
# Drop the title | |
all_devices=${all_devices#"List of devices attached"} | |
# Drop any unauthorised devices (i.e. USB debugging disabled or authorisations revoked) | |
valid_devices=$(echo $all_devices | grep -v "([[:alnum:]-]+[[:space:]]+unauthorized$)" | grep -oE "([[:alnum:]-]+[[:space:]]+device$)") |
This file contains hidden or 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
import androidx.compose.foundation.layout.Box | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.draw.drawWithContent | |
import androidx.compose.ui.geometry.Offset | |
import androidx.compose.ui.graphics.BlendMode | |
import androidx.compose.ui.graphics.Color | |
import androidx.compose.ui.graphics.nativeCanvas | |
@Composable |
This file contains hidden or 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
package com.manuperera.passportencryption | |
import android.content.pm.ActivityInfo | |
import android.os.Bundle | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.compose.animation.core.LinearEasing | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.animation.core.animateOffsetAsState | |
import androidx.compose.animation.core.tween |
This file contains hidden or 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 PlacementWithinAnchor( | |
modifier: Modifier, | |
content: @Composable PlacementWithinAnchorScope.() -> Unit | |
) { | |
CompositionLocalProvider( | |
LocalLayoutCoordinatesHolder provides ContainerLayoutCoordinatesHolder() | |
) { | |
Box( | |
modifier = modifier |
NewerOlder