Android -- Simple path, use of arcTo causes "UnsupportedOperationException?"
<p>I'm trying to create a simple path in the onDraw method of a SurfaceView object I've created and the layout editor keeps giving me "UnsupportedOperationException: null" whenever I add an arcTo command to the path.</p>

<p>How do I fix this?</p>

<p>Thanks,</p>

<p>Ryan</p>

<pre><code>public class myView extends SurfaceView
{
    private Path myPath;

    public myView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onDraw(Canvas canvas)
    {
        super.onDraw(canvas);

        //set bounds
        final int top = 0 +this.getPaddingTop();
        final int bottom = this.getMeasuredHeight() - this.getPaddingBottom();
        final int left = 0 + this.getPaddingLeft();
        final int right = this.getMeasuredWidth() - this.getPaddingRight();
                int someHeight;
                int someWidth;
                innerLeft = new RectF(left + someWidth, bottom - otherHeight,
                       left + someHeight + 10 * 2, bottom);

        myPath.moveTo(left, bottom);
        myPath.lineTo(left, top + 10);
        myPath.arcTo(innerLeft, 180, 90);
        myPath.close();
    }
}
</code></pre>
