From 4c792cc7b44be1ea0a2cfc2e7259828b81b0e4a4 Mon Sep 17 00:00:00 2001 From: John Hoford Date: Wed, 17 Apr 2013 20:40:25 -0700 Subject: fixed borders issues bug:8315216 Change-Id: I04d62984c70e7e514b8625e6a4b5ed9395137471 --- .../filtershow/filters/BaseFiltersManager.java | 39 +++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to 'src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java') diff --git a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java index 21bdf8dd9..ec9a4368c 100644 --- a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java +++ b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java @@ -15,7 +15,10 @@ */ package com.android.gallery3d.filtershow.filters; +import android.content.Context; import android.content.res.Resources; + +import com.android.gallery3d.R; import com.android.gallery3d.filtershow.presets.ImagePreset; import java.util.HashMap; @@ -109,12 +112,40 @@ public abstract class BaseFiltersManager { filters.add(ImageFilterGeometry.class); } - public void addBorders(Vector representations) { - // Override + public void addBorders(Context context, Vector representations) { + } - public void addLooks(Vector representations) { - // Override + public void addLooks(Context context, Vector representations) { + int[] drawid = { + R.drawable.filtershow_fx_0005_punch, + R.drawable.filtershow_fx_0000_vintage, + R.drawable.filtershow_fx_0004_bw_contrast, + R.drawable.filtershow_fx_0002_bleach, + R.drawable.filtershow_fx_0001_instant, + R.drawable.filtershow_fx_0007_washout, + R.drawable.filtershow_fx_0003_blue_crush, + R.drawable.filtershow_fx_0008_washout_color, + R.drawable.filtershow_fx_0006_x_process + }; + + int[] fxNameid = { + R.string.ffx_punch, + R.string.ffx_vintage, + R.string.ffx_bw_contrast, + R.string.ffx_bleach, + R.string.ffx_instant, + R.string.ffx_washout, + R.string.ffx_blue_crush, + R.string.ffx_washout_color, + R.string.ffx_x_process + }; + + for (int i = 0; i < drawid.length; i++) { + FilterFxRepresentation fx = new FilterFxRepresentation( + context.getString(fxNameid[i]), drawid[i], fxNameid[i]); + representations.add(fx); + } } public void addEffects(Vector representations) { -- cgit v1.2.3