You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
There is a place in the book (ch.11, page 390, middle of page) where it says and I quote:
"A SurfaceView can be used in exactly the same way as any View-derived class. You can apply animations and place them in your layouts as you would any other view."
But I'm not having any luck doing this with my SurfaceView.
If I use the setContentView(camPreview);, my camera preview appears on the screen, but not in my layout.
If I use the camSurface = (SurfaceView) findViewById(R.id.camsurface);, my layout appears, but my camera preview does not show up in the layout, I just get a black area where it shoud be. Can anyone help please?!