Howto change the startup animation of Android OS

the statup animation means the one you see before the launcher application comes out.
it was a line with a red point goes from left to right again and again before, in android 1.0. currently, on cupcake, it’s a text string, “android”, with shine goes from left to right.
i found someone add an advertisement logo to that animation in a customized rom. so i studied how to remove that, or make a new one by myself.

finally, i found it out. there are 2 pictures under frameworks/base/core/res/assets/images:
android-logo-mask.png
android-logo-shine.png

the 1st one is the background. then, you can edit it with picture editor, like add your own name on it.
well, after edited it, you need to build framework-res out, with command “make framework-res”. then, you will get a new framework-res.apk. but usually, you can not use this file to replace the one in the rom/firmware for real devices, like g1, g2. since, some resources are not under the same version.
what i do is pull out the original framework-res.apk from the rom. unzip both this framework-res.apk and the one i made by myself. replace the 2 pictures under assests/images with the one i made before. notice, you can not replace the files with the png files you edited, but not compiled.
then zip out framework-res.apk again, and sign with signapk tool. now you can use the new framework-res.apk to replace the original one.

Just created my twitter account

http://twitter.com/evan_jiang

the updates show at the right side of my blog, too.

ZDic on sf.net move to svn source control

i found that i’m not familiar with cvs operation. bobgreen@hi-pda had developed lots to improve the zdic. i guess it would be better to accept the patches to make this project alive.

anyone who’d like to get zdic source code, pls use a svn client to checkout source code from https://zdic.svn.sourceforge.net/svnroot/zdic/trunk/
in command line, you can use:
svn co https://zdic.svn.sourceforge.net/svnroot/zdic/trunk/
you will need both zdic and zdicfont project to compile the whole project.
zdic with skin is putted in https://zdic.svn.sourceforge.net/svnroot/zdic/branches/zdic_skined

hope it works for you.

Howto set FULL SCREEN on Android

if you only want to remove the title bar, add this line to oncreate() method of your activity:

this.requestwindowfeature(window.feature_no_title);

if you want to set your activity to use the whole display screen, which means also remove the status bar, you need to add one more line:

this.getwindow().setflags(windowmanager.layoutparams.flag_no_status_bar,
windowmanager.layoutparams.flag_no_status_bar);

reference: http://groups.google.com/group/android-developers/msg/1d7497e5626896a7
note: it’s for sdk-m3, the flag name changed in sdk-m5.

for example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
 
public class FullScreenActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR,
        		WindowManager.LayoutParams.FLAG_NO_STATUS_BAR);
        setContentView(R.layout.main);
    }
}

thanks to ace’s comment. the code should be changed to

1
2
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                    WindowManager.LayoutParams.FLAG_FULLSCREEN );