diff options
author | nicolasroard <nicolasroard@google.com> | 2012-12-06 17:55:34 -0800 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2012-12-06 18:33:43 -0800 |
commit | 46c6bbbf57d6bf271237bcbb7192dd3ee9a79368 (patch) | |
tree | 5460240c00a56701eb85210b13322d197e5d5ef6 | |
parent | a3fb5bacfa6d16766a8d7718eb7817bc7f2ba5ad (diff) | |
download | android_packages_apps_Snap-46c6bbbf57d6bf271237bcbb7192dd3ee9a79368.tar.gz android_packages_apps_Snap-46c6bbbf57d6bf271237bcbb7192dd3ee9a79368.tar.bz2 android_packages_apps_Snap-46c6bbbf57d6bf271237bcbb7192dd3ee9a79368.zip |
Refactor filters to simplify their creation/addition
Bug:7688780
Change-Id: I9e1bb860dc9150bed4a255118654f2ca7f1ec3f0
-rw-r--r-- | res/layout/filtershow_activity.xml | 71 | ||||
-rw-r--r-- | res/values/filtershow_ids.xml | 33 |
2 files changed, 33 insertions, 71 deletions
diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml index 854673628..c26d858a4 100644 --- a/res/layout/filtershow_activity.xml +++ b/res/layout/filtershow_activity.xml @@ -312,77 +312,6 @@ android:layout_height="wrap_content" android:layout_marginLeft="@dimen/thumbnail_margin" android:orientation="horizontal" > - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/tinyplanetButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/tinyplanet" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/wbalanceButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/wbalance" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/exposureButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/exposure" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/vignetteButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_vignette" - android:text="@string/vignette" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/contrastButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/contrast" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/shadowRecoveryButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/shadow_recovery" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/vibranceButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/vibrance" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/sharpenButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_sharpen" - android:text="@string/sharpness" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/curvesButtonRGB" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_curve" - android:text="@string/curvesRGB" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/hueButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/hue" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/saturationButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/saturation" /> - - <com.android.gallery3d.filtershow.ui.ImageButtonTitle - android:id="@+id/bwfilterButton" - style="@style/FilterShowBottomButton" - android:src="@drawable/filtershow_button_colors_contrast" - android:text="@string/bwfilter" /> </LinearLayout> </HorizontalScrollView> diff --git a/res/values/filtershow_ids.xml b/res/values/filtershow_ids.xml new file mode 100644 index 000000000..502d2f8cb --- /dev/null +++ b/res/values/filtershow_ids.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +* Copyright (C) 2012 The Android Open Source Project +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +--> +<resources> + <!-- Buttons ids for the filters --> + <item type="id" name="tinyplanetButton" /> + <item type="id" name="vignetteButton" /> + <item type="id" name="vibranceButton" /> + <item type="id" name="contrastButton" /> + <item type="id" name="saturationButton" /> + <item type="id" name="bwfilterButton" /> + <item type="id" name="wbalanceButton" /> + <item type="id" name="hueButton" /> + <item type="id" name="exposureButton" /> + <item type="id" name="shadowRecoveryButton" /> + <item type="id" name="sharpenButton" /> + <item type="id" name="curvesButtonRGB" /> +</resources> |