的Android 4.x的方位的PhoneGap [英] Android 4.x orientation with phonegap
本文介绍了的Android 4.x的方位的PhoneGap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Web应用程序与PhoneGap的1.3和1.0 jquerymobile上所有的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
下面是我的code:
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.
这篇关于的Android 4.x的方位的PhoneGap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文