Guest User

Untitled

a guest
Jan 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class MyViewGroup extends LinearLayout {
  2.  
  3. // provide constructor implmentation to justify super constructor requirement
  4.  
  5. private OnSizeChangeListener callback;
  6.  
  7. public void setOnSizeChangeListener(OnSizeChangeListener callback) {
  8. this.callback = callback;
  9. }
  10.  
  11. @Override
  12. public void remove(View view) {
  13. super.remove(view);
  14. if(callback != null) {
  15. callback.sizeChanged(getChildCount);
  16. }
  17. }
  18. }
Add Comment
Please, Sign In to add comment