@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
ImageView header = (ImageView) this.findViewById(R.id.header);
if ( newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE ) {
header.setImageResource(R.drawable.header480);
}
else if ( newConfig.orientation == Configuration.ORIENTATION_PORTRAIT ) {
header.setImageResource(R.drawable.header320);
}
}
其实很简单