FileDocCategorySizeDatePackage
ApplicationsAdapter.javaAPI DocAndroid 1.5 API1897Wed May 06 22:42:46 BST 2009com.android.launcher

ApplicationsAdapter

public class ApplicationsAdapter extends android.widget.ArrayAdapter
GridView adapter to show the list of applications and shortcuts

Fields Summary
private final android.view.LayoutInflater
mInflater
Constructors Summary
public ApplicationsAdapter(android.content.Context context, ArrayList apps)

        super(context, 0, apps);
        mInflater = LayoutInflater.from(context);
    
Methods Summary
public android.view.ViewgetView(int position, android.view.View convertView, android.view.ViewGroup parent)

        final ApplicationInfo info = getItem(position);

        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.application_boxed, parent, false);
        }

        if (!info.filtered) {
            info.icon = Utilities.createIconThumbnail(info.icon, getContext());
            info.filtered = true;
        }

        final TextView textView = (TextView) convertView;
        textView.setCompoundDrawablesWithIntrinsicBounds(null, info.icon, null, null);
        textView.setText(info.title);

        return convertView;