Question

I Need To Use "getSystemService" In Custom Spinner, So Custom Spinner Extends

getSystemService Will Use To Copy Text To Clip Board is non-static

And I Am unable To Use It In Custom Spinner

Was it helpful?

Solution

IMHO, a custom Spinner subclass has no business working with the clipboard. That is the responsibility of the fragment or activity that hosts the Spinner.

That being said, call getContext().getSystemService() from a method on a View.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top