活动重新启动时,手机浏览模式改变 [英] the activity restarts when the phones View Mode is changed

查看:91
本文介绍了活动重新启动时,手机浏览模式改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序播放视频时,如果我改变了手机的模式下,视频不继续玩,但它从一开始就开始。所有我不解的是,当模式改变时重新创建活动,如何解决这个我不知道,请别人帮我解决这个问题。
 在此先感谢

In my application while playing a video if i change the phone's mode the video does not continue to play but it starts from the beginning. all i understand is the activity is recreated when the mode is changed,how do i fix this i have no idea please someone help me fix this. thanks in advance

推荐答案

您可以在AndroidManifest文件中添加此行到您的活动标签,这个您的活动不会得到重新启动。

You can add this line in your AndroidManifest file to your activity tag, by this your activity won't get re-started.

<activity android:name=".Activity_name"
          android:configChanges="orientation|keyboardHidden">

这篇关于活动重新启动时,手机浏览模式改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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