Skip to content

Instantly share code, notes, and snippets.

View SmartToolFactory's full-sized avatar
🏠
Working from home

Smart Tool Factory SmartToolFactory

🏠
Working from home
View GitHub Profile
@Composable
private fun AnimatedPieChart() {
val pieData = remember {
mutableStateListOf(
PieData(
startAngle = 0f,
sweepAngle = 180f,
selectedColor = Color(0xffE57373),
unSelectedColor = Color(0xffB71C1C)
package com.smarttoolfactory.composeimagecropper.demo
import android.graphics.Bitmap
import android.graphics.PorterDuff
import android.graphics.PorterDuffXfermode
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
@SmartToolFactory
SmartToolFactory / ClipComposables.kt
Created September 3, 2022 08:42
Samples for clipping or cutting Composables
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CutCornerShape
import androidx.compose.material.BottomNavigation
import androidx.compose.material.BottomNavigationItem
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
@SmartToolFactory
SmartToolFactory / AnimatedSwappableList.kt
Last active August 13, 2022 06:30
LazyColumn that swaps items one by one with animation
package com.smarttoolfactory.composeimage
import androidx.compose.animation.core.*
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
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
package com.smarttoolfactory.composeimagecropper.demo
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.gestures.detectTransformGestures
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.Text