android - Difference between specifying the view.onclicklistener and just having onclicklistener -


i looked on http://developer.android.com/reference/android/view/package-summary.html , saw view class has interface named "view.onclicklistener" "interface definition callback invoked when view clicked" question difference if specify view or not in interface?

basically

button.setonclicklistener(new button.onclicklistener() same

button.setonclicklistener(new onclicklistener()?

there 2 of setonclicklistener 1 view class , 1 refer dialoginterface class.

so in order manipulate view button or imageview , add action it, need use view.onclicklistener while dealing dialog buttons should use dialogineterface.onclicklistener both have different arguments.

usually adding onclicklistener, view class imported default or make choose between both classes. don't need add view.onclicklistener. however, if class dialoginterface have been imported , want use view onclicklistener have write view.onclicklistener differentiate both classes' onclicklistener.

hope clear , looking for.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

qml - Is it possible to implement SystemTrayIcon functionality in Qt Quick application -

double exclamation marks in haskell -