diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-04-26 10:10:49 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2012-04-30 16:16:26 +0800 |
commit | ad08811a71e246d45ecdf97402f08cf7bd68e83b (patch) | |
tree | 5f4eb9ad54e4c3d1aef67c4047624977d1f287e2 /src/com/android/gallery3d/app/AppBridge.java | |
parent | ac9c2f6f230660a657f9d3b64c7a3bbf8b3bd598 (diff) | |
download | android_packages_apps_Snap-ad08811a71e246d45ecdf97402f08cf7bd68e83b.tar.gz android_packages_apps_Snap-ad08811a71e246d45ecdf97402f08cf7bd68e83b.tar.bz2 android_packages_apps_Snap-ad08811a71e246d45ecdf97402f08cf7bd68e83b.zip |
Support drawing in different orientation in Gallery.
Bug 6312994: Swipe UX: do not directly show the camera roll when camera starts
Bug 6313191: Swipe UX: Change swipe direction after the user rotated the device
Bug 6313192: Swiping UX: make Gallery display in rotated mode
Bug 6399447: Filmstrip: in Gallery, pressing Back from filmstrip doesn't perform the right animation
Bug 6399974: Filmstrip: when swiping from full-screen photo to filmstrip mode, camera view and the photo-roll don't align correctly
Bug 6400014: Swiping UX: in Camera portrait mode, tapping on the Thumbnail doesn't align camera view and the photo-roll correctly
Bug 6401075: Able to scroll through the gallery pics while capturing video.
Bug 6405087: Filmstrip does not change with orientation
Change-Id: I8c479d87800c63b7a95c199c0c1c3bc512d66d42
Diffstat (limited to 'src/com/android/gallery3d/app/AppBridge.java')
-rw-r--r-- | src/com/android/gallery3d/app/AppBridge.java | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/AppBridge.java b/src/com/android/gallery3d/app/AppBridge.java new file mode 100644 index 000000000..d5376581e --- /dev/null +++ b/src/com/android/gallery3d/app/AppBridge.java @@ -0,0 +1,62 @@ +/* + * 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. + */ +package com.android.gallery3d.app; + +import android.graphics.Rect; +import android.os.Parcel; +import android.os.Parcelable; + +import com.android.gallery3d.ui.ScreenNail; + +// This is the bridge to connect a PhotoPage to the external environment. +public abstract class AppBridge implements Parcelable { + public int describeContents() { + return 0; + } + + public void writeToParcel(Parcel dest, int flags) { + } + + ////////////////////////////////////////////////////////////////////////// + // These are requests sent from PhotoPage to the app + ////////////////////////////////////////////////////////////////////////// + + public abstract ScreenNail attachScreenNail(); + public abstract void detachScreenNail(); + + // Return true if the tap is consumed. + public abstract boolean onSingleTapUp(int x, int y); + + // This is used to notify that the screen nail will be drawn in full screen + // or not in next draw() call. + public abstract void onFullScreenChanged(boolean full); + + ////////////////////////////////////////////////////////////////////////// + // These are requests send from app to PhotoPage + ////////////////////////////////////////////////////////////////////////// + + public interface Server { + // Set the camera frame relative to GLRootView. + public void setCameraNaturalFrame(Rect frame); + // Switch to the previous or next picture using the capture animation. + // The offset is -1 to switch to the previous picture, 1 to switch to + // the next picture. + public boolean switchWithCaptureAnimation(int offset); + } + + // If server is null, the services are not available. + public abstract void setServer(Server server); +} |