Delphi XE5 为Android增加启动图片显示


本文整理自网络,侵删。

 Delphi XE5 为Android增加启动图片显示
本方法是根据群里重庆steve的“Android 启动不黑屏(可自定义启动屏)”整理的。
打开Project---Deployment添加:
1)Styles.xml,RemotePath设为:res\values\,Platfoms设为:Android
2)Loading.png ,RemotePath设为: res\drawable-port\(若是横屏的启动画面,设置为: res\drawable-land ),Platfoms设为:Android

打开AndroidManifest.template.xml

添加这段: android:theme="@style/MyTheme.NoTitleBar.CustomBackground"
编译运行就能看到启动图片。
已知问题:显示启动图片切换到程序界面时有短暂黑屏。

Styles.xml的内容:
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="MyTheme.NoTitleBar.CustomBackground" parent="@android:Theme.Black">
<item name="android:windowBackground">@drawable/loading</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>

相关阅读 >>

Delphi 使用int3进行hook处理

Delphi 字符串前后翻转

Delphi 控制台关闭指定窗口

Delphi 提升进程权限

Delphi中使用android振动

Delphi用内存流方式获取页面验证码图片

Delphi-idhttp-utf-8编码乱码解决

Delphi 如何确定access数据库中存在某一个已知名的表

Delphi 调用golang dll

Delphi获取网卡mac地址多个方法

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...