Android examples for Camera:Camera Attribute
set Effect for Camera Parameters
//package com.java2s; import java.util.List; import android.hardware.Camera.Parameters; public class Main { public static void setEffect(Parameters params, String value) { List<String> supported = params.getSupportedColorEffects(); String supportedValue = getSupportedValue(supported, value); if (supportedValue == null) { return; }//w w w .j av a2 s. c o m params.setColorEffect(supportedValue); } private static String getSupportedValue(List<String> supported, String value) { return (supported != null) && supported.contains(value) ? value : null; } }