From eb4a9359eaf8a717d6bda5df3d1831cf8f547423 Mon Sep 17 00:00:00 2001 From: Ruben Brunk Date: Thu, 18 Oct 2012 12:46:28 -0700 Subject: [PATCH] Fixed initial aspect button text. Bug: 7374910 Change-Id: I2c86b7c5b242f930692e2e6feda8a85533c509d8 --- res/layout/filtershow_activity.xml | 2 +- res/values/filtershow_strings.xml | 14 +++++++------- src/com/android/gallery3d/filtershow/PanelController.java | 9 ++++++++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml index d098dc89d..78fe2d8b6 100644 --- a/res/layout/filtershow_activity.xml +++ b/res/layout/filtershow_activity.xml @@ -200,7 +200,7 @@ android:layout_weight="0" android:visibility="gone" android:src="@drawable/filtershow_button_geometry_straighten" - android:text="@string/aspectNone_effect" /> + android:text="@string/aspect" /> Apply Reset - + Aspect - + 1:1 - + 4:6 - + 5:7 - + 16:9 - + None - + Original diff --git a/src/com/android/gallery3d/filtershow/PanelController.java b/src/com/android/gallery3d/filtershow/PanelController.java index 2e8dd23ce..b0f38892b 100644 --- a/src/com/android/gallery3d/filtershow/PanelController.java +++ b/src/com/android/gallery3d/filtershow/PanelController.java @@ -186,14 +186,19 @@ public class PanelController implements OnClickListener { ((ImageButtonTitle) mAspectButton).setText(mContext .getString(R.string.aspect) + " " - + mContext.getString(R.string.aspect1to1_effect)); + + mContext.getString(R.string.aspectNone_effect)); ((ImageCrop) mCurrentImage).applyClear(); + mCurrentAspectButton = ASPECT_NONE; break; } mCurrentAspectButton = (mCurrentAspectButton + 1) % NUMBER_OF_ASPECT_BUTTONS; } } + void setCurrentAspectButton(int n){ + mCurrentAspectButton = n; + } + public void showAspectButtons() { if (mAspectButton != null) mAspectButton.setVisibility(View.VISIBLE); @@ -507,6 +512,8 @@ public class PanelController implements OnClickListener { String ename = mCurrentImage.getContext().getString(R.string.crop); mUtilityPanel.setEffectName(ename); mUtilityPanel.setShowParameter(false); + mUtilityPanel.setCurrentAspectButton(-1); + mUtilityPanel.nextAspectButton(); mUtilityPanel.showAspectButtons(); break; } -- 2.11.0