Skip to content

Instantly share code, notes, and snippets.

View vaimalaviya1233's full-sized avatar
πŸ‘¨β€πŸ’»
Backing up data...

Vaibhav Malaviya vaimalaviya1233

πŸ‘¨β€πŸ’»
Backing up data...
View GitHub Profile
// Requires Compose 1.1.0-alpha02+
// Best used with navigation animation transitions in Accompanist 0.17.0+
import androidx.compose.animation.*
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.tween
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
@vaimalaviya1233
vaimalaviya1233 / AlertDialog.kt
Created August 17, 2026 22:53 — forked from mxalbert1996/AlertDialog.kt
General-purpose AlertDialog for Jetpack Compose
import androidx.compose.animation.animateContentSize
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.unit.dp
@vaimalaviya1233
vaimalaviya1233 / Scrollbar.kt
Created August 17, 2026 22:22 — forked from DonTomika/Scrollbar.kt
Modifiers to draw scrollbars in Jetpack Compose
/*
* MIT License
*
* Copyright (c) 2022 Albert Chang
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@vaimalaviya1233
vaimalaviya1233 / HeaderFooterLayout.kt
Created August 17, 2026 22:18 — forked from mxalbert1996/HeaderFooterLayout.kt
A layout that allows content to flow over header and footer when scrolled.
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.Card
@vaimalaviya1233
vaimalaviya1233 / AutoShrinkText.kt
Created August 17, 2026 22:04 — forked from mxalbert1996/AutoShrinkText.kt
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
@vaimalaviya1233
vaimalaviya1233 / 0.README.md
Created July 14, 2026 05:21 — forked from TrianguloY/0.README.md
Lightning Launcher script collection

These are all the scripts that I still keep on my phone for Lightning launcher (the best Android launcher ever).

If you have never heard or used this launcher, these will be useless.

If you have, and you remember me, these may look fun to check and see what crazy shenanigans I never published on the wiki.

In any case I decided to post them here for preservation. I had very little experience, I apologize for the 'unusual' style of programming.

They are unedited, shown here without any modification, they may or may not work wihout minimal tweaks.

@vaimalaviya1233
vaimalaviya1233 / index.html
Created March 25, 2026 14:54
Pattern Over Pixels - Effect
<!-- Import maps polyfill -->
<script async src="https://unpkg.com/es-module-shims@1.8.0/dist/es-module-shims.js"></script>
<!-- Specify module imports for Three.js and lil-gui -->
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js",
"lil-gui": "https://unpkg.com/lil-gui@0.19.1/dist/lil-gui.esm.min.js"
}
@vaimalaviya1233
vaimalaviya1233 / CoreArchitecture.kt
Created February 11, 2026 06:04 — forked from trinadhthatakula/CoreArchitecture.kt
⚑ Trinadh's Core Android Architecture (Kotlin + Koin)
/**
* πŸš€ Core Architecture: Safe API Calling with Koin & Coroutines
* Stack: Kotlin | Koin | Flow | Result Pattern
* Author: Trinadh Thatakula
*/
// 1. type-safe Result wrapper
sealed interface DataResult<out T> {
data class Success<T>(val data: T) : DataResult<T>
@vaimalaviya1233
vaimalaviya1233 / AdMob-in-Jetpack-Compose.md
Created February 11, 2026 06:03 — forked from trinadhthatakula/AdMob-in-Jetpack-Compose.md
A collection of reusable Jetpack Compose functions for implementing various Google AdMob ad formats in modern Android apps using Kotlin.

πŸ’° ADMOB COMPOSE INTEGRATION

  • Strategies: Banner, Interstitial, Native
  • Lifecycle: Handles onPause/onResume automatically
  • Interop: Uses AndroidView with factory lambdas to prevent leaks

Implementing AdMob Ads in Jetpack Compose

A guide to integrating Google AdMob ads (Banner, Adaptive Banner, Collapsible Banner, Interstitial, and Native Ads) into an Android application built with Jetpack Compose.

This guide provides reusable @Composable functions to display different types of ads and follows modern Android development practices, which as a mobile developer who prefers state-based programming with MVVM, you'll find quite familiar.