Skip to content

Instantly share code, notes, and snippets.

View Leeonardoo's full-sized avatar
🚀

Leonardo de Oliveira Leeonardoo

🚀
View GitHub Profile
@Leeonardoo
Leeonardoo / MainActivity.kt
Created June 9, 2022 01:28
A quick and bad workaround for a crash from rotating the device when a bottom sheet is too tall using Jetpack Navigation for Compose
package com.example.app
import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.foundation.layout.*
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.ModalBottomSheetValue
import androidx.compose.material3.*
@Leeonardoo
Leeonardoo / adb-all.sh
Created April 4, 2022 11:56
ADB-All and localhost port forwarding
#!/bin/bash
# Place it on /usr/bin/
adb devices | while read line
do
if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
then
device=`echo $line | awk '{print $1}'`
echo "$device $@ ..."
adb -s $device $@