view.findViewById与findViewById区别?
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = LayoutInflater.from(mContext);
View view = inflater.inflate(R.layout.grid_item, null);
ImageView mImageView = (ImageView) view.findViewById(R.id.iv_image);
mImageView.setImageDrawable(images[position]);
return view;
}
问题:1、LayoutInflater inflater = LayoutInflater.from(mContext); 中的mContext为什么是Context的对象而不是this
2、为什么要用view.findViewById,可以直接用.findViewById吗?理由是?