Как я могу извлечь часть камеры?

Я использую Камеру в Android, как это описано в этом руководстве, в моем приложении «Вставить рамку для фото» http://developer.android.com/guide/topics/media/camera.html У меня есть ImageView в FrameLayout для вставки рамки изображения, внутренняя часть которой прозрачна.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <FrameLayout
            android:id="@+id/camera_container"
            android:layout_width="fill_parent"
            android:layout_height="match_parent"
            android:gravity="top"
            android:orientation="vertical" >
        </FrameLayout>

        <ImageView
            android:id="@+id/grid"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/demo" />
    </RelativeLayout>

</LinearLayout>

Как я могу извлечь изображение кадра, где внутренняя часть находится с камеры?


person Anh Nguyen    schedule 07.11.2014    source источник