GridView通过SimpleAdapter来实现
那么如何定义初始样式。
只有复写SimpleAdapter的getView方法
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View view=super.getView(position, convertView, parent);;
if(position==0){position是第几个
TextView tv=(TextView)view;
tv.setTextColor(0XFFFFFFFF);
tv.setBackgroundResource(R.drawable.categorybar_item_background);
}
return view;
}