aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/utils/FragmentUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/FragmentUtils.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/FragmentUtils.kt12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/FragmentUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/FragmentUtils.kt
new file mode 100644
index 0000000..acc71f2
--- /dev/null
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/FragmentUtils.kt
@@ -0,0 +1,12 @@
+package ca.allanwang.kau.utils
+
+import android.support.v4.app.Fragment
+import org.jetbrains.anko.bundleOf
+
+/**
+ * Created by Allan Wang on 2017-07-02.
+ */
+fun <T : Fragment> T.withArguments(vararg params: Pair<String, Any>): T {
+ arguments = bundleOf(*params)
+ return this
+} \ No newline at end of file