横竖屏切换的时候设置布局的背景:
1.准备2张图片,一个横屏hp.png,一个竖屏sp.png
2.获取Activity的布局layout= (ViewGrop)findViewById(R.id.layout);
3.在切换到横屏时,layout.setBackgroundDrawable(getResources().getDrawable(R.drawable.hp));
4.在切换到竖屏时,layout.setBackgroundDrawable(getResources().getDrawable(R.drawable.sp));