当前位置:编程学习 > wap >>

jquery mobile +html5+phoneGap 横竖屏问题

我用jquery mobile +html5+phoneGap 开发了一个手机端应用,在android手机端不能横屏,一横屏就死机,有没有大仙做过类似的手机端 ,给出出你们的想法和见解,不甚感激! PhoneGap jQuery Mobile 手机 HTML5+ Android --------------------编程问答-------------------- 我这里试了一下jquery mobile +html5+phoneGap的项目,没有出现死机现象。你看看是任何一个地方横屏都会死机,还是某个特殊的模块 --------------------编程问答-------------------- 是转屏的时候就死机了,由竖屏转横屏 程序直接就退出来了。。。 --------------------编程问答-------------------- 模拟器上试试,看看logcat有什么异常 --------------------编程问答-------------------- 在你的html代码里是否有:
<meta name="viewport" content="width=device-width, initial-scale=1.0">。
在你的AndroidManifest.xml文件里是否有:
<supports-screens
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true"
        android:resizeable="true"
        android:anyDensity="true"
        />

或android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"。 --------------------编程问答-------------------- <meta name="viewport" content="width=device-width, initial-scale=1.0">。
这个是没有的
AndroidManifest.xml文件
有哪些配置信息 --------------------编程问答-------------------- 修改AndroidManifest.xml,给activity增加配置属性
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
例如:
<activity
            android:name="com.example.news.MainActivity"
            android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity> --------------------编程问答-------------------- 帖一下log ,我也用phoneGap做过不少应用了,没有发现转屏就死机的 --------------------编程问答-------------------- 4楼5楼的方法可解 ,妈的这个问题困扰老子好长时间啊,手机一锁屏程序就被退出了,找了好久,后面就单独用phonegap打包helloword 发现横竖屏切换要卡出来 现在总算解决了
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,