I canβt understand why this will not disable the button?
btnSaturdayStartTime = (Button)findViewById(R.id.btnSaturdayStartTime); btnSaturdayStartTime.setEnabled(false);
When I click on the button, it still starts the listener.
Try using btnSaturdayStartTime.setClickable (false).
See setClickable from the documentation.
try the method: Button.setClickable(false) ; or remove the listener on your button as follows:button.setOnClickListener(null);
Button.setClickable(false) ;
button.setOnClickListener(null);
The button may be recreated or reactivated between disabling user interaction with the click. Are you sure you turned off the right button? What version of Android are you planning?