On Mon, Aug 9, 2010 at 2:51 PM, Andrew <[email protected]> wrote:

> It occurs to me that the problem might be with the code
> "this.getHeight()" and "this.getWidth()". I was under the impression
> that those calls would return the value of the height and width of a
> view, but maybe I am using them incorrectly.
>

Probably. Check their return value, they're probably 0 to start.

http://developer.android.com/reference/android/view/View.html

<http://developer.android.com/reference/android/view/View.html>"These
dimensions define the actual size of the view on screen, *at drawing time
and after layout*."

You may want to defer your initialization to the first draw or layout call
if you're dependent on these values and it's the problem.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

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