当前位置: 首页>>代码示例>>Java>>正文


Java CameraUtil.roundOrientation方法代码示例

本文整理汇总了Java中com.android.camera.util.CameraUtil.roundOrientation方法的典型用法代码示例。如果您正苦于以下问题:Java CameraUtil.roundOrientation方法的具体用法?Java CameraUtil.roundOrientation怎么用?Java CameraUtil.roundOrientation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.camera.util.CameraUtil的用法示例。


在下文中一共展示了CameraUtil.roundOrientation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onOrientationChanged

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onOrientationChanged(int orientation) {
    // We keep the last known orientation. So if the user first orient
    // the camera then point the camera to floor or sky, we still have
    // the correct orientation.
    if (orientation == OrientationEventListener.ORIENTATION_UNKNOWN) {
        return;
    }
    int newOrientation = CameraUtil.roundOrientation(orientation, mOrientation);

    if (mOrientation != newOrientation) {
        mOrientation = newOrientation;
    }
    mUI.onOrientationChanged(orientation);

}
 
开发者ID:jameliu,项目名称:Camera2,代码行数:17,代码来源:VideoModule.java

示例2: onOrientationChanged

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onOrientationChanged(int orientation) {
    // We keep the last known orientation. So if the user first orient
    // the camera then point the camera to floor or sky, we still have
    // the correct orientation.
    if (orientation == OrientationEventListener.ORIENTATION_UNKNOWN) return;
    int newOrientation = CameraUtil.roundOrientation(orientation, mOrientation);

    if (mOrientation != newOrientation) {
        mOrientation = newOrientation;
    }

    // Show the toast after getting the first orientation changed.
    if (mHandler.hasMessages(SHOW_TAP_TO_SNAPSHOT_TOAST)) {
        mHandler.removeMessages(SHOW_TAP_TO_SNAPSHOT_TOAST);
        showTapToSnapshotToast();
    }
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:19,代码来源:VideoModule.java

示例3: onOrientationChanged

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onOrientationChanged(int orientation) {
    // We keep the last known orientation. So if the user first orient
    // the camera then point the camera to floor or sky, we still have
    // the correct orientation.
    if (orientation == OrientationEventListener.ORIENTATION_UNKNOWN) return;
    mOrientation = CameraUtil.roundOrientation(orientation, mOrientation);

    // Show the toast after getting the first orientation changed.
    if (mHandler.hasMessages(SHOW_TAP_TO_FOCUS_TOAST)) {
        mHandler.removeMessages(SHOW_TAP_TO_FOCUS_TOAST);
        showTapToFocusToast();
    }
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:15,代码来源:PhotoModule.java

示例4: onOrientationChanged

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onOrientationChanged(int orientation) {
    // We keep the last known orientation. So if the user first orient
    // the camera then point the camera to floor or sky, we still have
    // the correct orientation.
    if (orientation == ORIENTATION_UNKNOWN) return;
    mDeviceOrientation = CameraUtil.roundOrientation(orientation, mDeviceOrientation);
    // When the screen is unlocked, display rotation may change. Always
    // calculate the up-to-date orientationCompensation.
    int orientationCompensation = mDeviceOrientation
            + CameraUtil.getDisplayRotation(mActivity) % 360;
    if (mOrientationCompensation != orientationCompensation) {
        mOrientationCompensation = orientationCompensation;
    }
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:16,代码来源:WideAnglePanoramaModule.java


注:本文中的com.android.camera.util.CameraUtil.roundOrientation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。