Why is my camera preview not respecting the layout?

I'm creating a SurfaceView for my camera preview and attempting to have it occupy a rectangle that's smaller than the entire screen, but it's ignoring my layout command.

I assume I'm doing something wrong, but can't find an example of someone setting the preview into a smaller container.

All advice (or pointers to examples) appreciated.

Answers


That's how it's done in the default Camera application: layout file and source code.

There's a container that performs a special layout procedure depending on a given aspect ratio. I think you can adapt this solution to your needs.


Need Your Help

What are the steps to get Wide Tiles working on WP7.8?

c# live-tile windows-phone-7.8

I'm trying to get Application (default tile) wide tiles working in the 7.8 emulator, so far Ive

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.