0

I would like to know, from where we can know about what listener a View can implement. For Ex. there is no meaning in implementing onItemSelectedListener in custom Edit Text view class.

2 Answers 2

0

You should refer to the documentation (View, for example), there's a Nested Classes section that describes a list of interfaces that every View provides. For example, View class the OnClickListener interface, means every subclass of View would also provide it. And AdapterView (which is a parent of a ListView) provides the OnItemSelectedListener, means ListView will provide both OnClickListener and OnItemSelectedListener. Hope this helps.

0

You could take a look at the documentation, under the Inherited Methods.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.