Android NullPointerException in custom view access
问题 I have created a custom view name StepView . Here is the code for StepView. public class StepView extends LinearLayout { private Context cont; private LinearLayout stepHolder; public StepView(Context context, AttributeSet attrs) { super(context); // TODO Auto-generated constructor stub LayoutInflater.from(context).inflate(R.layout.stepview, this, true); stepHolder = (LinearLayout) findViewById(R.id.stepHolder); cont = context; } public void addStep(String title, int drawableId, View