Skip to content

Instantly share code, notes, and snippets.

View zakayothuku's full-sized avatar
👨‍💻
Opportunities don't respect sleep

Zakayo Thuku zakayothuku

👨‍💻
Opportunities don't respect sleep
View GitHub Profile
@Pasha831
Pasha831 / ModalBottomSheet.kt
Created January 25, 2023 13:17
ModalBottomSheetLayout for Material 3 Jetpack Compose
package com.hse.parkingapp.ui.beta.screens.components.material3
/*
* Copyright 2020 The Android Open Source Project
*
* 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
@stevdza-san
stevdza-san / RequestState.kt
Last active July 14, 2025 18:46
Useful wrapper class for handling the data in Jetpack Compose
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.togetherWith
import androidx.compose.runtime.Composable
sealed class RequestState<out T> {
data object Idle : RequestState<Nothing>()
data object Loading : RequestState<Nothing>()
@JyotimoyKashyap
JyotimoyKashyap / ProgressButton.kt
Created June 27, 2025 05:52
Progress Button Implementation in Jetpack Compose
/**
* A custom progress button Composable that displays an animated fill
* from left to right, contained within the button's specified shape.
*
* This button behaves like a standard Material Design button but includes
* a visual progress indicator that animates its width from 0% to 100%
* over a given duration. The progress animation is always clipped to match
* the button's corners, ensuring a seamless visual effect.
*
* Example Usage: