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
Post a Comment