android - Add multiple flags to windowmanager -
i have windowmanager params set this:
final windowmanager.layoutparams params = new windowmanager.layoutparams( windowmanager.layoutparams.fill_parent, windowmanager.layoutparams.wrap_content, windowmanager.layoutparams.type_system_alert, windowmanager.layoutparams.flag_not_focusable, windowmanager.layoutparams.flag_watch_outside_touch, pixelformat.translucent );
however, causing error. it's fine if remove on of flags, want both. how can this?
use bit-wise or flags combine them bitwise: flag1 | flag2
final windowmanager.layoutparams params = new windowmanager.layoutparams( windowmanager.layoutparams.fill_parent, windowmanager.layoutparams.wrap_content, windowmanager.layoutparams.type_system_alert, windowmanager.layoutparams.flag_not_focusable | windowmanager.layoutparams.flag_watch_outside_touch, pixelformat.translucent );
Comments
Post a Comment