Skip to content

Instantly share code, notes, and snippets.

View MenilV's full-sized avatar

Menil Vukovic MenilV

View GitHub Profile
@MenilV
MenilV / KeyboardManager.kt
Created June 29, 2021 16:07 — forked from andrewmunn/KeyboardManager.kt
Android Keyboard Status Observable
/**
* Manages access to the Android soft keyboard.
*/
class KeyboardManager @Inject constructor(private val activity: Activity) {
/**
* Observable of the status of the keyboard. Subscribing to this creates a
* Global Layout Listener which is automatically removed when this
* observable is disposed.
*/
@MenilV
MenilV / logging.kt
Created May 30, 2020 20:24 — forked from tomaszpolanski/logging.kt
RxLogging
@file:Suppress("NOTHING_TO_INLINE")
import android.util.Log
import io.reactivex.*
inline fun <reified T> printEvent(tag: String, success: T?, error: Throwable?) =
when {
success == null && error == null -> Log.d(tag, "Complete") /* Only with Maybe */
success != null -> Log.d(tag, "Success $success")
error != null -> Log.d(tag, "Error $error")

Keybase proof

I hereby claim:

  • I am MenilV on github.
  • I am menilvukovic (https://keybase.io/menilvukovic) on keybase.
  • I have a public key whose fingerprint is A5A2 1B43 EBEF ACCE 7E90 6938 0CB5 664E 2ABE 0D06

To claim this, I am signing this object: