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

推荐订阅源

J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
Engineering at Meta
Engineering at Meta
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
罗磊的独立博客
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX

博客园 - 文刀无尽

在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.