Android 只能将 View 旋转 90 度

发布于 2024-10-22 07:04:19 字数 273 浏览 1 评论 0原文

我有两种看法。我想将一个视图旋转 90 度,可以吗?我的视图是 Admob 视图。我的 admobview 现在显示在左侧屏幕上。图片:

在此处输入图像描述

我想将该视图旋转 90 度,到达视图的底部。是否可以? 我有一个代码,但不起作用,当 admob 刷新时,视图状态会更改为原始状态。:(

编辑:我处于纵向模式,我不想将其更改为风景,谢谢。

I have twoo views. I want to rotate one view by 90 degrees, is it possible? My view is an Admob View. My admobview now shows on the screens left. Picture:

enter image description here

I d like to rotate that view by 90 degrees, to my view's bottom. Is it possible?
I have a code, but is not working, and when the admob is refreshing than the views state change to the original state.:(

Edit: I am in portrait mode and i dont want to change it to landscape, thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我做我的改变 2024-10-29 07:04:19

您可能不想更改为横向,但这并不能改变它是正确答案的事实。 ;)

即使您的应用程序要求全屏模式,蜂窝设备也会使用当前方向来确定屏幕底部系统栏的方向。这也用于定向最近任务切换器的屏幕截图,并且将来可能会继续用于更多类似的事情。

您可以编写一个简单的自定义父视图,它将旋转测量、布局和绘图来处理您当前的问题,但正确的答案仍然是在横向模式下运行您的应用程序。如果您继续沿着这条路走下去,您的应用程序将会以多种方式被破坏,您将无法破解这些方式。

You may not want to change to landscape, but that doesn't change the fact that it's the right answer. ;)

Honeycomb devices use the current orientation to orient the system bar at the bottom of the screen even when your app asks for full-screen mode. This is also used to orient screenshots for the recent task switcher, and it will probably continue to be used for more things like this in the future.

You can write a trivial custom parent view that will rotate the measurement, layout, and drawing to handle your current problem, but the right answer is still to run your app in landscape mode. Your app will be broken in a number of ways that you will not be able to hack around if you continue down this path.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文