1 package org.robolectric.android; 2 3 import android.content.Context; 4 import android.util.AttributeSet; 5 import android.widget.LinearLayout; 6 7 public class CustomView2 extends LinearLayout { 8 public int childCountAfterInflate; 9 CustomView2(Context context, AttributeSet attrs)10 public CustomView2(Context context, AttributeSet attrs) { 11 super(context, attrs); 12 } 13 onFinishInflate()14 @Override protected void onFinishInflate() { 15 childCountAfterInflate = getChildCount(); 16 } 17 } 18