On Tue, Nov 9, 2010 at 1:13 PM, siliconeagle <[email protected]> wrote:
> I have a custom view i am writing for my drawing app - but the first
> time i set the drawing into it i need to get the dimension for the
> view (using getMeasuredWidth() & getMeasuredHeight()). But until the
> view display these return 0. I have tried calling:
> requestLayout()
> invalidate()
> numDraw.measure(MeasureSpec.EXACTLY, MeasureSpec.EXACTLY);

Did you implement View.onMeasure() in your custom view? If so, what do
you do there?
In other words, it is your responsibility to tell your view how big it
should be since you are the creator.


-- 
Daniel Drozdzewski

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