You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Here #1162 (comment)@dodgex suggested to allow the subclass as a parameter. I think it would be very convenient to allow this for other listener annotations and other parameters.
@yDelouis WDTY? If it is a good idea we should review all params of all listener annotations and decide where it makes sense to allow subclass as param type.
// old way@ClickvoidmyButtonClicked(Viewview) {
ButtonmyButton = (Button) view;
// do sg with myButton
}
// new way@ClickvoidmyButtonClicked(Buttonview) {
// do sg with view
}
So it removes the need of casting as @ViewById does.
What do you mean the right class? We cannot know what is the actual type of the object, this is the responsibility of the client. Just like with @ViewById.
Here #1162 (comment) @dodgex suggested to allow the subclass as a parameter. I think it would be very convenient to allow this for other listener annotations and other parameters.
@yDelouis WDTY? If it is a good idea we should review all params of all listener annotations and decide where it makes sense to allow subclass as param type.