views:

293

answers:

0
    @Override
public void onConfigurationChanged(Configuration _newConfig) {

    if (_newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
        Toast toast = Toast.makeText(this, "test orientation_landscape",
                Toast.LENGTH_LONG);
        toast.show();
        setContentView(R.layout.proceed);
    }

    if (_newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
        Toast toast = Toast.makeText(this, "test orientation_portrait",
                Toast.LENGTH_LONG);
        toast.show();
        setContentView(R.layout.proceed);
    }

    super.onConfigurationChanged(_newConfig);
}

when i change the emulator orientation, the toast is not shown...? SDK 1.6

i have set the android manifest config -> orientation

When the emulator is changed from portrait to landscape, no effect is shown, but from landscape to portrait, works fine.

If there is any method by which i can keep my app display intact, without any orientation change, when the device is changed in orientation, please let me know that also.

Advanced Thanks for help.