如何更改GridView中ImageView的高亮颜色。
我尝试过以下方法:
我尝试过以下方法:
public View getView(int position, View convertView, ViewGroup parent) {
ImageView imageView;
if (convertView == null) { // if it's not recycled, initialize some attributes
imageView = new ImageView(mContext);
imageView.setLayoutParams(new GridView.LayoutParams(width, height));
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setBackgroundResource(R.drawable.menu_beh);
// imageView.setPadding(8, 8, 8, 8);
} else {
imageView = (ImageView) convertView;
}
String s=(String)HiveApp.mgd[position].posters[2].image.url;
// imageView.setImageDrawable(getPicture(items[position]));
HiveApp.id.download(s, imageView);
// id.DisplayImage(s, imageView);
return imageView;
}