1

这是有问题的代码:

    m_myOrientationEventListener
    = new OrientationEventListener(getApplicationContext(),SensorManager.SENSOR_DELAY_NORMAL){
        @Override
         public void onOrientationChanged(int arg0) {
             // TODO Auto-generated method stub
             Toast.makeText(getApplicationContext(), "Orientation changed !", Toast.LENGTH_SHORT).show();
         }
    };

在我添加此代码之前一切正常,添加后,我在模拟器上看到一个“空白”布局

正如我从调试中看到的那样,函数(OrientationEventListener)被调用了两次......

有任何想法吗 ?

谢谢

4

0 回答 0