I have used surfaceview (Android 2.2 and above) in that if i make following code in AndroidManifest.xml the result would be fine
<activity
android:name="com.custom.camera.CustomCamera"
android:screenOrientation="landscape" >
</activity>
but if i use below code the camera view is not displaying
<activity
android:name="com.custom.camera.CustomCamera"
android:screenOrientation="portrait" >
</activity>
The picture with landscape mode which working fine is
same picture if i use in portrait mode will become
can anybody suggest me why this is happening
the xml file is
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:id="@+id/mPreview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<FrameLayout
android:id="@+id/overlay_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:visibility="visible" >
<Button
android:id="@+id/mTakePicture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Take Picture" />
<ImageView
android:id="@+id/mFrontView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
</FrameLayout>
LOGCAT ISSUE
if it is in portrait mode i am getting error like below
12-16 15:43:09.297: E/Camera(7104): Error 1
12-16 15:43:15.297: E/Camera(7104): Error 1
12-16 15:43:21.307: E/Camera(7104): Error 1
12-16 15:43:27.337: E/Camera(7104): Error 1
in landscape it's working fine