{"comment":{"url":"https://api.github.com/repos/robertvacareanu/OOP-2015/comments/13766967","html_url":"https://github.com/robertvacareanu/OOP-2015/commit/cf23ad5703b01015769af982ace644e4bf913646#commitcomment-13766967","id":13766967,"user":{"login":"Alex-Cosma","id":5063160,"avatar_url":"https://avatars.githubusercontent.com/u/5063160?v=3","gravatar_id":"","url":"https://api.github.com/users/Alex-Cosma","html_url":"https://github.com/Alex-Cosma","followers_url":"https://api.github.com/users/Alex-Cosma/followers","following_url":"https://api.github.com/users/Alex-Cosma/following{/other_user}","gists_url":"https://api.github.com/users/Alex-Cosma/gists{/gist_id}","starred_url":"https://api.github.com/users/Alex-Cosma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alex-Cosma/subscriptions","organizations_url":"https://api.github.com/users/Alex-Cosma/orgs","repos_url":"https://api.github.com/users/Alex-Cosma/repos","events_url":"https://api.github.com/users/Alex-Cosma/events{/privacy}","received_events_url":"https://api.github.com/users/Alex-Cosma/received_events","type":"User","site_admin":false},"position":46,"line":46,"path":"Students/Others/Vacareanu M. Robert Ionut/Chapter1/BasicActions/app/src/main/res/layout/activity_main.xml","commit_id":"cf23ad5703b01015769af982ace644e4bf913646","created_at":"2015-10-14T13:29:35Z","updated_at":"2015-10-14T13:29:35Z","body":"This way of linking the click listeners to a button is OK, however, I wouldn't prefer it done like this. It works, yes, however, I would have at least made 2 separate listeners for the two buttons. \r\nThe second (and in my opinion more clear/concise) way of doing it would be to of course declare the buttons as variables in your class and then adding on `onClick` listener to them, there.\r\n\r\nBut you know, the way you did it is not wrong! It's just that I've never seen it been written this way in a released application. Though standards may of course differ."}}