zoukankan      html  css  js  c++  java
  • Android开发经验一判断当前屏幕是全屏还是非全屏

    1. public void onCreate(Bundle savedInstanceState) {  
    2.         super.onCreate(savedInstanceState);  
    3.         setContentView(R.layout.main);  
    4.           
    5.           
    6.           
    7.           
    8.         int v = this.getWindow().getAttributes().flags;  
    9.         // 全屏 66816 - 非全屏 65792  
    10.         if(v != 66816){//非全屏  
    11.             this.getWindow().setFlags(  
    12.                     WindowManager.LayoutParams.FLAG_FULLSCREEN,  
    13.                     WindowManager.LayoutParams.FLAG_FULLSCREEN);  
    14.         }else{//取消全屏  
    15.             this.getWindow().clearFlags(  
    16.                     WindowManager.LayoutParams.FLAG_FULLSCREEN);  
    17.         }  
    18.   
    19.     }    
  • 相关阅读:
    关于session
    bootstrap的栅格系统
    js小知识点
    js获取div基础元素
    fixed固定元素
    定时器之延时触发鼠标悬浮事件
    Comparator分组测试
    List去重比较
    点击事件和双击事件
    开机自启动
  • 原文地址:https://www.cnblogs.com/Free-Thinker/p/6722186.html
Copyright © 2011-2022 走看看