Android用代码实现全屏

2015-04-09 0 161
Android用代码实现全屏
    public void toggleFullscreen(boolean fullScreen)  
     {  
      //fullScreen为true时全屏,否则相反  
        
         WindowManager.LayoutParams attrs = getWindow().getAttributes();  
           
         if (fullScreen)  
         {  
             attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;  
         }  
         else  
         {  
             attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN;  
         }  
           
         getWindow().setAttributes(attrs);  
     }  

遇见资源网 java Android用代码实现全屏 http://www.ox520.com/9170.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务