Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 2
    So does that mean I need to override ImageView just to catch the onSizeChange() event to know the real size? That seems like a bit of overkill... though at this point I'm desperate just to get the code working, so it's worth a shot. Commented Sep 23, 2010 at 17:34
  • I was thinking more of like waiting till your onCreate() has finished in your Activity. Commented Sep 23, 2010 at 18:00
  • 1
    As mentioned, I tried putting this code in onPostCreate() which gets run after the view is completely created and started. Commented Sep 24, 2010 at 7:39
  • 1
    Where is the quoted text from? Commented Nov 2, 2011 at 19:39
  • 1
    this quote for custom view, don't post it for such answer when we ask about view size in general Commented Mar 10, 2018 at 1:09