java - Implementing Button onClickView inside a class that extends OnClickItemListener -


i have class extends fragment , implements onclickitemlistener, gridview. need add 3 clickable buttons inside class, onclick(view v) cannot implemented because class implements onclickitemlistener. in xml layout buttons inside linearlayout.
how can implement works?

thank you.

no matter do, need set click listener on buttons. means have find buttons in view (probably in oncreateview) , call view.setonclicklistener(new view.onclicklistener()). if want fragment listener, add interface class fragment implements onclicklistener, onitemclicklistener , when find view call view.setonclicklistener(this)


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -