diff options
author | Byunghun Jeon <bjeon@codeaurora.org> | 2014-06-16 17:42:26 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-11-17 17:49:35 -0800 |
commit | 41d18fed018678492323150c661f2b9f6c8931a8 (patch) | |
tree | 5154564878f6b61b1edc68ee8241cf0166ca210e /src/com/android/camera/CameraActivity.java | |
parent | 0231aab003276d2142fe745e50d6eb44e3f11c9c (diff) | |
download | android_packages_apps_Snap-41d18fed018678492323150c661f2b9f6c8931a8.tar.gz android_packages_apps_Snap-41d18fed018678492323150c661f2b9f6c8931a8.tar.bz2 android_packages_apps_Snap-41d18fed018678492323150c661f2b9f6c8931a8.zip |
SnapdragonCamera: Modify SnapdragonCamera UI
Modified SnapdragonCamera setting menus with new icons
Change-Id: I726296dfb100ac81ad6f1cd84420ae27c0ae1201
Diffstat (limited to 'src/com/android/camera/CameraActivity.java')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index c40dacc0a..8091353ff 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -16,6 +16,8 @@ package com.android.camera; +import android.view.Display; +import android.graphics.Point; import android.animation.Animator; import android.annotation.TargetApi; import android.app.ActionBar; @@ -143,6 +145,10 @@ public class CameraActivity extends Activity private static final int SUPPORT_SHOW_ON_MAP = 1 << 9; private static final int SUPPORT_ALL = 0xffffffff; + // Pie Setting Menu enabled + private static boolean PIE_MENU_ENABLED = false; + private boolean mDeveloperMenuEnabled = false; + /** This data adapter is used by FilmStripView. */ private LocalDataAdapter mDataAdapter; /** This data adapter represents the real local camera data. */ @@ -193,6 +199,8 @@ public class CameraActivity extends Activity private Intent mVideoShareIntent; private Intent mImageShareIntent; + public static int SETTING_LIST_WIDTH_1 = 250; + public static int SETTING_LIST_WIDTH_2 = 250; private class MyOrientationEventListener extends OrientationEventListener { @@ -303,6 +311,18 @@ public class CameraActivity extends Activity return sFirstStartAfterScreenOn; } + public static boolean isPieMenuEnabled() { + return PIE_MENU_ENABLED; + } + + public boolean isDeveloperMenuEnabled() { + return mDeveloperMenuEnabled; + } + + public void enableDeveloperMenu() { + mDeveloperMenuEnabled = true; + } + public static void resetFirstStartAfterScreenOn() { sFirstStartAfterScreenOn = false; } @@ -1182,6 +1202,21 @@ public class CameraActivity extends Activity getContentResolver().registerContentObserver( MediaStore.Video.Media.EXTERNAL_CONTENT_URI, true, mLocalVideosObserver); + + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); + mDeveloperMenuEnabled = prefs.getBoolean(CameraSettings.KEY_DEVELOPER_MENU, false); + + Display display = getWindowManager().getDefaultDisplay(); + Point size = new Point(); + display.getSize(size); + int width = size.x; + int height = size.y; + + int lower = Math.min(width, height); + + int offset = lower * 10 / 100; + SETTING_LIST_WIDTH_1 = lower / 2 + offset; + SETTING_LIST_WIDTH_2 = lower / 2 - offset; } private void setRotationAnimation() { @@ -1201,7 +1236,12 @@ public class CameraActivity extends Activity @Override public boolean dispatchTouchEvent(MotionEvent ev) { - boolean result = super.dispatchTouchEvent(ev); + boolean result = false; + if (mFilmStripView.checkSendToModeView(ev)) { + result = mFilmStripView.sendToModeView(ev); + } + if (result == false) + result = super.dispatchTouchEvent(ev); if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { // Real deletion is postponed until the next user interaction after // the gesture that triggers deletion. Until real deletion is performed, @@ -1354,6 +1394,10 @@ public class CameraActivity extends Activity } } + public void setPreviewGestures(PreviewGestures previewGestures) { + mFilmStripView.setPreviewGestures(previewGestures); + } + public boolean isAutoRotateScreen() { return mAutoRotateScreen; } |