Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Android geture pan right and left


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0
madammar ellias

Posts: 111
Registered: 8/17/17
Android geture pan right and left  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 15, 2018 1:42 PM
i am trying to do a sliding panel with finger move using gesture

here is what i did


procedure TForm3.Panel1Gesture(Sender: TObject;
  const EventInfo: TGestureEventInfo; var Handled: Boolean);
begin
if (EventInfo.GestureID = igiPan) then
begin
Handled := True;
 
panel1.Position.x := max(170, EventInfo.Location.X);
 
 
end;
end;


and in gesture property i have set the stranded Left/Right property and the interactive gesture is set to pan

when i move my finger to right the gesture position moved to my finger postion but it pass the max value so its disappear from the screen

and when i move to left the position of the panel never set to 0 .

also when i move my finger up the gesture moved even if i set the standard left and right .

my goal were to swipe the panel with a finger move in the screen with maximum position to right and swipe it back to zero when moving left .

how can i do that properly ?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02