diff options
author | junjiez <junjiez@codeaurora.org> | 2017-09-22 13:44:33 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-03-06 19:04:50 -0800 |
commit | cfdc874eb6e23e101bd32d10183e419894e405f2 (patch) | |
tree | b191f1925aad82cff3b954ee778aabf974d84403 /src/com/android/camera/ui | |
parent | 56bbfb648af37902139f26eb7647fd294cd01862 (diff) | |
download | android_packages_apps_Snap-cfdc874eb6e23e101bd32d10183e419894e405f2.tar.gz android_packages_apps_Snap-cfdc874eb6e23e101bd32d10183e419894e405f2.tar.bz2 android_packages_apps_Snap-cfdc874eb6e23e101bd32d10183e419894e405f2.zip |
SnapdragonCamera:DeepPortrait
Add deepportrait feature in SnapdragonCamera.
Change-Id: I5fd223cacfb2526efffbf3f13f7c33cafd8ac99d
Diffstat (limited to 'src/com/android/camera/ui')
-rwxr-xr-x | src/com/android/camera/ui/OneUICameraControls.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/camera/ui/OneUICameraControls.java b/src/com/android/camera/ui/OneUICameraControls.java index 8d156e3fe..504cb2679 100755 --- a/src/com/android/camera/ui/OneUICameraControls.java +++ b/src/com/android/camera/ui/OneUICameraControls.java @@ -58,6 +58,7 @@ public class OneUICameraControls extends RotatableLayout { private View mPreview; private View mSceneModeSwitcher; private View mFilterModeSwitcher; + private View mDeepportraitSwitcher; private View mMakeupSeekBar; private View mMakeupSeekBarLowText; private View mMakeupSeekBarHighText; @@ -152,6 +153,7 @@ public class OneUICameraControls extends RotatableLayout { mMakeupSeekBarLayout = findViewById(R.id.makeup_seekbar_layout); ((SeekBar)mMakeupSeekBar).setMax(100); mFlashButton = findViewById(R.id.flash_button); + mDeepportraitSwitcher = findViewById(R.id.deepportrait_switcher); mMute = findViewById(R.id.mute_button); mPreview = findViewById(R.id.preview_thumb); mSceneModeSwitcher = findViewById(R.id.scene_mode_switcher); @@ -229,8 +231,8 @@ public class OneUICameraControls extends RotatableLayout { mViews = new View[]{ mSceneModeSwitcher, mFilterModeSwitcher, mFrontBackSwitcher, - mTsMakeupSwitcher, mFlashButton, mShutter, mPreview, mVideoShutter, - mPauseButton, mCancelButton + mTsMakeupSwitcher,mDeepportraitSwitcher, mFlashButton, mShutter, + mPreview, mVideoShutter, mPauseButton, mCancelButton }; mBottomLargeSize = getResources().getDimensionPixelSize( R.dimen.one_ui_bottom_large); @@ -309,7 +311,12 @@ public class OneUICameraControls extends RotatableLayout { } else { v.setY(mHeight - mBottom + (mBottom - h) / 2); } - float bW = mWidth / 5f; + float bW; + if (top) { + bW = mWidth / 6f; + } else { + bW = mWidth / 5f; + } v.setX(bW * idx + (bW - w) / 2); } @@ -341,6 +348,7 @@ public class OneUICameraControls extends RotatableLayout { setLocation(mFrontBackSwitcher, true, 2); setLocation(mTsMakeupSwitcher, true, 3); setLocation(mFlashButton, true, 4); + setLocation(mDeepportraitSwitcher,true,5); if (mIntentMode == CaptureModule.INTENT_MODE_CAPTURE) { setLocation(mShutter, false, 2); setLocation(mCancelButton, false, 0.85f); |