It was calling PopupWindow.update() with -1 arguments for the width and height under the impression that that would cause it to use the new values that had already been set with setWidth() and setHeight(). But in fact this caused it not to change at all.