Mình có viết đoạn code MyAdapter kế thừa BaseAdapter như phía dưới, nhưng không hiểu làm sao chạy trên máy ảo vẫn lỗi, khi mình comment cái đoạn setLayoutParams thì chạy bình thường nhưng ảnh to quá, có bác nào chỉ giúp với. 
public class MyAdapter extends BaseAdapter {
public Integer[] hinhAnh = { R.drawable.ic_1, R.drawable.ic_2, R.drawable.ic_3, R.drawable.ic_4, R.drawable.ic_5,
R.drawable.ic_6, R.drawable.ic_7, R.drawable.ic_8, R.drawable.ic_9 };
Context context;
public MyAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return hinhAnh.length;
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return null;
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ImageView image;
if (convertView == null) {
image = new ImageView(context);
image.setScaleType(ImageView.ScaleType.CENTER_CROP);
image.setLayoutParams(new GridView.LayoutParams(80, 80));
image.setPadding(8, 8, 8, 8);
} else{
image=(ImageView) convertView;
}
image.setImageResource(hinhAnh[position]);
return image;
}
}

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?