public View getView(int position, View convertView, ViewGroup parent)
{
View view = inflater.inflate(R.layout.gv_item, null);
TextView tv
= (TextView) view.findViewById(R.id.gv_item_appname);
ImageView iv =
(ImageView)
view.findViewById(R.id.gv_item_icon);
//tv.setText(packageInfos.get(position).packageName);
tv.setText(pkInfos.get(position).applicationInfo.loadLabel(getPackageManager()));
iv.setImageDrawable(pkInfos.get(position).applicationInfo.loadIcon(getPackageManager()));
return
view;
}
时间: 2024-11-05 19:27:56