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
/** | |
* A vertical dashed divider that can be used to separate content in a composable | |
* @param modifier the modifier to apply to the divider | |
* @param thickness the thickness of the divider | |
* @param color the color of the divider | |
* @author KvRae | |
*/ | |
@Composable | |
fun VerticalDashedDivider( | |
modifier: Modifier = Modifier, |
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 AnimatedBorderCard( | |
modifier: Modifier = Modifier, | |
shape: Shape = RoundedCornerShape(size = 0.dp), | |
borderWidth: Dp = 2.dp, | |
gradient: Brush = Brush.sweepGradient(listOf(Color.Gray, Color.White)), | |
animationDuration: Int = 10000, | |
onCardClick: () -> Unit = {}, | |
content: @Composable () -> 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 | |
actual fun PlatformColors(statusBarColor: Color, navBarColor: Color){ | |
val sysUiController = rememberSystemUiController() | |
SideEffect { | |
sysUiController.setSystemBarsColor(color = topColor) | |
sysUiController.setNavigationBarColor(color = bottomColor) | |
} | |
} |
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
import android.graphics.Bitmap | |
import android.graphics.BitmapShader | |
import android.graphics.RuntimeShader | |
import android.graphics.Shader | |
import android.os.Build | |
import androidx.compose.animation.core.withInfiniteAnimationFrameMillis | |
import androidx.compose.foundation.shape.RoundedCornerShape | |
import androidx.compose.runtime.getValue | |
import androidx.compose.runtime.produceState | |
import androidx.compose.ui.Modifier |
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
import android.annotation.SuppressLint | |
import androidx.compose.animation.animateContentSize | |
import androidx.compose.animation.core.animateDpAsState | |
import androidx.compose.animation.core.tween | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.foundation.lazy.LazyColumn | |
import androidx.compose.foundation.lazy.LazyListState | |
import androidx.compose.foundation.lazy.items | |
import androidx.compose.foundation.lazy.rememberLazyListState |
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
name: Build and Test | |
on: | |
workflow_dispatch: | |
jobs: | |
local_test_job: | |
name: Running Local Tests | |
runs-on: ubuntu-latest |
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
from contextlib import contextmanager | |
# Helper methods | |
def pprint_dict(d): | |
return '[' + ', '.join([f'{k} = {d[k]}' for k in d]) + ']' | |
def composable_tree(): |
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
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.foundation.shape.GenericShape | |
import androidx.compose.material.Surface | |
import androidx.compose.material.Text | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.tooling.preview.Preview | |
import androidx.compose.ui.unit.dp | |
import com.ex2.dribbble.ui.theme.DribbleUITheme |
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
// Adapted from https://gist.github.com/lelandrichardson/de674fe6788d922fc84362fdae530464 | |
@Composable | |
fun ExampleUsage(){ | |
GlideImage(src = "source-path", | |
blurThumbSrc = "fast-to-load-small-thumbnail-path-for-blur effect" | |
){imageBitmap -> | |
if (imageBitmap != null) { | |
Image(bitmap = imageBitmap, | |
// modifier = ... |
NewerOlder