I'm curious how these construction differ. One calls method on object (eg button) and passes anon function, and the other uses android:onClick property that we set in the layout file. So why should I use one method or the other. From the coding point of view listeners seem to give more control, am i right?
            Asked
            
        
        
            Active
            
        
            Viewed 51 times
        
    0
            
            
        - 
                    [Here](https://stackoverflow.com/questions/21319996/android-onclick-in-xml-vs-onclicklistener) is a pretty good answer which points out the differences. – Vasanth Sadhasivan Aug 31 '17 at 21:11
- 
                    Check this answer here [Difference Between OnClickListener vs OnClick](https://stackoverflow.com/a/21326604/4403813) – Yassine BELDI Aug 31 '17 at 21:18
 
    