这是我的问题的简短视频。从滚动条可以看出,列表的最后一部分滚动得非常快。这是我的代码(相关部分):
public TotemAdapter (Activity activity, List<Totem> list) {
_activity = activity;
totemList = list;
showDelete = false;
var items = list.ToArray ();
alphaIndex = new Dictionary<string, int>();
for (int i = 0; i < items.Length; i++) {
var key = items[i].title[0].ToString();
if (!alphaIndex.ContainsKey(key))
alphaIndex.Add(key, i);
}
sections = new string[alphaIndex.Keys.Count];
alphaIndex.Keys.CopyTo(sections, 0);
sectionsObjects = new Java.Lang.Object[sections.Length];
for (int i = 0; i < sections.Length; i++) {
sectionsObjects[i] = new Java.Lang.String(sections[i]);
}
}
public int GetPositionForSection (int section) {
return alphaIndex[sections[section]];
}
public int GetSectionForPosition(int position) {
return 1;
}
public Java.Lang.Object[] GetSections () {
return sectionsObjects;
}
有谁知道我该如何解决这个问题?
提前致谢。