My Button is linked to an OnClickListener which implemented some code to be executed if the button is clicked. When I did this in an Activity class, it works out flawlessly. However, in Fragment, this doesn't seem to be the case. Why does OnClickListener cannot be called inside a Fragment? My Button is linked to an OnClickListener which