Here is a sample Eclipse project for an icon pack. The project contains a basic icon pack (not a pack really, just one icon for the Browser app). You can modify that project to use as a starting point for your own icon packs. Here's how:
Code:
1. Extract the project zip file to your hard drive.
2. Open the project in Eclipse: From the File menu choose New > Android Project. In the next screen choose "Create project from existing source", and click "Browse". Choose the LPIconPackSample folder that you extracted. Click "Finish" to open the project. The "Package Explorer" window in Eclipse (the left column) should now have your project.
3. Choose a unique package name and set it: If your name is John Doe and your icon pack is called "Blue Ocean", you could choose a package name like "com.johndoe.blueocean". To change the sample project's package name, first expand the LPIconPack project on Eclipse's package manager, then expand the "src" folder. Right-click the "com.yourname.youriconpackname" and choose Refactor > Rename. Enter your package name and click OK. Row right-click on the LPIconPack project and choose Android Tools > Rename Application Package. Enter your package name again and click OK.
4. Set the icon pack's name: Now expand the "res" folder in your project and expand "values". Open the strings.xml file and set the "app_name" value to your icon pack's name (In our example, it would be "Blue Ocean").
5. That's it! You can now export the icon pack as an Android Application and test it on your phone. To make your own icon pack, remove the files in the "drawable" and "drawable-hdpi" folders inside "res" and add your own. Also, edit the "theme_iconpack" array in theme_iconpack.xml (inside res/values).
Here's how to name your icon files so that LauncherPro can use them:
Code:
1. Find the full activity name for the app. You could use LauncherPro's "Activities" shortcut list to get these names. Go to your home screen, press Menu > Add > Shortcuts > Activities. Expand the desired app and look for the activity with the label that appears in your app drawer. The full activity name will appear below the label (for example: com.android.browser.BrowserActivity)
2. Change the dots to underscores, and make it all lower-case. For example, "com.android.browser.BrowserActivity" would turn into "com_android_browser_browseractivity".
3. Now use that name for your icon file, for example com_android_browser_browseractivity.png
If you're only making icons for HDPI devices, put your icon files in the /res/drawable-hdpi folder. The Android system will auto-resize the icons for MDPI devices when requested. If you would also like to provide pre-sized icons for MDPI devices, you can add them to the /res/drawable-mdpi folder (same with LDPI).
Now an important step that cannot be skipped. You must declare all the icons you included in your icon pack (this is for performance reasons, and for compliance with future features). To declare your icons, open the /res/values/theme_iconpack.xml file and edit the "theme_iconpack" string array. You cannot change the name of the array, it should remain as "theme_iconpack". Declare all your icons by adding one item per icon, like this:
Code:
<item>com_android_browser_browseractivity</item>
Please note that we don't include the file extension (png/jpg), just the full, formatted activity name.
If you're using the LPIconPackSample project, you're now ready to export your APK and publish it. If you're packaging your icon pack inside another app (an LP widget skin package for example), make sure you add the "com.fede.launcher.THEME_ICONPACK" category to the intent filter of an activity within your package like this:
Code:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.fede.launcher.THEME_ICONPACK" />
</intent-filter>
That will let LauncherPro know that your package contains an icon pack and will show it in the icon pack picker.