summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-08-24 14:50:37 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2012-09-11 10:36:05 -0700
commita1a2f784d285e7ee8e6e65d5fbee6f903655d888 (patch)
tree9c641cfe36746e0d5b3443e4dc04083f1a1c76c2 /res
parent9db3b49abc5d29a990c1b82b15b26d64d9279f8d (diff)
downloadandroid_packages_apps_Snap-a1a2f784d285e7ee8e6e65d5fbee6f903655d888.tar.gz
android_packages_apps_Snap-a1a2f784d285e7ee8e6e65d5fbee6f903655d888.tar.bz2
android_packages_apps_Snap-a1a2f784d285e7ee8e6e65d5fbee6f903655d888.zip
Add the UI elements for video trim activity.
1. Refactored the classes to support both the video play and trim. Now the common code for controller overlay is in CommonControllerOverlay, which is basically the same as the original MovieControllerOverlay without animation. Because in trimming, we don't want to hide all the controller. The specific animations are implemented in the sub-classes which are TrimControllerOverlay and MovieControllerOverlay. At the same time, TrimTimeBar extended TimeBar to support the extra trimming start scrubber and end scrubber. The interface between the timebar and the controllerOverlay are kept almost the same way, except adding the trimming info when necessary. With all these, the activity of TrimVideo now relied on the TrimTimeBar and TrimControllerOverlay. Similarily, the MovieActivity relied on the TimeBar and MovieControllerOverlay. 2. Hook the TrimVideo activity with the trim menu. Note that the icons are temporary for now, still need UX input on that. bug:7093055 Change-Id: Ib9bfbc090106744a569fce4c451ddffc0a2c699b
Diffstat (limited to 'res')
-rw-r--r--res/layout/trim_view.xml27
-rw-r--r--res/menu/trim.xml22
-rw-r--r--res/values/strings.xml5
3 files changed, 53 insertions, 1 deletions
diff --git a/res/layout/trim_view.xml b/res/layout/trim_view.xml
new file mode 100644
index 000000000..c95c719c1
--- /dev/null
+++ b/res/layout/trim_view.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/trim_view_root"
+ android:background="@android:color/black"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <VideoView android:id="@+id/surface_view"
+ android:visibility="visible"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_centerInParent="true" />
+</RelativeLayout> \ No newline at end of file
diff --git a/res/menu/trim.xml b/res/menu/trim.xml
new file mode 100644
index 000000000..937081f24
--- /dev/null
+++ b/res/menu/trim.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 Google Inc.
+
+ 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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/action_trim_video"
+ android:icon="@drawable/ic_menu_slideshow_holo_light"
+ android:title="@string/trim_action"
+ android:enabled="true"
+ android:showAsAction="ifRoom" />
+</menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0e00338d9..ed121d4ac 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -73,8 +73,11 @@
<!-- Eorror toast message that the image cannot be saved [CHAR LIMIT=40]-->
<string name="save_error">Couldn\'t save cropped image.</string>
- <!-- menu pick: crop the currently selected image -->
+ <!-- menu pick: crop the currently selected image [CHAR LIMIT=30]-->
<string name="crop_label">Crop picture</string>
+ <!-- menu pick: trim the currently selected video [CHAR LIMIT=30]-->
+ <string name="trim_label">Trim video</string>
+
<!-- Toast/alert that the face detection is being run -->
<!-- Title prompted for user to choose a photo item [CHAR LIMIT=20] -->