Created
May 5, 2018 17:30
-
-
Save MadinaB/1b71082babea80cad96bcfde66dc18b5 to your computer and use it in GitHub Desktop.
Getting height of a view in OnCreate()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final View view=//smth; | |
... | |
view.post(new Runnable() { | |
@Override | |
public void run() { | |
view.getHeight(); //height is ready | |
} | |
}); | |
http://qaru.site/questions/20221/getwidth-and-getheight-of-view-returns-0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment