yangyxd / FMXUI

FMX跨平台基础UI库
MIT License
261 stars 96 forks source link

TListViewEx can still be pulled even if EnablePullRefresh and EnablePullLoad are set to False #32

Closed helgovic closed 3 years ago

KngStr commented 3 years ago

Turn off the DragScroll

helgovic commented 3 years ago

Still pullable.

KngStr commented 3 years ago

Mobile platform? On mobile platform, it's always pullable.

helgovic commented 3 years ago

how come?

helgovic commented 3 years ago

Never mind. I turned off with this change ti ui.Standard.

procedure TScrollView.VScrollChange(Sender: TObject);
var
  MaxScrollViewPos: Single;
begin
  MaxScrollViewPos := GetMaxScrollViewPos;
  if FScrolling or (FAniCalculations = nil) then Exit;
  FScrolling := True;
  ViewportPosition := TPointF.Create(ViewportPosition.X, VScrollBar.ValueD);
  if not DragScroll
  then
    begin
      if ViewportPosition.Y < 0
      then
        ViewportPosition := TPointF.Create(ViewportPosition.X, 0);
      if ViewportPosition.Y > MaxScrollViewPos
      then
        ViewportPosition := TPointF.Create(ViewportPosition.X, MaxScrollViewPos);
    end;
  if not IsOpaque then
    UpdateEffects;
  if Assigned(FOnScrollChange) then
    FOnScrollChange(self);
  FAniCalculations.Shown := True;
  FScrolling := False;
end;