0

i want to ask how we do

AdapterView.OnItemClickListener Listener new AdapterView.OnItemClickListener()

altough AdapterView.OnItemClickListener is an interface

and i know that An interface can't be instantiated

  • Did you check https://stackoverflow.com/questions/41829806/how-to-implement-onitemclicklistener-at-class-level? – VN'sCorner May 02 '20 at 21:03
  • You're not instantiating the interface, there. You're instantiating the anonymous class that's defined by the interface name, and the class body in the following `{...}` block. – Mike M. May 02 '20 at 21:03

0 Answers0