横竖屏判断

横竖屏判断:

        // 横屏判断
if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)
{
// 横屏代码
}
// 竖屏判断
if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT)
{
// 竖屏代码
}



posted @ 2011-11-09 22:05  程序学习笔记  阅读(226)  评论(0编辑  收藏  举报