by rajendrakumar » Wed Jan 28, 2009 5:13 pm
what Emmanual told is rt..
But you can do one more thing for this orentation problem...
When you use "configChanges" in your manifest file. When the system config changes it will trigger the new configuration to Configuration.
If you want two diffrent kind of xml screen fo your application (lanscape and portrait),
You can design it.
by invoking this following method in your Activity,
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
You must call the super.onConfigurationChanged(newConfig), then only your activity will react for this..
and you can check the orientation like this and you can do what ever you want for the change,
@Override
public void onConfigurationChanged(Configuration newConfig) {
if (Configuration.ORIENTATION_LANDSCAPE == newConfig.orientation){
// Do your change
}else if (Configuration.ORIENTATION_PORTRAIT== newConfig.orientation){
// Do your change
}
};
It should work.. But not yet tested.....
Regards,
Rajendrakumar chinnaiyan.