开发者

GLSurfaceView overlaps other views

I've got a programmatically-created layout, where when my app gets ads, it'll show an admob view, pushing my existing GLView down and resizing it.

However, although it initially seems to be pushing my GLView down, the GLView suddenly resets itself and overlaps the AdMob view and resets itself to its original size.

This is what I do to resize and reposition the GLSurfaceView:

Main.Instance.admobView.setVisibility(View.VISIBLE);

RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(Main.Instance.GLView.getWidth(),
    Main.Instance.GLView.getHeight() - AdSize.BANNER.getHeight());
params.topMargin = AdSize.BANNER.getHeight();

Main.开发者_如何学GoInstance.GLView.setLayoutParams(params);

Main.Instance.TopView.requestLayout();

This is what I get in the end:

http://i.stack.imgur.com/UuwKA.png

Does anyone have any idea what could be causing this?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜