Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to re-build the default "Launcher" application?

My goal is to modify the Launcher application and dynamically modify and change the theme.

I saw several 'home' apps at http://www.cyrket.com/p/android/com.stain46.taghome/. It looks like they took the default Home(Launcher) and modified it. How did they do that? What do I need to modify to achieve the same thing?

like image 205
pengwang Avatar asked Jul 07 '10 03:07

pengwang


1 Answers

I have done this with the ICS launcher. You also need to do quite a number of code changes to get it to compile as a normal app because it uses a lot of private internal APIs (despite what Google may have implied). You also need to change the package name. There are two limitations I've found:

  1. There's a filter called TableMaskFilter that isn't available to normal apps. I think this allows the app drawer to be semi-transparent, but I removed uses of it and it looks fine I think.

  2. More critically, it appears there is no way to replicate the widget-adding experience because it requires a permission that only system apps can have. See this question.

Anyway, I put my source here. It compiles and works on the official Galaxy S2 4.0.3, but if you try to add widgets it will crash.

Note, when you're changing the package name, there are places that Eclipse's refactor doesn't notice (e.g. XML layouts). I recommend you do a global text search/replace instead.

like image 131
Timmmm Avatar answered Sep 20 '22 20:09

Timmmm