Quick android tips
To hide window title in onCreate() of activity do the
requestWindowFeature(Window.FEATURE_NO_TITLE);To hide system statusbar (the thing with battery status) do the following in the onCreate() method:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
This should be made before setting any content.
Push existing git repo to svn.
I'm no big fan of svn, but sometimes I just have to use it. For those like me here is the guide on how to import existing git repo into svn. It helped me a lot.
How to make splashscreen for iphone app?
Most of developers should already know this, but for ones like me here is the way: you put Default.png into your project and it will be automatically displayed by os while the rest of your app is loading.
java 1.5 in Snow Leopard
Recently I've installed Snow Leopard as my main system and found out that there is no JDK 1.5 in the system - only 1.6.
Sadly, one of my project needed to be build with JDK 1.5 because I deploy it in jetty container which is running in 1.5 jvm. Happily, I was able to transfer JDK 1.5 from my other notebook with Leopard, so now I have both 1.5 and 1.6 versions of java in Snow Leopard.
Below goes instructions how to do it:
user@leopard% cd /System/Library/Frameworks/JavaVM.framework/Versions
user@leopard% zip -9ry ~/java.zip 1.5.0...
user@snow-leopard% sudo -s
root@snow-leopard# cd /System/Library/Frameworks/JavaVM.framework/Versions
root@snow-leopard# scp user@leopard:~/java.zip .
root@snow-leopard# rm -f 1.5*
root@snow-leopard# unzip java.zip
root@snow-leopard# ln -s 1.5.0 1.5
Now, system utility called "Java Preferences" can be used to manage java version. However, it failed to set correct JDK for my maven from macports, so I had to
root@snow-leopard# rm -f CurrentJDK && ln -s 1.5.0 CurrentJDK
after doing so everything went smoothly
Snow Leopard and MacPorts
MacPorts work fine in Snow Leopard, you just need to build them from source code. It is pretty easy.