Skip to content

Instantly share code, notes, and snippets.

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

Indrajit Chakrabarty indyfromoz

🏠
Working from home
View GitHub Profile
@bodhichristian
bodhichristian / Model Screen for UI Testing.md
Last active November 30, 2024 21:19
Model Screen for UI Testing

Model Device Screen for UI Testing

Create a Screen protocol that requires one XCUIApplication object.

Screen Protocol

protocol Screen {
    var app: XCUIApplication { get set }
}
@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
//
// CloudCompositingView.swift
// OpenSwiftUIDesigns
//
// Created by Amos Gyamfi on 9.4.2024.
//
import SwiftUI
struct CloudCompositingView: View {
@KlassenKonstantin
KlassenKonstantin / ContainerTransformExample.kt
Created April 11, 2024 06:00 — forked from Rahkeen/ContainerTransformExample.kt
A really simple grid-to-full-screen transition using Shared Elements
data class ColorItemState(
val id: Int,
val color: Color,
val name: String,
)
val CoolColors = listOf(
ColorItemState(
id = 1,
color = Color(0xFFEF4444),
@KlassenKonstantin
KlassenKonstantin / SharedTrans.kt
Last active November 14, 2024 17:03
Popup shared transition test
private val products = listOf(
Product("🍎", "Apples"),
Product("🍪", "Cookies"),
Product("🍉", "Watermelon"),
Product("🫐", "Blueberries"),
Product("🍊", "Oranges"),
Product("🍑", "Peaches"),
Product("🥦", "Broccoli"),
)
@ardakazanci
ardakazanci / CircularMainMenuGroup.kt
Created January 13, 2024 05:54
Circular Menu Group for jetpack compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
CircularMenuGroupTheme {
MainMenuCanvas()
}
}
}
@khalidx
khalidx / node-typescript-esm.md
Last active April 15, 2025 14:15
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@maulikhirani
maulikhirani / BoxShadow.kt
Created July 15, 2023 13:25
Helper extension to use drop shadow in Jetpack Compose
import android.graphics.BlurMaskFilter
import android.graphics.ColorMatrix
import android.graphics.ColorMatrixColorFilter
import androidx.compose.runtime.Stable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.drawWithCache
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Canvas
import androidx.compose.ui.graphics.ClipOp
@hector6872
hector6872 / DragDropLazyColum.kt
Last active November 29, 2024 12:20
LazyColum Drag&Drop implementation in Jetpack Compose
/*
* Copyright (c) 2023. Héctor de Isidro - hector6872
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@chiragthummar
chiragthummar / BouncyClickable.kt
Created June 25, 2023 07:25
Increase user experience with bouncy click on any component of jetpack compose.
@OptIn(ExperimentalFoundationApi::class)
fun Modifier.bounceClickable(
dampingRatio: Float = 0.85f,
enabled: Boolean = true,
onClick: () -> Unit = {},
onDoubleClick: (() -> Unit)? = null,
onLongClick: (() -> Unit)? = null,
shape: Shape = RectangleShape,
useHapticFeedback: Boolean = true,
) = composed {