Android‎ > ‎

Custom View In Xml inflating error

posted Feb 15, 2013, 4:01 AM by Akash Khaitan   [ updated Mar 9, 2013, 7:34 AM ]
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.soulastral.customview/com.soulastral.customview.CustomViewActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class com.soulastral.customview.MotionDrawView

If some error like this appears, include a constructor like below which takes in context and attributeset
 public MotionDrawView(Context context, AttributeSet attrs) {
         super(context, attrs);
        // TODO Auto-generated constructor stub