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

Add Intent extension functions for View class: #659

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

acherkashyn
Copy link

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

View.startActivity()
View.startService()
View.stopService()
View.intentFor()
@4u7
Copy link
Contributor

4u7 commented Oct 10, 2018

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

@acherkashyn
Copy link
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

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