madam mar
asked on
Firemonkey android webbrowser and gesture
i asked the question in many places and seems no know are really know how this can be solved
i a trying to apply a on gesture event to the Twebbrowser
but it seems it does not work at all .
here is how i place the Twebbrowser
1 - i added Tlayout
2 - i added inside the Tlayout a Tpanel
3- i added inside the tpanel a Twebbrowser
also i have set webbrowser.hittest To True , then i dropped a gesture manager to the form then i set the gesture manager to the Twebbrowser Touch property .
then on gesture manager i have added the following code
sadly when i move my finger left or right it does not detect the gesture and never show the message that i set
why i cannot use gesture in twebbrowser ?
i a trying to apply a on gesture event to the Twebbrowser
but it seems it does not work at all .
here is how i place the Twebbrowser
1 - i added Tlayout
2 - i added inside the Tlayout a Tpanel
3- i added inside the tpanel a Twebbrowser
also i have set webbrowser.hittest To True , then i dropped a gesture manager to the form then i set the gesture manager to the Twebbrowser Touch property .
then on gesture manager i have added the following code
if EventInfo.GestureID = sgiLeft then
begin
showmessage('left moved');
Handled := true;
end;
sadly when i move my finger left or right it does not detect the gesture and never show the message that i set
why i cannot use gesture in twebbrowser ?
ASKER
i really needed to adjust some tlayout position when i move my finger left or right over webbrowser
What page (site) do you want to track? Is this for global usage? Do you consider using another implementation of web browser
like HTML rendering library. This one should work as it is native for Delphi.
like HTML rendering library. This one should work as it is native for Delphi.
ASKER
i tried this component it has various bugs that a destroyer to an android app . is there other alternative to htmlcomponent that you know ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it isn't compatible with seattle version
Because webbrowser on win platform is a wrapper over IE, on android platform is over native webview class.
This way, almost all is handled in webview and it is set as a topmost window over your form. So, any layout can't be "over" webview.
I think that only way is to do something similar how Emb. do it in FMX.Maps.Android unit.
They use androids GestureDetector class.
(look for InitGestureDetector, TDoubleTapListener, ....)
All of this requires a lot of work.
why you need this feature ?