Get widht and height of view android

Code examples

0
0

measure view height android

ViewTreeObserver vto = frameAbout.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {

int width = frameAbout.getMeasuredWidth();
int height = frameAbout.getMeasuredHeight();
ViewGroup.LayoutParams params = fakeheight.getLayoutParams();
params.height = height - 200;
fakeheight.setLayoutParams(params);
}
});

Similar pages

Similar pages with examples

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................