OSDN Git Service

Make save button in video trimming consistent
authorDoris Liu <tianliu@google.com>
Tue, 16 Oct 2012 18:18:58 +0000 (11:18 -0700)
committerDoris Liu <tianliu@google.com>
Tue, 16 Oct 2012 18:53:31 +0000 (11:53 -0700)
Bug: 7353884

Updated save button icon and text
Save button in video trimming now acts like back button when no change
has been made.
Change-Id: Iec29315222d3f3ffac9b96a89cad2821d7f86c4f

res/layout/trim_menu.xml
res/values/strings.xml
src/com/android/gallery3d/app/TrimVideo.java

index d2af918..b619220 100644 (file)
         android:layout_marginLeft="8dp"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:text="@string/done"
+        android:text="@string/save"
+        android:textAllCaps="true"
+        android:textSize="14sp"
         android:gravity="left|center_vertical"
-        android:drawableLeft="@drawable/ic_menu_save_holo_light"
+        android:drawableLeft="@drawable/ic_menu_savephoto"
         android:drawablePadding="8dp" />
 </FrameLayout>
index 6f64538..c56af3f 100644 (file)
     <!-- Toast if the trimmed video is too short to trim. [CHAR LIMIT=80] -->
     <string name="trim_too_short">Can not trim : target video is too short</string>
 
-    <!-- Toast if the trimmed video is the same as the original one. [CHAR LIMIT=80] -->
-    <string name="trim_too_long">Did not trim : the same length as origin</string>
-
     <!-- Text to show with progress bar while stitching in Gallery -->
     <string name="pano_progress_text">Rendering panorama</string>
 
index 09a2abd..01fe462 100644 (file)
@@ -268,9 +268,8 @@ public class TrimVideo extends Activity implements
             return;
         }
         if (Math.abs(mVideoView.getDuration() - delta) < 100) {
-            Toast.makeText(getApplicationContext(),
-                getString(R.string.trim_too_long),
-                Toast.LENGTH_SHORT).show();
+            // If no change has been made, go back
+            onBackPressed();
             return;
         }
         // Use the default save directory if the source directory cannot be