capture an image in android with fixed size
I have an application that takes Photo with photo overlay and then resize
it, here is my code ,is it possible to set size to the camera to avoid the
resizing process after taking the picture, since after taking the picture
I have some delay..
View_Camera_Overlay
<ViewSwitcher xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/viewSwitcher"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context=".CameraCapture"
android:measureAllChildren="false" >
<include
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill"
layout="@layout/view_camera_overlay" />
<include
android:layout_width="wrap_content"
android:layout_height="wrap_content"
layout="@layout/view_show_book_detection" />
</ViewSwitcher>
Camera Overlay
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<SurfaceView
android:id="@+id/cameraView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<ImageView
android:id="@+id/cameraOverlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/book" />
<Button
android:id="@+id/buttonCapture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:text="@string/camera_capture" />
</FrameLayout>
Camera activity
http://pastebin.com/p8DfTKEu
would you please help me in this implementation
Thanks in advance
No comments:
Post a Comment