diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/FragmentUtils.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/FragmentUtils.kt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/FragmentUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/FragmentUtils.kt new file mode 100644 index 00000000..cd638068 --- /dev/null +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/FragmentUtils.kt @@ -0,0 +1,15 @@ +package com.pitchedapps.frost.utils + +import android.os.Bundle +import android.support.v4.app.Fragment + +/** + * Created by Allan Wang on 2017-05-29. + */ + +fun Fragment.withBundle(creator: (Bundle) -> Unit): Fragment { + val bundle = Bundle() + creator.invoke(bundle) + this.arguments = bundle + return this +}
\ No newline at end of file |