List of utility methods to do View Size Get
void | setLayoutParams(View cover, Display display) set Layout Params Point size = getDisplaySize(display); int width = size.x; int height = size.y; cover.setLayoutParams(new LayoutParams(width, height)); cover.setY((float) width); |
void | measureView(View v) measure View ViewGroup.LayoutParams p = v.getLayoutParams(); if (p == null) { p = new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); int childWidthSpec = ViewGroup.getChildMeasureSpec(0, 0 + 0, p.width); ... |
void | measureView(View v) measure View if (v == null) { return; int w = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); int h = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); v.measure(w, h); ... |