Skip to content

Instantly share code, notes, and snippets.

View foliolo's full-sized avatar
💭
Coding!

Alberto foliolo

💭
Coding!
  • Edinburgh
View GitHub Profile
@foliolo
foliolo / Event.kt
Created April 26, 2023 10:58 — forked from JoseAlcerreca/Event.kt
An event wrapper for data that is exposed via a LiveData that represents an event.
/**
* Used as a wrapper for data that is exposed via a LiveData that represents an event.
*/
open class Event<out T>(private val content: T) {
var hasBeenHandled = false
private set // Allow external read but not write
/**
* Returns the content and prevents its use again.
@foliolo
foliolo / AdbCommands
Created February 27, 2023 08:43 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader