开发者

Getting blank screen when switching between activities

I am working on an app , where I am switching between two activities. When control开发者_如何学Go 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


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?

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.

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! :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜