Code example for ResolveInfo

Methods: loadIcon, loadLabel

0
            /** 
             * Create a list item and fill it with details from the given 
             * {@link ResolveInfo} object. 
             */ 
            Item(Context context, PackageManager pm, ResolveInfo resolveInfo) {
                label = resolveInfo.loadLabel(pm);
                if (label == null && resolveInfo.activityInfo != null) {
                    label = resolveInfo.activityInfo.name;
                } 
                 
                icon = getResizer(context).createIconThumbnail(resolveInfo.loadIcon(pm));
                packageName = resolveInfo.activityInfo.applicationInfo.packageName;
                className = resolveInfo.activityInfo.name;
            } 
             
            /** 
             * Build the {@link Intent} described by this item. If this item 
             * can't create a valid {@link ComponentName}, it will return 
             * {@link Intent#ACTION_CREATE_SHORTCUT} filled with the item label. 
             */ 
            Intent getIntent(Intent baseIntent) {