當我用GridView和添加自定義佈局的GridView我看到這個錯誤,我的應用程序工作很慢當我使用GridView時在android中跳過框架?
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;
}
但有同樣的問題:( – Qafqaz 2013-02-28 18:28:34
根據RomainGuy列表視圖的創世這種方法是吹在Listview..There意見建議的方法可能是一些其他問題,可能會導致這個問題...如果你可以張貼更多的代碼,那麼它會更容易診斷.. – 2013-02-28 18:32:41