android:theme="@android:style/Theme.NoDisplay"
2017-04-05 09:49
513 查看
安卓界面不显示
1、
在MainActivity中设置一个按钮,点击跳转到第二个界面
2、
在SecondActivity的清单文件中设置theme为:
android:theme="@android:style/Theme.NoDisplay"
3、
当加载完毕的时候是需要用finish()方法来结束SecondActivity。否则点击返回的时候,会有ANR。(最重要的一点)
4、
很多网上回答,不能再SecondActivity中写东西,其实是不对的,而是加载完毕需要finis掉。
相关文章推荐
- 解决android:theme="@android:style/Theme.NoDisplay" 加入这句话后程序不能运行
- android:theme="@android:style/Theme.NoTitleBar"
- android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen"设置全屏程序闪退解决办法
- android全屏设置代码:android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- 项目中添加 android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"应用崩溃
- android:theme="@android:style/Theme.NoTitleBar"
- android Theme 设置为Android:style/Theme.Light.NoTitleBar.Fullscreen 程序秒退
- activity注册 android:theme="@android:style/Theme.DeviceDefault.Dialog" 报错
- android:theme="Theme.Wallpaper.NoTitleBar.Fullscreen"相关问题
- Android - 错误:"No resource found that matches the given name android:Theme.Material"
- Android - 错误:"No resource found that matches the given name android:Theme.Material"
- 有关Eclipse创建android工程报错:No resource found that matches the given name"Theme.AppCompat.Light"
- 新建Android项目报错"No resource found that matches the given name 'Theme.AppCompat.Light'."
- Android Style and Theme 样式和主题
- Android主题样式与风格(Theme and style)
- android theme & style
- Error applying site theme: A theme with the name "Jet 1011" and version already exists on the server.
- android:style/Theme
- No resource found that matches the given name 'android:Theme.Holo.Light'解决方法
- vs2008 <pages theme="theme1">