标签:content java代码 https mamicode res 代码 feed 布局 getconf
我是参考这篇文章 :https://www.jianshu.com/p/dbc7e81aead2
主要是布局分横竖屏
然后再java代码
Configuration cf = this.getResources().getConfiguration(); int ori = cf.orientation; if (ori == cf.ORIENTATION_LANDSCAPE) { setContentView(R.layout.feedback_list); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } else if (ori == cf.ORIENTATION_PORTRAIT) { setContentView(R.layout.feedback_list); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);//竖屏 }
标签:content java代码 https mamicode res 代码 feed 布局 getconf
原文地址:https://www.cnblogs.com/wang-jingyuan/p/12174631.html