Asynchronous layout inflation
Lubos Mudrak

Hi. Thanks for good article. 
parents function generateLayoutParams() has to be thread-safe — This a lot of asking.
All UI classes are not thread save, because of it UI code called only in UI thread.
To make this function thead-safe we need to extend one of implementation ViewGroup and add intrinsic Locks. 
something like this:

public class FrameLayoutForAsyncInflation extends FrameLayout {

public FrameLayoutForAsyncInflation(Context context, AttributeSet attrs) {
super(context, attrs);

synchronized protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) {
return super.generateLayoutParams(p);

synchronized public LayoutParams generateLayoutParams(AttributeSet attrs) {
return super.generateLayoutParams(attrs);

How would you do this?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.