public class CustomView extends ViewGroup {
private View childView;
public LookView(Context context, AttributeSet attrs) {
super(context, attrs);
//Never do it here
//this.childView = this.findViewById(R.id.childView);
}
@Override
protected void onFinishInflate() {
//Do it here :)
this.childView = this.findViewById(R.id.childView);
}
}