Hi,

I'm trying to do an Augmented Reality app in which some objects are
shown on top of a SurfaceView. I've got a FrameLayout with two
children: one CBCameraView which extends SurfaceView and one
FrameLayout which contains all my AR objects (ARViews). I compute and
update the positions on the screen for all my ARViews in
onSensorChanged(). The new position is set calling view.layout(x,y,x
+view.getWidth(),y+view.getHeight()); for every ARViews, in which x
and y are the new position on screen computed according to the sensors
data. My problem is that it works (i.e. the ARViews are shown) if I
don't add the CBCameraView to my main FrameLayout, but it doesn't
(ARViews not shown) when I add it. As a test I tried to update the
position of my ARViews using view.setPadding(x,y,0,0);, and this works
with and without the CBCameraView in the main layout (that was just a
test, I don't want to use the padding).

I'm lost, anybody can help positionning my ARViews at runtime?

The code can be seen at
http://stackoverflow.com/questions/6736668/strange-behavior-of-a-framelayout-containing-a-surfaceview.
I also ask the question here because I've had no answers.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to