is there method in android height of entire 'scrollview'?
i tried 'layout.getmeasuredheight()' gives height of visible region.
you want height of scrollview's child. try scrollview.getchildat(0).getmeasuredheight()
.
edit
you possibly try having view measure , give measurespec lets use space wants. this:
int width = ... // screen width; int height = 65536; // arbitrarily large value final int widthmeasurespec = measurespec.makemeasurespec(width, measurespec.at_most); final int heightmeasurespec = measurespec.makemeasurespec(height, measurespec.at_most); view.onmeasure(widthmeasurespec, heightmeasurespec); // height int measuredheight = view.getmeasuredheight();
full disclosure: don't know if work or effect may have in app. there side-effect of calling method, view's measured dimensions set. if it's possible, might try create separate, duplicate view , measure one; or, after measuring hack, call requestlayout()
on view schedule measure & layout of view tree.
Comments
Post a Comment