`

所有Window flag

 
阅读更多
From http://blog.csdn.net/hudashi/article/details/7060882

int FLAGS_CHANGED 用于表示flags发生了变化,关于此的详细内容请看后文。
int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON Window flag: as long as this window is visible to the user, allow the lock screen to activate while the screen is on.
当该window对用户可见的时候,允许锁屏。
int FLAG_ALT_FOCUSABLE_IM Window flag: invert the state of FLAG_NOT_FOCUSABLE with respect to how this window interacts with the current method.
int FLAG_BLUR_BEHIND Window flag: blur everything behind this window.
让该window后所有东西都模糊(blur)
int FLAG_DIM_BEHIND Window flag: everything behind this window will be dimmed.
让该window后所有的东西都成暗淡(dim)
int FLAG_DISMISS_KEYGUARD Window flag: when set the window will cause the keyguard to be dismissed,
only if it is not a secure lock keyguard.
int FLAG_DITHER Window flag: turn on dithering when compositing this window to the screen.
开启抖动(dithering)
int FLAG_FORCE_NOT_FULLSCREEN Window flag: Override {@link #FLAG_FULLSCREEN and force the screen decorations (such as status bar) to be shown.
恢复window非全屏显示
int FLAG_FULLSCREEN Window flag: Hide all screen decorations (e.g.
让window进行全屏显示
int FLAG_HARDWARE_ACCELERATED Indicates whether this window should be hardware accelerated.

对该window进行硬件加速.

该flag必须在设置你的Activity或Dialog的Content View之前进行设置,

而且如果你在mainfest文件中用android:hardwareAccelerated开启了该属性的话,那么你在程序中就不能再改变它。mainfest文件中android:hardwareAccelerated属性默认是开启的("true")。

int FLAG_IGNORE_CHEEK_PRESSES Window flag: intended for windows that will often be used when the user is holding the screen against their face, it will aggressively filter the event stream to prevent unintended presses in this situation that may not be desired for a particular window, when such an event stream is detected, the application will receive a CANCEL motion event to indicate this so applications can handle this accordingly by taking no action on the event until the finger is released.


int FLAG_KEEP_SCREEN_ON Window flag: as long as this window is visible to the user, keep the device's screen turned on and bright.
当该window对用户可见时,让设备屏幕处于高亮(bright)状态。
int FLAG_LAYOUT_INSET_DECOR Window flag: a special option only for use in combination with FLAG_LAYOUT_IN_SCREEN.
int FLAG_LAYOUT_IN_SCREEN Window flag: place the window within the entire screen, ignoring decorations around the border (a.k.a.
让window占满整个手机屏幕,不留任何边界(border)
int FLAG_LAYOUT_NO_LIMITS Window flag: allow window to extend outside of the screen.
window大小不再不受手机屏幕大小限制,即window可能超出屏幕之外,这时部分内容在屏幕之外。
int FLAG_NOT_FOCUSABLE Window flag: this window won't ever get key input focus, so the user can not send key or other button events to it.
让window不能获得焦点,这样用户快就不能向该window发送按键事件及按钮事件
int FLAG_NOT_TOUCHABLE Window flag: this window can never receive touch events.
让该window不接受触摸屏事件
int FLAG_NOT_TOUCH_MODAL Window flag: Even when this window is focusable (its {@link #FLAG_NOT_FOCUSABLE is not set),
allow any pointer events outside of the window to be sent to the windows behind it.
即使在该window在可获得焦点情况下,仍然把该window之外的任何event发送到该window之后的其他window.
int FLAG_SCALED Window flag: a special mode where the layout parameters are used to perform scaling of the surface when it is composited to the screen.
int FLAG_SECURE Window flag: don't allow screen shots while this window is displayed.
当该window在进行显示的时候,不允许截屏。
int FLAG_SHOW_WALLPAPER Window flag: ask that the system wallpaper be shown behind your window.
在该window后显示系统的墙纸(wallpaper)
int FLAG_SHOW_WHEN_LOCKED Window flag: special flag to let windows be shown when the screen is locked.
当锁屏的时候,显示该window.
int FLAG_SPLIT_TOUCH Window flag: when set the window will accept for touch events outside of its bounds to be sent to other windows that also support split touch. When this flag is not set, the first pointer that goes down determines the window to which all subsequent touches go until all pointers go up. When this flag is set, each pointer (not necessarily the first) that goes down determines the window to which all subsequent touches of that pointer will go until that pointer goes up thereby enabling touches with multiple pointers to be split across multiple windows
当该window在可以接受触摸屏情况下,让因在该window之外,而发送到后面的window的触摸屏可以支持split touch.
int FLAG_TOUCHABLE_WHEN_WAKING Window flag: When set, if the device is asleep when the touch screen is pressed, you will receive this first touch event.
当手机处于睡眠状态时,如果屏幕被按下,那么该window将第一个收到到事件
int FLAG_TURN_SCREEN_ON Window flag: when set as a window is being added or made visible, once the window has been shown then the system will poke the power manager's user activity (as if the user had woken up the device) to turn the screen on.
当然window被显示的时候,系统将把它当做一个用户活动事件,以点亮手机屏幕。
int FLAG_WATCH_OUTSIDE_TOUCH Window flag: if you have set FLAG_NOT_TOUCH_MODAL, you can set this flag to receive a single special MotionEvent with the action MotionEvent.ACTION_OUTSIDE
for touches that occur outside of your window.
如果你设置了该flag,那么在你FLAG_NOT_TOUNCH_MODAL的情况下,即使触摸屏事件发送在该window之外,其事件被发送到了后面的window,那么该window仍然将以MotionEvent.ACTION_OUTSIDE形式收到该触摸屏事件

分享到:
评论

相关推荐

    JavaScript应用实例-windowFlag.js

    JavaScript应用实例-windowFlag.js

    AutoJs源码-windowFlag

    AutoJs源码-windowFlag。本资源购买前提醒:本源码都是实际autojs项目模板,安装好autojs直接运行即可打开。1、支持低版本autojs。2、资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!。3...

    google不支持window.showModalDialog问题解决方案

    This is a `window.showModalDialog()` shim using a modal HTML5 `<dialog>` element and ECMAScript 6 Generators. It was tested in the latest Google Chrome with the *Enable Experimental JavaScript* flag ...

    详解Android 全局弹出对话框SYSTEM_ALERT_WINDOW权限

    这里的关键是`setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT)`,这使得对话框可以在所有应用之上显示。 然而,方案一存在一个问题:在某些设备(如小米手机)上,系统默认可能禁止了此类弹出框。为了解决...

    Android夜间模式实现,通过在window上加一层半透明的View

    这些问题可以通过自定义Window装饰(DecorView)或者使用`SYSTEM_UI_FLAG_LOW_PROFILE`等系统UI标志来解决。 6. `NightModeDemo`:这个压缩包中的`NightModeDemo`可能包含了一个完整的示例项目,演示了上述步骤的...

    Android中Window的管理深入讲解

    FLAG_NOT_FOCUSABLE window 不需要获取焦点,也不需要接收各种输入事件,FLAG_NOT_TOUCH_MODAL 系统会将当前 Window 区域外的单击事件传递给底层的 Window,在当前 Window 区域内的事件则自己处理,FLAG_SHOW_WHEN_...

    深入理解Android中的Window和WindowManager

    WindowManagerService是管理所有Window的核心服务,它负责处理Window的生命周期和布局。当通过WindowManager添加一个新的Window时,实际执行的是一个跨进程的IPC(Inter-Process Communication)操作。WindowManager...

    Android中Window添加View的底层原理

    `FLAG_NOT_TOUCH_MODAL` 表示不需获取焦点,事件会传递给下层有焦点的Window。`FLAG_NOT_FOCUSABLE` 意味着在此Window外的点击事件会传递到底层Window。`FLAG_SHOW_WHEN_LOCKED` 则允许窗口在锁屏界面显示。`type` ...

    window 内核对象.pdf

    Windows提供了防止句柄被无意或恶意关闭的机制,如使用SetHandleInformation函数设置HANDLE_FLAG_PROTECT_FROM_CLOSE标志。这样,即使应用程序想要关闭句柄,也无法关闭,直到移除此标志。 8. 错误处理: 在操作...

    android activity设置无标题实现全屏

    Activity设置全屏和无标题栏,要用到andorid.view.Window和Android.view.WindowManager。 Window.FEATURE_NO_TITLE表示无标题栏。 WindowManager.LayoutParams.FLAG_FULLSCREEN表示全屏。 具体用法如下: 1、设置...

    ngx-multi-window::open_mailbox_with_raised_flag:适用于多窗口角度应用程序的基于拉式的跨窗口通信

    ngx-multi-window 基于拉式的跨窗口通信,适用于多窗口角度应用 特征 在运行angular应用程序的不同选项卡/窗口之间发送消息 邮件接收发送标签/窗口的通知 自动检测/注册新标签页/窗口 设置 首先,您需要安装npm模块...

    JS window对象简单操作完整示例

    JavaScript中的`window`对象是全局对象,它代表浏览器的一个窗口,包含了与页面交互的各种方法、属性和事件。在这个示例中,我们详细探讨了`window`对象的一些常见操作,包括提示框、弹出窗口和时间相关操作。 1. *...

    jphs5forwindow工具以及测试题目.zip

    【标题】"jphs5forwindow工具以及测试题目.zip" 涉及的主要知识点是CTF(Capture The Flag)比赛中的图像隐写术。在CTF竞赛中,参赛者通常需要利用各种技术和技巧来解密、分析或查找隐藏的信息,以解决安全挑战。这...

    利用tfe函数进行系统辨别 matlab

    - `tfe(x, y, ..., dflag)`:dflag参数用于选择预处理方式,可以去除数据的线性趋势(`dflag=linear`)、均值(`dflag=mean`)或者不作处理(`dflag=none`)。 - `tfe(...)`:如果没有指定输出参数,函数将在当前...

    linux基础知识,redflag的试题库

    **解析**: 题目表述:“如果与Window95/NT共享的打印机,需要先安装smbprint,然后设置/etc/printcap。” 这个说法是正确的。使用Samba可以实现Windows和Linux之间的文件共享,包括打印机共享。 #### 十九、信号...

    解决沉浸状态栏和华为虚拟键冲突,7.0后状态栏变灰的问题

    window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | ...

    Window 篇- WindowInsets 与 fitsSystemWindow

    - **标志位**:常用标志位包括`View.SYSTEM_UI_FLAG_FULLSCREEN`(全屏模式)、`View.SYSTEM_UI_FLAG_HIDE_NAVIGATION`(隐藏导航栏)等。 ##### 2. **WTFs(Window Transform Flags)** - **历史背景**:在早期...

    sybase for redflag50 linux

    在本文中,我们将详细探讨如何在红旗Linux 50(Redflag 50 Linux)上安装Sybase Adaptive Server Enterprise(ASE)12.5。Sybase ASE是一款高性能的关系型数据库管理系统,广泛应用于企业级的数据存储和处理。在...

Global site tag (gtag.js) - Google Analytics