pawegio / KAndroid

Kotlin library for Android
Apache License 2.0
896 stars 81 forks source link

Intent - Extension methods in order to chain the calls #4

Closed fbencosme closed 8 years ago

fbencosme commented 8 years ago

I think, would be nice if we can do something like :

IntentFor<MyActivity>(context).start(context)
IntentFor<MyActivity>(context)
   .putExtra("name", value)
   .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
   .start(context)

or

IntentFor<MyActivity>(context)
   .putExtra("phone", phone)
   .startForResult(activity, MyReqCode )
pawegio commented 8 years ago

Thanks for contribution. Just added your extension functions. I'll soon upload changes with new version to bintray.