当滚动框中填充的TListview远离屏幕并返回时,有没有办法避免Android上的延迟?看起来它似乎试图重新填充列表中的所有项目,然后才会出现在屏幕上。
示例代码:ScrollBox1 - 已签名'客户端',ScrollBox1上的ListView1,ScrollBox1上的Button1;
procedure TForm1.FormCreate(Sender: TObject);
var
LItem: TListViewItem;
I: Integer;
begin
//just...
ListView1.Height := ListView1.ItemAppearance.ItemHeight;
ListView1.Position.X := 0;
ListView1.Position.Y := 0;
// To achieve the best performance use BeginUpdate and EndUpdate.
ListView1.BeginUpdate;
try
for I := 1 to 3000 do
begin
LItem := ListView1.Items.Add;
LItem.Text := IntToStr(I);
end;
finally
ListView1.EndUpdate;
end;
//expand form
Button1.Position.X := 1000;
Button1.Position.Y := 1000;
end;