I am just trying to draw a rectangle whose height grows based on a
certain value. However it won't draw anything when I use this
variable. I think its some sort of clipping issue that I dont
understand. The ondraw belongs to a custom view (it simply extends the
View class)

THis works: (it draws a rectangle half the height of the screen

        @Override
        protected synchronized void onDraw(Canvas canvas) {
                canvas.drawRect(0, 0, getWidth()-1, (float).
5*(getHeight()-1),mPaint);
        }

This does not work at all (_progress is a float that starts at 0,
progresses to 1, its a vertical progress bar)


        @Override
        protected synchronized void onDraw(Canvas canvas) {
                canvas.drawRect(0, 0, getWidth(), (float)_progress*getHeight(),
mPaint);
        }

There has to be a glaringly obvious reason for this, i have messed
around with the cliprect with no luck. Thanks

Jon

-- 
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