2 o 1001 o O_1001_O 于 2013.07.17 15:52 提问

android-修改gridView高亮颜色

如题,如何修改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;
}

1个回答

cj6585256
cj6585256   2013.07.17 18:00

高亮 没搞懂 应该是selector 选中时变换的背景吧

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!