views:

243

answers:

1

i have a question in developing some android program...

i use surfaceview for camera preview. it works fine, but has one problem when i start other activity (by clicking something) and then back from that activity. after that, surfaceview is no longer visible. (but onclicklistener is working)

but when i occur surfacecreated/destoryed by visible/invisible surfaceview in single activity, it works very good.

plz give me any help.

+1  A: 

This is a 2.0 and 2.1-update1 issue. Was unable to reproduce on 2.2 and 1.5, 1.6. Canvas of the SurfaceView just displays black after returning from another activity. If you happen to find a workaround please note me.

Jitsu