I want adding at my listview the application icon from getPackageManager
. i tryied something like:
try {
// Icon
Drawable icon = pm.getApplicationIcon(info.processName);
Drawable default_icon = pm.getDefaultActivityIcon();
CharSequence c = pm.getApplicationLabel(pm.getApplicationInfo(info.processName, PackageManager.GET_META_DATA));
Log.w("LABEL", "Name" + c.toString());
String pName = info.processName;
adapter.add(icon + c.toString().toUpperCase() + "\n" + info.processName);
}
but it returns only a string. I want the icon not the string if possible.. Is it possible?