Android Open Source - AndroidCameraView Options






From Project

Back to project page AndroidCameraView.

License

The source code is released under:

MIT License

If you think the Android project AndroidCameraView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.tatuas.android.cameraview;
//  www . ja v a 2 s.com
import android.graphics.Bitmap.CompressFormat;
import android.graphics.Bitmap.Config;

public class Options {
    private int quality = 100;
    private PictureSize pictureSize = new PictureSize();
    private PictureType pictureType = PictureType.JPEG;
    private Config config = Config.RGB_565;
    private int calculateScale = 1;
    private boolean useCalculateScale = false;
    private boolean reStartPreviewAfterShutter = true;
    private boolean execAutoFocusWhenShutter = false;

    public void setPictureSize(PictureSize size) {
        this.pictureSize = size;
    }

    public int getPictureWidth() {
        return this.pictureSize.width;
    }

    public int getPictureHeight() {
        return this.pictureSize.height;
    }

    public int getCalculateScale() {
        return this.calculateScale;
    }

    public void setPictureType(PictureType type) {
        this.pictureType = type;
        this.useCalculateScale = false;
    }

    public CompressFormat getPictureType() {
        return pictureType.toFormat();
    }

    public void setPictureConfig(Config config) {
        this.config = config;
    }

    public Config getPictureConfig() {
        return this.config;
    }

    public PictureType getType() {
        return this.pictureType;
    }

    public void setQuality(int val) {
        this.quality = val;
    }

    public int getQuality() {
        return this.quality;
    }

    public void setCalculateScale(int scale) {
        this.calculateScale = scale;
        this.useCalculateScale = true;
    }

    public boolean isUseCalculateScale() {
        return this.useCalculateScale;
    }

    public void setRestartPreviewAfterShutter(boolean restart) {
        this.reStartPreviewAfterShutter = restart;
    }

    public boolean isRestartPreviewAfterShutter() {
        return this.reStartPreviewAfterShutter;
    }

    public void setExecAutoFocusWhenShutter(boolean shutter) {
        this.execAutoFocusWhenShutter = shutter;
    }

    public boolean isExecAutoFocusWhenShutter() {
        return this.execAutoFocusWhenShutter;
    }
}




Java Source Code List

com.tatuas.android.cameraview.AfterShutterListener.java
com.tatuas.android.cameraview.BeforeShutterListener.java
com.tatuas.android.cameraview.CameraFailedListener.java
com.tatuas.android.cameraview.CameraLayout.java
com.tatuas.android.cameraview.CameraType.java
com.tatuas.android.cameraview.CameraView.java
com.tatuas.android.cameraview.Options.java
com.tatuas.android.cameraview.PictureMaker.java
com.tatuas.android.cameraview.PictureSize.java
com.tatuas.android.cameraview.PictureType.java
com.tatuas.android.cameraview.ShutterFailedListener.java
com.tatuas.android.cameraview.Shutter.java
com.tatuas.android.cameraview.Thumbnail.java
com.tatuas.android.cameraview.Util.java
com.tatuas.android.cameraview.sample.CameraLayoutSampleActivity.java
com.tatuas.android.cameraview.sample.CameraViewSampleActivity.java