| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
|
|||||||||||
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
|
|
|||||||||||
|
|||||||||||
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
| |||||||||||
|
窗口w=activity.getWindow();// 例如,在Activity的onCreate()中 w.setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, 窗口管理器。 布局参数。 标志_硬件_加速);
<!-- 此布局设计用于FLAG_layout_IN_OVERSCAN,因此其窗口将 放置在显示器的过扫描区域(如果有)。 因此,内容 顶层视图的 此处使用的方框背景的边缘不可见。--> <FrameLayout xmlns:android=“ http://schemas.android.com/apk/res/android " android:layout_width=“match_parent” android:layout_height=“match_parent” android:background=“@drawable/box_white”> <!-- 这仍然与顶级FrameLayout位于相同的位置,因此contentx 此TextView的 <文本视图 android:layout_width=“wrap_content” android:layout_height=“wrap_content” android:layout_marginTop=“3dp” android:layout_marginLeft=“3dp” android:textAppearance=“?android:属性/textAppearanceMedium” android:text=“Overscan”/> <!-- 此FrameLayout使用android:fitsSystemWindows将其填充调整为 在该空间内,其内容被偏移,不会被过扫描遮挡 区域(或覆盖其UI的系统花色。--> <框架布局 android:layout_width=“match_parent” android:layout_height=“match_parent” android:fitsSystemWindows=“true”> <!-- 现在我们位于父FrameLayout的填充区域内,我们可以 安全放置用户可见的内容。--> <图像视图 android:layout_width=“match_parent” android:layout_height=“match_parent” android:src=“@drawable/frantic” android:scaleType=“fitXY”/> <图像视图 android:layout_width=“match_parent” android:layout_height=“match_parent” android:background=“@drawable/box_white”/> <文本视图 android:layout_width=“wrap_content” android:layout_height=“wrap_content” android:layout_marginTop=“3dp” android:layout_marginLeft=“3dp” android:textAppearance=“?android:属性/textAppearanceMedium” android:text=“Content”/> </FrameLayout> </FrameLayout>
FLAG_ALLOW_LOCK_WHILE_SCREEN_ON标志
标志_DIM_BEHIND
标志_不可用
标志_不_可触摸
标志NOT_TOUCH_MODAL
标记_牵引_警告
标记保持屏幕打开
标志_布局_屏幕
标志_布局_限制
荧光屏标志
FLAG_FORCE_NOT_FULLSCREEN标志
标志_安全
标记_标定
标志_警告_检查_压力
FLAG_LAYOUT_INSET_DECOR标志
标志_ALT_FOCUSABLE_IM
FLAG_WATCH_OUTSIDE_TOUCH标志
FLAG_SHOW_WHEN_LOCKED(显示_锁定)
标志_展示_墙纸
标志_转弯_屏幕_打开
FLAG_DISMISS_KEYGUARD标志
FLAG_SPLIT_TOUCH(标签_触摸)
标志_硬件_加速
标志_位置_焦点_模式
getClass().getName()+“@”+整数.toHexString(hashCode())
|