【发布时间】:2013-11-19 07:54:04
【问题描述】:
我阅读了android源代码的ManageApplications.java并注意到这个'同步(条目)',我想知道这里是否有必要以及它如何'有效地绑定数据'?我认为更好地理解它可能会解决我的一些奇怪问题,提前谢谢你。
public View getView(int position, View convertView, ViewGroup parent) {
...
// ? Bind the data efficiently with the holder
ApplicationsState.AppEntry entry = mEntries.get(position);
synchronized (entry) {
holder.entry = entry;
if (entry.label != null) {
holder.appName.setText(entry.label);
}
}
mActive.remove(convertView);
mActive.add(convertView);
return convertView;
}
【问题讨论】:
标签: android synchronized