错误:窗口已经聚焦,忽略焦点增益:com.android.internal.view.IInputMethodClient$Stub$Proxy@4087b120

时间:2012-07-19 18:02:00

标签: android menu video-recording

我正在尝试制作用于视频录制的菜单按钮开始和停止:

public void vid_Recorder() {
    try {
        mRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
        mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);;
        mRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
        mRecorder.setOutputFile("/mnt/sdcard/recorder.3gpp");
        mRecorder.prepare();
        mRecorder.start();
    } catch(Exception e) {
        e.printStackTrace();
    }
}

我在这里创建了菜单:

@Override
public boolean onCreateOptionsMenu(Menu menu)
{
    MenuInflater menuInflater = getMenuInflater();
    menuInflater.inflate(R.menu.menu,menu);
    return super.onCreateOptionsMenu(menu);
}

public boolean onOptionItemSelected(MenuItem Item)
{
    switch(Item.getItemId()) {
        case R.id.menu_Start:
        {
            Toast.makeText(getApplicationContext(), "Started Recording",
                           Toast.LENGTH_LONG).show();
            vid_Recorder();
            System.out.println("Get Started");
        }
        case R.id.menu_Stop:
        {
            mRecorder.stop();
        }
    }

    return onOptionItemSelected(Item);
}

但是我甚至没有在logcat中获取system.out.println语句而不是我得到的语句:

  

窗口已经集中,无视焦点增益:com.android.internal.view.IInputMethodClient$Stub$Proxy@406f05e8

0 个答案:

没有答案