summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/ShortcutListAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/ShortcutListAdapter.java')
-rw-r--r--src/com/android/launcher2/ShortcutListAdapter.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/com/android/launcher2/ShortcutListAdapter.java b/src/com/android/launcher2/ShortcutListAdapter.java
new file mode 100644
index 000000000..be05ca4bb
--- /dev/null
+++ b/src/com/android/launcher2/ShortcutListAdapter.java
@@ -0,0 +1,26 @@
+package com.android.launcher2;
+
+import com.android.launcher.R;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.Intent.ShortcutIconResource;
+import android.content.pm.ResolveInfo;
+
+import java.util.ArrayList;
+
+
+public class ShortcutListAdapter extends IntentListAdapter {
+
+ public ShortcutListAdapter(Context context, String actionFilter) {
+ super(context, actionFilter);
+
+ // Manually create a separate entry for creating an Application shortcut
+ ResolveInfo folder = new ResolveInfo();
+
+ folder.icon = R.drawable.ic_launcher_application;
+ folder.labelRes = R.string.group_applications;
+ folder.resolvePackageName = context.getPackageName();
+ mIntentList.add(0, folder);
+ }
+}