CustomControls: exception print wrong object type

This commit is contained in:
khanhduytran0 2020-07-31 05:55:58 +07:00
parent ee333d89c0
commit 0bda4a11fc

View File

@ -59,7 +59,7 @@ public class ControlView extends Button implements OnLongClickListener, OnTouchL
} else if (properties.specialButtonListener instanceof View.OnTouchListener) {
setOnTouchListener((View.OnTouchListener) properties.specialButtonListener);
} else {
throw new IllegalArgumentException("Field " + ControlButton.class.getName() + ".specialButtonListener must be View.OnClickListener or View.OnTouchListener");
throw new IllegalArgumentException("Field " + ControlButton.class.getName() + ".specialButtonListener must be View.OnClickListener or View.OnTouchListener, but is " + properties.specialButtonListener.getClass().getName());
}
setLayoutParams(new FrameLayout.LayoutParams(properties.width, properties.height));