Camera Preview With Action Bar

view story

http://stackoverflow.com – I'm trying to implement an activity with action bar support that shows up a camera preview surface in portrait mode. I'm calculating best preview size (from zxing code), but that code is not considering action bar dimensions (i.e. height), returning stretched image preview. Anyone encountered similar problem before? Any tutorial out there, about opening camera preview considering action bar height? (HowTos)