Yes.
You can use different MeasureSpec values depending on what you actually
need (e.g. staying within a certain width).
-- K
2014-06-24 7:23 GMT+04:00 Nathan :
> Is this the idea?
>
> int widthSpec = MeasureSpec.UNSPECIFIED;
> int heightSpec = MeasureSpec.UNSPECIFIED;
>
Is this the idea?
int widthSpec = MeasureSpec.UNSPECIFIED;
int heightSpec = MeasureSpec.UNSPECIFIED;
mContentView.measure(widthSpec, heightSpec);
int W = mContentView.getMeasuredWidth();
int H = mContentView.getMeasuredHeight();
Doing that, I get actual va
Just measure the popup's content view by calling contentView.measure with
the appropriate MeasureSpec objects.
Add padding from the popup's background, if appropriate.
Viola!
You have the exact size in pixels to use as the popup window's width and
height.
Some sample code from the framework its
I brought this up years ago.
https://groups.google.com/forum/#!topic/android-developers/hZk5YYsmv_4
I want to either set or determine the size of the popupwindow.
Is it still impossible?
The size is not a constant.
If I call
mContentView.getWidth();
The first time it is zero.
The second t
4 matches
Mail list logo