build Middle Camera Area - Android Camera

Android examples for Camera:Camera Feature

Description

build Middle Camera Area

Demo Code


//package com.java2s;

import java.util.Collections;

import java.util.List;

import android.graphics.Rect;
import android.hardware.Camera;

public class Main {
    private static List<Camera.Area> buildMiddleArea(int areaPer1000) {
        return Collections.singletonList(new Camera.Area(new Rect(
                -areaPer1000, -areaPer1000, areaPer1000, areaPer1000), 1));
    }//from www.  j a  v a2s  . c o m
}

Related Tutorials