diff options
author | Joe Onorato <joeo@android.com> | 2009-12-02 22:39:53 -0800 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2009-12-02 22:39:53 -0800 |
commit | 2f2a6b72edc1606aaa85afcb7cec7396332c90ea (patch) | |
tree | 07cb36e26d73dd38390dfdde66580e355352401e | |
parent | 299075effe561b7ae7bfcfce28c225cd3d482960 (diff) | |
download | Launcher-eclair-passion-release.tar.gz |
From Launcher2: Make the launcher send the position of the icon that's launching an intent.android-sdk-2.1_r1android-2.1_r2.1p2android-2.1_r2.1pandroid-2.1_r2android-2.1_r1eclair-releaseeclair-passion-release
-rw-r--r-- | src/com/android/launcher/Launcher.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher/Launcher.java b/src/com/android/launcher/Launcher.java index f043cf3..ca108bf 100644 --- a/src/com/android/launcher/Launcher.java +++ b/src/com/android/launcher/Launcher.java @@ -1641,6 +1641,10 @@ public final class Launcher extends Activity implements View.OnClickListener, On if (tag instanceof ApplicationInfo) { // Open shortcut final Intent intent = ((ApplicationInfo) tag).intent; + int[] pos = new int[2]; + v.getLocationOnScreen(pos); + intent.setSourceBounds( + new Rect(pos[0], pos[1], pos[0]+v.getWidth(), pos[1]+v.getHeight())); startActivitySafely(intent); } else if (tag instanceof FolderInfo) { handleFolderClick((FolderInfo) tag); |