android - Skipping custom ViewGroup's child layout to improve perfomance -


i creating custom viewgroup manual (touch) , animated resizing of it's child views. resizing done re-calculating child view's sizes , calling requestlayout(), (on animation):

@override protected void applytransformation(float interpolatedtime, transformation t) {     (int = 0; < childlist.size; i++) {         newsize[i] = startsize[i] + (int)(delta[i] * interpolatedtime);     }     requestlayout(); } 

in onmeasure() , onlayout() apply calculated sizes. questions are: can skip child.measure() in onmeasure() and/or child.layout() in onlayout() if:

  1. child's size 0?
  2. child's size and/or position in viewgroup hasn't changed since last layout?


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -