找回密码
 立即注册
竖排横排the屏幕 | android开发 2022-10-29 52 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
Android手机如何动态手机屏幕方向的,大家傍边有可能手机也会有这种功能,当大家手机方向改动时,屏幕也会随着改动,在这Android傍边是很容易实现的.本节的Demo主要是界面有一个按钮,当点击时,如果屏幕方向是横排(PORTRAIT)刚将屏幕方向更改为竖排(LANDSCAPE),反之仍然!大家这里主要是使用了getRequestedOrientation(),和setRequestedorientation()两个方法.可是要利用这两个方法必须先在AndroidManiefst.xml设置一下屏幕方属性,否则程序将不能正常的工作.
界面的横排和竖排.doc

(How does Android mobile phone dynamically change the direction of mobile phone screen? It is possible that mobile phones will also have this function. When the direction of mobile phones changes, the screen will also change. It is easy to achieve this in Android mobile phones The Demo in this section mainly refers to a button on the interface. When clicked, if the screen direction is PORTRAIT, the screen direction has just been changed to LANDSCAPE, otherwise, it is still! We mainly use getRequestedOrientation () and setRequestedorientation (). However, to use these two methods, you must first set the screen property in AndroidManiefst.xml, otherwise the program will not work properly
Horizontal and Vertical Layout of the Interface.doc)

[下载]17460175573.rar




上一篇:Android中TextView 添加超链接
下一篇:Android屏幕的横竖更改