Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Add Intent extension functions for View class: - #659

Open
acherkashyn wants to merge 1 commit into
Kotlin:masterfrom
acherkashyn:master
Open

acherkashyn wants to merge 1 commit into
Kotlin:masterfrom
acherkashyn:master

Conversation

@acherkashyn

Copy link
Copy Markdown

View.startActivity()
View.startService()
View.stopService()
View.intentFor()

View.startActivity()
View.startService()
View.stopService()
View.intentFor()
@4u7

4u7 commented Oct 10, 2018

Copy link
Copy Markdown
Contributor

I think having those for View is unnecessary and feels like overkill. Why context extensions is not enough?

@acherkashyn

Copy link
Copy Markdown
Author

@4u7 In my project I don't have too many fragments, but have lots of custom views that trigger separate activities or Android intents. This is just a set of extensions that make these actions a bit easier for Views, the same way as existing extension functions for Fragment or AnkoContext do.

@benibela

Copy link
Copy Markdown

These functions would be easier to use, if they were not extension functions, but global functions that get their context from some static global variable if that is possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants