3

I need a functionality for my app when i click on app launcher icon it should be animated.

Also I need click event of it so i can do whatever operation on that.

TRIED:

I have tried widget but i don't have an idea how exactly do that.

Please help me if you have any suggestion for this or any idea how to make this type of functionality.

Charles
  • 50,943
  • 13
  • 104
  • 142
Hardik
  • 17,179
  • 2
  • 35
  • 40

2 Answers2

0

I figured it out how to achieve animation on app icon like other app doing.

  1. create shortcut or of your app you will need this permission.

<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

  1. you need to create transparent activity by specifying Theme.Translucent.NoTitleBar Theme. This activity will responsible for animation that we want to achieve when user click on shortcut of app.

  2. now we can show animation over shortcut icon by computing position of shortcut. this can be done using ShortcutInfo and ShortcutManager. To give support all android version there isShortcutInfoCompatclass available. find more here.

Hardik
  • 17,179
  • 2
  • 35
  • 40
-1

Just a suggestion did you consider the possibility of using a "gif" image?

And trying to replace images on mouse event.

Haven't tried it though.

Darth Shirr
  • 527
  • 1
  • 7
  • 24
  • how you can replace image on launcher icon tell me? – Hardik Apr 11 '14 at 06:11
  • 1
    Thats why I had mentioned it as "a suggestion" I've never tried it. I feel like there may be another way. How about action scripts? just try some digging. I'm not sure if it's possible. – Darth Shirr Apr 11 '14 at 06:21
  • 2
    Then why this stuff of yours comes under ans ,If you are suggesting something and not sure about it then it should be under comments section – Auto-Droid ツ Apr 11 '14 at 06:25
  • Ok @Auto-Droid ツ please edit it and try posting it as a comment if you have the spare time. If you have any suggestions go ahead, lead the way. – Darth Shirr Apr 11 '14 at 06:29
  • http://stackoverflow.com/questions/1103027/how-to-change-an-application-icon-programmatically-in-android link to change app icon but functionality varies on devices – Auto-Droid ツ Apr 11 '14 at 06:31