Вопрос

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

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top