コード例 #1
0
 @Override
 public void removeAllViews(ReactViewGroup parent) {
   boolean removeClippedSubviews = parent.getRemoveClippedSubviews();
   if (removeClippedSubviews) {
     parent.removeAllViewsWithSubviewClippingEnabled();
   } else {
     parent.removeAllViews();
   }
 }
コード例 #2
0
 @Override
 public View getChildAt(ReactViewGroup parent, int index) {
   boolean removeClippedSubviews = parent.getRemoveClippedSubviews();
   if (removeClippedSubviews) {
     return parent.getChildAtWithSubviewClippingEnabled(index);
   } else {
     return parent.getChildAt(index);
   }
 }
コード例 #3
0
 @Override
 public int getChildCount(ReactViewGroup parent) {
   boolean removeClippedSubviews = parent.getRemoveClippedSubviews();
   if (removeClippedSubviews) {
     return parent.getAllChildrenCount();
   } else {
     return parent.getChildCount();
   }
 }
コード例 #4
0
 @Override
 public void addView(ReactViewGroup parent, View child, int index) {
   boolean removeClippedSubviews = parent.getRemoveClippedSubviews();
   if (removeClippedSubviews) {
     parent.addViewWithSubviewClippingEnabled(child, index);
   } else {
     parent.addView(child, index);
   }
 }
コード例 #5
0
 @Override
 public void removeViewAt(ReactViewGroup parent, int index) {
   boolean removeClippedSubviews = parent.getRemoveClippedSubviews();
   if (removeClippedSubviews) {
     View child = getChildAt(parent, index);
     if (child.getParent() != null) {
       parent.removeView(child);
     }
     parent.removeViewWithSubviewClippingEnabled(child);
   } else {
     parent.removeViewAt(index);
   }
 }
コード例 #6
0
 @Override
 public void onLayoutChange(
     View v,
     int left,
     int top,
     int right,
     int bottom,
     int oldLeft,
     int oldTop,
     int oldRight,
     int oldBottom) {
   if (mParent.getRemoveClippedSubviews()) {
     mParent.updateSubviewClipStatus(v);
   }
 }