waleedAhmad1 / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

Toast causes color glitch on camera preview #488

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run camera preview on a SurfaceView
2. Display Toast with `Toast.makeText(this, "Test", Toast.LENGTH_SHORT).show();`

What is the expected output? What do you see instead?
The Toast indeed displays, but the red and blue channels on the SurfaceView get 
swapped while it is displayed.

What version of the product are you using? On what operating system?
Google Glass, XE16.1, KitKat-based GDK

Please provide any additional information below.

Original issue reported on code.google.com by maxime.b...@polytechnique.org on 24 Apr 2014 at 5:59

GoogleCodeExporter commented 9 years ago
I ran into a related issue (XE17.2), where setting the SurfaceView to be the 
activity's content view flipped the red and blue channels. Putting the view 
into a relative layout and then adding another view to that layout fixed my 
problem (for reasons I don't understand).

// old code
// cameraView = new SimpleCameraView(this);
// setContentView(cameraView);

// new code
cameraView = new SimpleCameraView(this);
RelativeLayout layout = new RelativeLayout(this);
layout.addView(cameraView);
layout.addView(new View(this));
setContentView(layout);

Original comment by mhen...@gmail.com on 31 May 2014 at 8:01

GoogleCodeExporter commented 9 years ago
Same for me. Even without toast, the red and blue are flipped. The OS is XE17.2.
The workaround proposed by #1 works for me. For some reason, I don't know why 
it doesn't work using it in a layout.

Original comment by jj.Sarra...@gmail.com on 2 Jun 2014 at 3:12

GoogleCodeExporter commented 9 years ago
Same here.  XE18.11.  Very basic camera client (from here: 
https://github.com/jaredsburrows/OpenQuartz, see camera app).  Does nothing 
except show camera.  Workaround also worked for me.

Original comment by kgalli...@gmail.com on 20 Jun 2014 at 6:18

GoogleCodeExporter commented 9 years ago

Original comment by ala...@google.com on 24 Jul 2014 at 8:52