In the layout editor in Eclipse, I have created a custom view.  For
some reason, there are a few methods which cause NoSuchMethodError
exceptions in the code.  Here is the code in the initializer of the
custom view:

        mPaint = new Paint();
        mPaint.setAntiAlias(true);
        mPaint.setDither(true);
        mPaint.setColor(0xFFFF0000);
        mPaint.setStyle(Paint.Style.STROKE);

        try {
                //mPaint.setStrokeJoin(Paint.Join.ROUND);
                //mPaint.setStrokeCap(Paint.Cap.ROUND);
        } catch (Exception e) {

        }
        mPaint.setStrokeWidth(12);

The code which is causing no such method exceptions are the ones
surrounded in a try-catch.  By the way, the try-catch does NOT stop
the layout editor from getting the exception (and therefore failing to
render).

Does anyone have any clue of why a few methods on the Paint class are
throwing errors?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to