From: Ruben Brunk Date: Thu, 18 Oct 2012 19:46:28 +0000 (-0700) Subject: Fixed initial aspect button text. X-Git-Tag: android-x86-6.0-r3~68^2~28^2~213^2~19^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2~428^2~2^2~766^2~157 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=eb4a9359eaf8a717d6bda5df3d1831cf8f547423;p=android-x86%2Fpackages-apps-Camera2.git Fixed initial aspect button text. Bug: 7374910 Change-Id: I2c86b7c5b242f930692e2e6feda8a85533c509d8 --- 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; }