获取黑屏活动之间的切换时 [英] Getting blank screen when switching between activities

查看:99
本文介绍了获取黑屏活动之间的切换时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个应用程序,我在哪里两项活动之间的切换。当控制内第二次活动在onStart,有屏幕绘图和处理逻辑是这样handled.Because,两个活动之间进行切换时事,还有就是出现黑屏。

I am working on an app , where I am switching between two activities. When control is inside onStart of second activity , there is screen drawing and processing logic being handled.Because of this , when switching between the two activities happens, there is a blank screen that comes up.

与此同时,我还需要渲染实况视频在我的活动背景/应用

Along with this , i also need to render a live video feed in background of my activities/app

有什么能对付它的最好方法?

What could be the best way to deal with this?

TIA

推荐答案

如果你得到一个空白的屏幕可能是因为你的活动是创下了新的内容查看,但一直没有得到妥善处理。是否曾经完全载入?如果这只是它是黑色的开头,然后渲染。试试在你的onCreate切换的结束设定内容查看。这将使它留在第一项活动,避免起至一切都加载切换视图。

If you're getting a blank screen it could be because your activity is setting a new contentview but it hasn't been processed properly. Does it ever load completely? If it's just that it's black at the beginning and then renders. Try setting the contentview at the end of your switching in onCreate. This will make it remain on the first activity and avoiding switching views on till everything is loaded.

至于你的第二个问题。从相机的实时视频输入?

With regards your second question. Is the live video feed from the Camera?

如果是,则设置在后台相机视图,做一个透明的LinearLayout(或任何你的布局)结束,然后把你的各种意见。

If it is, set the camera view in the background, make a transparent LinearLayout (or whatever your layout is) over it and then put your various views there.

您的问题没有足够的具体信息,以获得准确的想法,以你在说什么,如果我的回答没有解决您的问题,请与制定和一些code反应! : - )

Your question doesn't have enough specific information to get an accurate idea as to what you're talking about, if my answer doesn't address your problem please respond with elaboration and some code! :-)

这篇关于获取黑屏活动之间的切换时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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