我在横屏的情况点击一张图片进入一个activity(调用下面的函数),然后立即将平板切换成竖屏,平板屏幕会黑一下屏,然后才显示下一个activity的view,并且此时view得到的配置是横屏的配置。两个activity的View的onCongigurationChange函数都没有被调用,我的屏幕已经是竖屏了,但是我用Configuration得到的屏幕信息仍然是横屏 public void showReader(ChannelModel channelModel) {
Configuration config = this.getResources().getConfiguration();
Log.e("heng", ""+config.orientation);
Intent intent = new Intent(this, ArticleReaderLayoutActivity.class);
// intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
Bundle mBundle = new Bundle();
mBundle.putSerializable("channelModel", channelModel);
intent.putExtras(mBundle);
this.startActivity(intent);
this.finish();
this.overridePendingTransition(R.anim.push_left_in,
R.anim.push_left_out);
}

解决方案 »

  1.   

    LZ,请教一个问题哈,
    this.startActivity(intent);
    this.finish();
    this.overridePendingTransition(R.anim.push_left_in,
    R.anim.push_left_out);
    }
    这个在前面已经调用了finish()了,后面还可以执行
    this.overridePendingTransition(R.anim.push_left_in,
    R.anim.push_left_out);吗?
      

  2.   

    楼上的,是可以执行的 
    public void overridePendingTransition (int enterAnim, int exitAnim) Call immediately after one of the flavors of startActivity(Intent) or finish() to specify an explicit transition animation to perform next.可以在startActivity 或者在finish之后指定