Skip to content

Instantly share code, notes, and snippets.

View hornhuang's full-sized avatar
🏅
Focusing

hornhuang hornhuang

🏅
Focusing
View GitHub Profile
@omorandi
omorandi / android_get_view_size.java
Last active December 14, 2020 20:51
Android: get the actual size of a match_parent/wrap_content view
view.post(new Runnable() {
@Override
public void run() {
int width = view.getWidth();
int height = view.getHeight();
//do something cool with width and height
}
});