Con*_*oid 5 android spinner screen-orientation
我有一个活动,其中有一个旋转器.因为对于纵向和横向模式,我有不同的布局,所以我在onConfigurationChanged方法中改变布局
@Override
public void onConfigurationChanged(Configuration conf) {
super.onConfigurationChanged(conf);
setContentView(R.layout.layout);
initUI();
}
Run Code Online (Sandbox Code Playgroud)
但问题是当我改变方向时,我的微调器被重新创建,所以如果微调器在纵向模式下打开它在横向模式下接近.我的要求是:如果它在任何模式下打开,它应该在方向改变后打开.你可以请让我知道如何处理这种情况.
| 归档时间: |
|
| 查看次数: |
1785 次 |
| 最近记录: |