Skip to content

Instantly share code, notes, and snippets.

View AidaIssayeva's full-sized avatar
🐢
I may be slow to respond

Aida Issayeva AidaIssayeva

🐢
I may be slow to respond
View GitHub Profile
@AidaIssayeva
AidaIssayeva / Flying Hearts Composable function in Jetpack Compose
Created February 27, 2022 04:45
Flying Hearts Animation in jetpack Compose
@OptIn(ExperimentalAnimationApi::class)
@Composable
fun Heart(modifier: Modifier, horizontalPadding: Int, bottomMargin: Int) {
val width = LocalConfiguration.current.screenWidthDp
val height = LocalConfiguration.current.screenHeightDp - bottomMargin
val yRandom = Random.nextInt(0, height / 2)
val xRandom = Random.nextInt(horizontalPadding, (width - horizontalPadding))
val state = remember {
@AidaIssayeva
AidaIssayeva / HeartShapeInJetpackComposeGenericShape.kt
Last active August 4, 2023 03:35
Custom Shapes in Jetpack Compose: Heart
@Composable
fun heart(): GenericShape {
return GenericShape { size, _ ->
heartPath(size = size)
}
}
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
@AidaIssayeva
AidaIssayeva / Markdown_tricks_in_hugo
Created June 7, 2021 00:46
Markdown tricks in Hugo you can use to enhance the experience
1. Linked image: [![Alt Text](Image URL)](Link URL)
example: [![This is my image](/path/to/image.png)]({{< relref "post/B.md" >}})
@AidaIssayeva
AidaIssayeva / CustomService.kt
Last active March 20, 2020 21:52
This OkHttp application interceptor reads local json file. The json file name is passed as a path in service
interface CustomService {
@GET("veggies.json")
fun getVeggies(): Single<Response<CustomGenericResponse<List<Veggie>>>>
}
fun SpannableStringBuilder.lineBreak() {
append("\n")
}
fun SpannableStringBuilder.space() {
append(" ")
}