Skip to content

Instantly share code, notes, and snippets.

View ShivamKumarJha's full-sized avatar

Shivam Kumar Jha ShivamKumarJha

View GitHub Profile
@EugeneTheDev
EugeneTheDev / DotsLoaders.kt
Created March 18, 2021 23:15
Dots loading animations with Jetpack Compose
import androidx.compose.animation.core.*
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@RahulSDeshpande
RahulSDeshpande / MaterialAlertDialogExt.kt
Last active July 11, 2021 22:11
Kotlin Extension for the MaterialAlertDialog!
// Kotlin extension
fun Context.alert(
@StyleRes style: Int = 0,
dialogBuilder: MaterialAlertDialogBuilder.() -> Unit
) {
MaterialAlertDialogBuilder(this, style)
.apply {
setCancelable(false)
dialogBuilder()
create()
@shmehdi01
shmehdi01 / KotlinExtensionUtils.kt
Last active May 1, 2023 22:26
Kotlin Extension Utils
import android.animation.*
import android.app.Activity
import android.content.*
import android.content.Context.CLIPBOARD_SERVICE
import android.content.pm.PackageManager
import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.Typeface
import android.net.Uri
import android.provider.Settings
@bmc08gt
bmc08gt / SwipeToDelete.kt
Last active December 15, 2023 03:40
Jetpack Compose Modifier extension to implement swipe-to-delete via Modifier.draggable
import androidx.animation.IntToVectorConverter
import androidx.animation.tween
import androidx.compose.Composable
import androidx.compose.mutableStateOf
import androidx.compose.remember
import androidx.ui.animation.animatedFloat
import androidx.ui.animation.animatedValue
import androidx.ui.core.*
import androidx.ui.core.gesture.scrollorientationlocking.Orientation
import androidx.ui.foundation.animation.FlingConfig
@cheriimoya
cheriimoya / build_lineage_for_davinci.md
Last active March 18, 2025 06:32
This will hopefully help you to build LineageOS 17.1 for the Xiaomi davinci.

LineageOS build guide for n00bs like me

Soo you want to build LineageOS (los) for your xiaomi davinci?

This guide will show you how! In this guide i'll lead you through the process of compiling los 17.1 for xiaomis MI 9T, optionally with spoofing support for microG.

I am not responsible for any damage you do to your phone and this guide does

@filipkowicz
filipkowicz / HeaderItemDecoration.kt
Last active February 26, 2025 18:20
Item Decorator for sticky headers in Kotlin
package com.filipkowicz.headeritemdecorator
/*
solution based on - based on Sevastyan answer on StackOverflow
changes:
- take to account views offsets
- transformed to Kotlin
- now works on viewHolders
@saber-solooki
saber-solooki / SimpleRecyclerView.java
Created July 7, 2018 18:40
Sticky Header RecyclerView
package com.saber.customstickyheader;
import android.graphics.Color;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;