Android横竖横180竖180旋转

时间:2017-08-26 09:14:44
【文件属性】:

文件名称:Android横竖横180竖180旋转

文件大小:1.3MB

文件格式:ZIP

更新时间:2017-08-26 09:14:44

Android旋转

Android横竖屏切换,包含代码中横屏 180 旋转 ,竖屏180 旋转; //横屏正方向 if(getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {   setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE); } //横屏反方向 else if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE) {   setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } //纵屏正方向 else if(getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {   setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT); } //纵屏反方向 else if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT) {   setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, ActivityInfo.SCREEN_ORIENTATION_USER, ActivityInfo.SCREEN_ORIENTATION_BEHIND, ActivityInfo.SCREEN_ORIENTATION_SENSOR, ActivityInfo.SCREEN_ORIENTATION_NOSENSOR, ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE, ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT, ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE, ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT, ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR,


【文件预览】:
yxd_screenOrientation
----.project(857B)
----project.properties(563B)
----src()
--------com()
----AndroidManifest.xml(962B)
----res()
--------drawable-ldpi()
--------drawable-hdpi()
--------values-v11()
--------menu()
--------drawable-mdpi()
--------layout()
--------drawable-xxhdpi()
--------drawable-xhdpi()
--------values()
--------values-v14()
----.settings()
--------org.eclipse.jdt.core.prefs(177B)
----assets()
--------Redme.TXT(1KB)
----gen()
--------com()
----libs()
--------android-support-v4.jar(377KB)
----.classpath(364B)
----proguard-project.txt(781B)
----ic_launcher-web.png(50KB)
----bin()
--------resources.ap_(41KB)
--------Test.apk(190KB)
--------classes()
--------AndroidManifest.xml(962B)
--------dexedLibs()
--------jarlist.cache(119B)
--------res()
--------classes.dex(431KB)
--------yxd_screenOrientation.apk(191KB)

网友评论

  • 不能自动检测后翻转
  • 学习了,谢谢
  • 不错,正好需要
  • 很好,能够用来检测当前设备旋转方向的正确性