OSDN Git Service

Fixed initial aspect button text.
authorRuben Brunk <rubenbrunk@google.com>
Thu, 18 Oct 2012 19:46:28 +0000 (12:46 -0700)
committerRuben Brunk <rubenbrunk@google.com>
Thu, 18 Oct 2012 19:46:28 +0000 (12:46 -0700)
Bug: 7374910
Change-Id: I2c86b7c5b242f930692e2e6feda8a85533c509d8

res/layout/filtershow_activity.xml
res/values/filtershow_strings.xml
src/com/android/gallery3d/filtershow/PanelController.java

index d098dc8..78fe2d8 100644 (file)
                     android:layout_weight="0"
                     android:visibility="gone"
                     android:src="@drawable/filtershow_button_geometry_straighten"
-                    android:text="@string/aspectNone_effect" />
+                    android:text="@string/aspect" />
 
                 <ImageButton
                     android:id="@+id/pickCurvesChannel"
index 142a3a0..d4d02f5 100644 (file)
     <string name="apply_effect">Apply</string>
     <!--  Label for the reset effect button [CHAR LIMIT=15] -->
     <string name="reset_effect">Reset</string>
-    <!--  Label for the aspect 1:1 effect button [CHAR LIMIT=15] -->
+    <!--  Label for aspect [CHAR LIMIT=15] -->
     <string name="aspect">Aspect</string>
-    <!--  Label for the aspect 1:1 effect button [CHAR LIMIT=15] -->
+    <!--  Label for the aspect 1:1 effect [CHAR LIMIT=15] -->
     <string name="aspect1to1_effect">1:1</string>
-    <!--  Label for the aspect 4:7 effect button [CHAR LIMIT=15] -->
+    <!--  Label for the aspect 4:7 effect [CHAR LIMIT=15] -->
     <string name="aspect4to6_effect">4:6</string>
-    <!--  Label for the aspect 1:1 effect button [CHAR LIMIT=15] -->
+    <!--  Label for the aspect 1:1 effect [CHAR LIMIT=15] -->
     <string name="aspect5to7_effect">5:7</string>
-    <!--  Label for the aspect 1:1 effect button [CHAR LIMIT=15] -->
+    <!--  Label for the aspect 1:1 effect [CHAR LIMIT=15] -->
     <string name="aspect9to16_effect">16:9</string>
-    <!--  Label for the aspect None effect button [CHAR LIMIT=15] -->
+    <!--  Label for the aspect None effect [CHAR LIMIT=15] -->
     <string name="aspectNone_effect">None</string>
-    <!--  Label for the aspect None effect button [CHAR LIMIT=15] -->
+    <!--  Label for the aspect None effect [CHAR LIMIT=15] -->
     <string name="aspectOriginal_effect">Original</string>
 
     <!--  Filters buttons -->
index 2e8dd23..b0f3889 100644 (file)
@@ -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;
             }