开发者

Android: Lock the Background image but rotate foreground views

I have a Landscape b开发者_如何学Goackground image in place. How do I lock it into position, but allow forground views to be rotated, e.g. a Dialog.

At the moment, either I lock the orientation so the dialog doesn't rotate, or I don't lock it and the background becomes tiny as I rotate the screen and it fills the narrow width of the screen.


I think your best bet would be to allow the rotation and just display a different background (the original background rotated 90 degrees)

You can catch the rotation in onConfigurationChanged, once you've added android:configChanges="orientation" to your activity in the manifest

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜