Skip to content

Instantly share code, notes, and snippets.

View MoatazBadawy's full-sized avatar
🇵🇸
We will reclaim our land soon

Moataz Mohamed MoatazBadawy

🇵🇸
We will reclaim our land soon
View GitHub Profile
@Moutard3
Moutard3 / mp3-upload-direct-link.md
Last active July 14, 2024 23:11
Tutorials / Walkthrough for uploading & getting direct link of sound file (mp3, ogg, ...)
@abd3lraouf
abd3lraouf / KeyboardVisibilityDetector.kt
Last active July 2, 2024 20:11
Android Compose Keyboard Visibility Detector: A Jetpack Compose implementation to detect the visibility of the software keyboard in an Android app. This example demonstrates the use of WindowInsets and isImeVisible in a simple Compose layout
package dev.abd3lraouf.learn.myapplication
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
@ilyasipek
ilyasipek / CounterAnimationRow.kt
Created January 18, 2024 18:20
CounterAnimationRow
@Composable
fun CounterAnimationRow(
count: Int,
modifier: Modifier = Modifier,
charComposable: @Composable RowScope.(Char) -> Unit,
) {
var oldCount by remember { mutableIntStateOf(count) }
val increasingValueContentTransform = remember {
slideInVertically { -it } + fadeIn() togetherWith slideOutVertically { it } + fadeOut()
}
@KlassenKonstantin
KlassenKonstantin / Pull2Refresh.kt
Created March 26, 2024 11:23
Fitbit style Pull 2 Refresh
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
P2RTheme {
// A surface container using the 'background' color from the theme
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
CompositionLocalProvider(
LocalOverscrollConfiguration provides null // Disable overscroll otherwise it consumes the drag before we get the chance
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
ColorPickerTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {