zoukankan
html css js c++ java
Android锁屏状态下弹出activity,如新版qq的锁屏消息提示
在接收消息广播的onReceive里,跳转到你要显示的界面。如:
Intent intent = new Intent(arg0,MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
arg0.startActivity(intent);
复制代码
在该activity的onCreate()方法里:
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED|WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
setContentView(R.layout.activity_main);
复制代码
设置activity的theme属性:
android:theme="@android:style/Theme.Wallpaper.NoTitleBar"
复制代码
上一篇
Android Animation学习(二) ApiDemos解析:基本Animatiors使用
下一篇
ImageView 等比例放大
查看全文
相关阅读:
【Rust】元组display
【Rust】原始类型布尔
【Rust】原始类型浮点
【Rust】元组transpose
【Rust】结构体
【Rust】原始类型数组
【Rust】结构体square
【Rust】结构体area
1月12日 家庭小账本(改) 开发记录
1月18日 学习记录
原文地址:https://www.cnblogs.com/sparkleDai/p/7604989.html
最新文章
每日日报2020.11.5 1905
每日日报2020.11.9 1905
每日日报2020.10.30 1905
每日日报2020.11.3 1905
代码大全2 十一月读书心得 1905
每日日报2020.11.6 1905
JAVA项目中的常用的异常处理情况 1905
课程5 1905
每日日报2020.11.2 1905
每日总结27
热门文章
每日总结28
《深入理解计算机系统》 读书笔记
《深入理解计算机系统》 读书笔记
Python 基础学习
Python 面向对象
《深入理解计算机系统》 读书笔记
python 练习
Python 练习 随机生成4位验证码
【Rust】原始类型元组
【Rust】特质trait
Copyright © 2011-2022 走看看