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>

相关阅读 >>

几个webbrowser相关的函数

Delphi idhashmessagedigest, idhash, idglobal md5

Delphi idftp发送本机ip和外网ip

Delphi 根据delta自动生成sql语句

Delphi 将base64字符串转化为jpeg图片

Delphi md5加密算法

Delphi 安卓app的https访问权限

Delphi 获取含跨域网址的框架网页的源码

Delphi 极速字符串替换函数

Delphi firedac 下的 sqlite [5] - 数据的插入、更新、删除

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



打赏

取消

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

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

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

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

评论

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