惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
爱范儿
爱范儿
The Cloudflare Blog
Y
Y Combinator Blog
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
博客园 - 叶小钗
G
Google Developers Blog
J
Java Code Geeks
P
Proofpoint News Feed
美团技术团队
Engineering at Meta
Engineering at Meta
腾讯CDC
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
有赞技术团队
有赞技术团队
L
LangChain Blog
N
Netflix TechBlog - Medium
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】

博客园 - 文刀无尽

在Django 中更新mongodb的ListField字段 图片加到json中,提交到服务器端处理异常问题。 在django中使用时django-nonrel,'django.contrib.auth'不能用的问题 在mac 上安装 mpkg 在bluehost上安装mongodb Celery使用数据库代替rabbitmq 为什么要使用Rabbitmq 在bluehost上安装pytoh 2.7.2 折腾了半天,ajax 在模拟器下正常,在一台2.1机器上正常,在我的小米2.3下不工作 去掉默认标题栏且将应用设置为全屏 java 基本语法 在jquery mobile中页面跳转的时候,实现登录检查 去掉jquery mobile 的阴影效果 Eclipse 的 javascript 插件 iphone phonegap中跨域的问题 使用jquery mobile 经验 另类随机读大表数据 (原创)自已实现服务器控件之 TextBox 控件 (原创)自已实现服务器控件系列 之 设计时可用鼠标拖动大小的Label控件
为android 启动的时候添加splash
文刀无尽 · 2012-02-17 · via 博客园 - 文刀无尽

In order to have a splash screen in a PhoneGap Android application you need to put your splash.png file into res/drawable-ldpi, res/drawable-mdpi, res/drawable-hdpi, res/drawable-xdpi. Where those directories represent low, medium, high and extra large dots per inch. You'll need to resize you slash.png for each directory or Android will stretch it for you.

The sizes of each image should be:

  • xlarge: at least 960 x 720
  • large: at least 640 x 480
  • medium: at least 470 x 320
  • small: at least 426 x 320

Then in your main Java class, the one that extends DroidGap, you'll need to add one line and modify another. First add:

super.setIntegerProperty("splashscreen", R.drawable.splash);

this line should show up under super.onCreate but before super.loadUrl. Then you'll need to modify your loadUrl method to pause for 5 seconds before loading up the main page. It would look like this:

super.loadUrl("file:///android_asset/www/index.html", 5000);

That should do it for you.