Skip to content

Instantly share code, notes, and snippets.

@sajjadyousefnia
Created July 18, 2018 10:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sajjadyousefnia/c313a684bd679b7b235b396fdd02dc00 to your computer and use it in GitHub Desktop.
// روش معمول
fun createIntent(intentData: String, intentAction: String): Intent {
val intent = Intent()
intent.action = intentAction
intent.data=Uri.parse(intentData)
return intent
}
// روش پیشرفته و زنجیری
fun createIntent(intentData: String, intentAction: String) =
Intent().apply { action = intentAction }
.apply { data = Uri.parse(intentData) }سی
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment