Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> android GB版本的camera,錄像過程中按“菜單”鍵會停止錄像

android GB版本的camera,錄像過程中按“菜單”鍵會停止錄像

編輯:關於Android編程

Android 2.3.7.r1 按menu鍵時會停止錄像。改成錄像時按menu鍵不做處理,可做如下修改:

 在packages/apps/CameraOpen/src/com/mediatek/camera/VideoCamera.java

onKeyDown()方法中:

修改

     case KeyEvent.KEYCODE_MENU:

                     if (mHeadUpDisplay != null && mGLRootView != null

                                                        && !mAlertShowing && !mMediaRecorderRecording

                                        && mHeadUpDisplay.getWidth() != 0) {

                         mHeadUpDisplay.barsSwitch();

                     }

                if (mMediaRecorderRecording) {

                    onStopVideoRecording(true);

                    return true;

                } else if (event.isLongPress()) {

                   return true;             // consume long press to prevent soft keyboard

                }

                break;

為:

        case KeyEvent.KEYCODE_MENU:

                     if (mHeadUpDisplay != null && mGLRootView != null

                                                        && !mAlertShowing && !mMediaRecorderRecording

                                        && mHeadUpDisplay.getWidth() != 0) {

                         mHeadUpDisplay.barsSwitch();

                     }

                if (event.isLongPress()) {

                   return true;             // consume long press to prevent soft keyboard

                }

                break;

 

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved