Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyViewGroup extends LinearLayout {
- // provide constructor implmentation to justify super constructor requirement
- private OnSizeChangeListener callback;
- public void setOnSizeChangeListener(OnSizeChangeListener callback) {
- this.callback = callback;
- }
- @Override
- public void remove(View view) {
- super.remove(view);
- if(callback != null) {
- callback.sizeChanged(getChildCount);
- }
- }
- }
Add Comment
Please, Sign In to add comment