为android 启动的时候添加splash
2012-02-17 00:14
344 查看
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:
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.
相关文章推荐
- Android逆向移花接木之添加启动Splash
- Android 5.0 添加系统服务后,启动的时候报安全错误
- 为Android应用程序添加Splash启动画面
- sdk manager 创建的虚拟机启动的时候总是在Android字样解决
- App 冷启动:给 Android 的 Activity 添加一个背景
- android edittext在输入手机号码的时候自动添加分隔符
- Android进阶学习-布局动画(让你添加View的时候动起来)
- Android开发入门应用启动常见关于Splash的优缺点
- Android开发————启动应用时Splash的启动界面制作
- Android添加jar包打APK包时候报错
- Android 添加页面切换动画, 避免冷启动
- android app 优化启动体验, 不闪白屏并且快速展示 splash
- Android 启动APP时会出现黑屏白屏(提高 Splash页面的启动速度)
- android窗体动画:activity启动从底部向上滑动出现,关闭的时候从顶部向下滑动消失的动画实现【转】
- Android studio 启动的时候遇到tool.jar 没有找到的问题z
- android中ListView在划屏到底部的时候动态添加ListView的Item实现
- android 添加快捷方式 启动两个应用
- Android 添加页面切换动画, 避免冷启动
- 启动AVD时候失败PANIC: ANDROID_SDK_HOME is defined but could not find Test.ini file in $ANDROID_SDK_HOME\.a
- adb 命令设置android语言,emulator启动模拟器的时候设置语言