当我使用 GridView 并向 GridView 添加自定义布局时,我看到了这个错误,我的应用程序运行很慢
02-28 18:39:59.252: I/Choreographer(5586): Skipped 263 frames! The application may be doing too much work on its main thread.
我的代码:
public View getView(int position, View convertView, ViewGroup parent) {
View vi1=convertView;
if(convertView==null){
vi1 = inflater.inflate(R.layout.my_layout, null);
ImageView imv = (ImageView) vi1.findViewById(R.id.Image);
ImageView imv2 = (ImageView) vi1.findViewById(R.id.imageView2);
TextView tw1 = (TextView) vi1.findViewById(R.id.lName);
// TextView tw2 = (TextView) vi1.findViewById(R.id.County);
// TextView tw3 = (TextView) vi1.findViewById(R.id.user);
// imageLoader.DisplayImage(null, imv);
// imageLoader.DisplayImage(null, imv2);
tw1.setText("AZ");
}
return vi1;
}