带有 phonegap 的 Android 4.x 方向 [英] Android 4.x orientation with phonegap

查看:21
本文介绍了带有 phonegap 的 Android 4.x 方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有 phonegap 1.3 和 jquerymobile 1.0 的网络应用程序,它适用于所有 android 版本,但 4.0事实上,如果我改变方向,应用程序会强制关闭,没有错误,也没有(据我所知)logcat 错误.如果我在纵向工作中打开我的应用程序,如果我在横向工作中打开但如果我尝试切换关闭

I've a web app with phonegap 1.3 and jquerymobile 1.0 that works well on all android version but 4.0 In fact if I change the orientation the app force close with no errors and no (as I can understand) logcat errors. If I open my app in portrait works, If I open in landscape works but if I try to switch closes

这是我的代码:

import android.os.Bundle;
import com.phonegap.DroidGap;
public class MYActivity extends DroidGap {
         @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }   
}

我当然有

        android:configChanges="keyboardHidden|orientation" 
        android:screenOrientation="sensor"

在清单中!

感谢帮助

推荐答案

尝试添加:

android:configChanges="orientation|screenSize|keyboardHidden" 

作为您的配置更改参数,看看它是否能解决您的问题.

as your config change parameter to see if it fixes your issue.

这篇关于带有 phonegap 的 Android 4.x 方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆