Skip to content

Instantly share code, notes, and snippets.

Avatar

Yannick Gerard yanngx

  • Brussels
View GitHub Profile
@yanngx
yanngx / FragmentArgumentDelegate.kt
Last active Sep 13, 2022
Fragment arguments without hassle !
View FragmentArgumentDelegate.kt
package be.brol
import android.os.Binder
import android.os.Bundle
import android.support.v4.app.BundleCompat
import android.support.v4.app.Fragment
/**
* Eases the Fragment.newInstance ceremony by marking the fragment's args with this delegate
* Just write the property in newInstance and read it like any other property after the fragment has been created