Skip to content

Instantly share code, notes, and snippets.

View alvindizon's full-sized avatar
🎯
Focusing

Alvin Dizon alvindizon

🎯
Focusing
View GitHub Profile
@mxalbert1996
mxalbert1996 / AutoShrinkText.kt
Created April 6, 2023 07:24
Auto Size (Auto Shrink) Text
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.material.LocalContentAlpha
import androidx.compose.material.LocalContentColor
import androidx.compose.material.LocalTextStyle
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.graphics.Color
@rynkowsg
rynkowsg / SharedPreferencesUtils.kt
Created March 6, 2024 16:03
Get EncryptedSharedPreferences
//
// Get EncryptedSharedPreferences and handle restore of accidentallly
// backuped file that we can no longer decrypt. If the master key provided
// is not able to decrypt the shared preferences, the file will be recreated.
//
// Tested with "androidx.security:security-crypto:1.1.0-alpha06"
//
package pl.rynkowski.platform_utils
@JunkFood02
JunkFood02 / Motion.kt
Last active July 19, 2024 11:57
A music player demo made with Jetpack Compose animation APIs, including shared element transition, list animations, animated content, etc.
package com.example.compose_debug
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.Easing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.PathEasing