We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public class LauncherHolder extends Holder { private AppCompatImageView mImageView = null;
public LauncherHolder(View itemView) { super(itemView); } @Override protected void initView(View itemView) { mImageView = itemView.findViewById(R.id.picIv); Log.e("JKSDJF", mImageView + " " + this); } @Override public void updateUI(Integer data) { try { Log.e("JKSDJF", data + ""); Log.e("JKSDJF", mImageView + " " + this); if (data != null && mImageView != null) { mImageView.setImageResource(data); } } catch (Exception e) { e.printStackTrace(); } }
}
1、执行【initView】方法的时候,Log.e("JKSDJF", mImageView + " " + this); 打印出来的 mImageView 有值; 2、到了【updateUI】,Log.e("JKSDJF", mImageView + " " + this); 打印出来的 mImageView 为null,而且两次打印的 this 对象有很大概率不是同一个;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
public class LauncherHolder extends Holder {
private AppCompatImageView mImageView = null;
}
1、执行【initView】方法的时候,Log.e("JKSDJF", mImageView + " " + this); 打印出来的 mImageView 有值;
2、到了【updateUI】,Log.e("JKSDJF", mImageView + " " + this); 打印出来的 mImageView 为null,而且两次打印的 this 对象有很大概率不是同一个;
The text was updated successfully, but these errors were encountered: