dimanche 10 mai 2015

Android: Is it possible to calculate a view's height before it's drawn?

Notes:

  • I don't want to use any getViewTreeObserver() listeners, or any listeners at all. I want to calculate the view's height BEFORE it's drawn.
  • I tried getMeasuredHeight() but it returns 0 every time.

Any suggestions?

Aucun commentaire:

Enregistrer un commentaire