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 stepHol
Solution 1:
I solved the prob...change the code in constructor of StepView Class
public StepView(Context context, AttributeSet attrs) {
super(context, attrs);
....................
}
Solution 2:
You are not showing the full code block where you get the error, but it looks like you may have forgotten to use setContentView(R.layout.main_layout);
to set the layout in use.
Post a Comment for "Android Nullpointerexception In Custom View Access"