Skip to content
Advertisement

Button setOnClickListener method is not invoked

The below is the sample code I’m trying to get the selected value from spinner on setOnClickListener method for the Button validateUser.

JavaScript

Advertisement

Answer

Toast needs to be shown. use .show() at the end.

Toast.makeText(getApplicationContext(), "Button is Selected", Toast.LENGTH_SHORT).show();

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement