我正在尝试从图像视图更新图像,调试它我看到所有代码都在传递,但图像没有更新。这是我的代码:
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View v = inflater.inflate(R.layout.activity_main, null);
ImageView view = (ImageView) v.findViewById(R.id.img);
view.setImageResource(R.drawable.head);