I have managed to write some simple scripts in python for android using sl4a. I can also create shortcuts on my home screen for them. But the icon chosen for this is always the python sl4a icon. Can I change this so different scripts have different icons?
3 Answers
You can change it if you build the .APK file from your computer and pick the icon there. You develop the Python SL4A application and you pick the logo in the /res/drawable folder.

- 97
- 1
- 11
From what I know raduq's answer is correct as when you run a script it is not an actual application, therefor it does not have it's own icon. When you build the script into it's own apk you are able to define your own icons for your project as it is installed as an actual application within your Android system.
Once you are setup to compile your script into an apk, you can use raduq's information to locate the default icon in /res/drawable and replace it with your own image. For further information on how to compile a python script into a standalone application, please see my answer from a related post from earlier: Python for Android APK without dependencies
I guess it depends on your launcher.
With ADW launcher, you can do a long press on your shortcut from your home screen and then select the icon you want to use by pressing the icon button.
For other launchers I've no idea.

- 293
- 1
- 9
-
cute idea but this is not a programmatic solution as it would require each user to manually set the icon. I believe what he was looking to do was programmatically set the icon to avoid this type of manual labor in the first place. Furthermore it would require you to install and use a separate launcher altogether which changes the overall look/feel & functionality of the user interface. – AWainb Apr 20 '13 at 17:55