Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Scrollable form demo does not work



Permlink Replies: 19 - Last Post: May 9, 2017 10:37 PM Last Post By: Malcolm Taylor
Erik Bellaard

Posts: 35
Registered: 5/30/00
Scrollable form demo does not work
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 27, 2017 5:33 AM
Hi,

using : Delphi Tokyo, Samsung S4 with Android 5.0.1

The demo [ http://docwiki.embarcadero.com/CodeExamples/XE8/en/FMX.Mobile.ScrollableForm_Sample ] does not work on my device.
I've used Google a lot, but did not get a good answer.
Who can tell me what's wrong ( and even better, what is the solution ) ?

Edited by: Erik Bellaard on Apr 27, 2017 5:34 AM
Markus Humm

Posts: 4,864
Registered: 11/9/03
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 27, 2017 10:26 AM   in response to: Erik Bellaard in response to: Erik Bellaard
Am 27.04.2017 um 14:34 schrieb Erik Bellaard:
Hi,

using : Delphi Tokyo, Samsung S4 with Android 5.0.1

The demo [ http://docwiki.embarcadero.com/CodeExamples/XE8/en/FMX.Mobile.ScrollableForm_Sample ] does not work on my device.
I've used Google a lot, but did not get a good answer.
Who can tell me what's wrong ( and even better, what is the solution ) ?

Why not start with telling us what doesn't work for you in that demo?
For instance: does it compile? Can it be installed and run on the
device? Can't it scroll or does it crash etc.?

Greetings

Markus
Roy Woll

Posts: 25
Registered: 11/26/06
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 27, 2017 12:35 PM   in response to: Markus Humm in response to: Markus Humm
Markus,

FYI - OnVirtualKeyboardShown Broken in Tokyo for Android

The changes made in Tokyo for Android have broken the virtual keyboard notification. The form event OnVirtualKeyboardShown no longer fires so its impossible to scroll the form to keep the editor in view. This worked in Berlin and prior releases.

https://quality.embarcadero.com/browse/RSP-17932?filter=-2

Roy
Dave Nottage

Posts: 1,653
Registered: 1/7/00
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 27, 2017 2:20 PM   in response to: Roy Woll in response to: Roy Woll
Roy Woll wrote:

FYI - OnVirtualKeyboardShown Broken in Tokyo for Android

The changes made in Tokyo for Android have broken the virtual keyboard notification. The form event
OnVirtualKeyboardShown no longer fires so its impossible to scroll the form to keep the editor in view. This worked
in Berlin and prior releases.

https://quality.embarcadero.com/browse/RSP-17932?filter=-2

See my comment and attached project

--
Dave Nottage [MVP, TeamB]
Hints, tips and tricks at: http://www.delphiworlds.com/blog
Markus Humm

Posts: 4,864
Registered: 11/9/03
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 28, 2017 8:31 AM   in response to: Dave Nottage in response to: Dave Nottage
Am 27.04.2017 um 23:20 schrieb Dave Nottage (TeamB):
Roy Woll wrote:

FYI - OnVirtualKeyboardShown Broken in Tokyo for Android

The changes made in Tokyo for Android have broken the virtual keyboard notification. The form event
OnVirtualKeyboardShown no longer fires so its impossible to scroll the form to keep the editor in view. This worked
in Berlin and prior releases.

https://quality.embarcadero.com/browse/RSP-17932?filter=-2

See my comment and attached project

Ok, thanks for that. I voted for this as supporting such a thing is
important and I'd even like EMBT to provide some even simpler form of
support for such kleyboard issues.

Greetings

Markus
Malcolm Taylor

Posts: 138
Registered: 7/16/01
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 29, 2017 1:21 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 27.04.2017 um 23:20 schrieb Dave Nottage (TeamB):
Roy Woll wrote:

FYI - OnVirtualKeyboardShown Broken in Tokyo for Android

The changes made in Tokyo for Android have broken the virtual
keyboard notification. The form event >> OnVirtualKeyboardShown no
longer fires so its impossible to scroll the form to keep the editor
in view. This worked >> in Berlin and prior releases.

Ok, thanks for that. I voted for this as supporting such a thing is
important and I'd even like EMBT to provide some even simpler form of
support for such kleyboard issues.

Greetings

Markus

Markus, I could not agree more with you.

Dave, I see that the 'Chinese' vkhelper has a note in its header as
follows:
* Fixed: When the scrollbox is scrolling,the adjust is too early
and makes position not correct
This supports your comment about timing.

I am testing their (Chinese) latest version of qdac_fmx_vkhelper.pas
dated 2017.3.27 and with Tokyo it scrolls correctly in my fixed
orientation app. However the ReturnKeyType=Next which was working
correctly in Berlin is no longer working all the time. It (Next) does
appear to work/fail consistently but I have not spotted the pattern yet.

( I got the .zip at item 3 on this page: http://blog.qdac.cc/?p=4485 )

Malcolm
Markus Humm

Posts: 4,864
Registered: 11/9/03
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 29, 2017 11:23 PM   in response to: Malcolm Taylor in response to: Malcolm Taylor
Am 29.04.2017 um 10:21 schrieb Malcolm Taylor:
Markus Humm wrote:

Am 27.04.2017 um 23:20 schrieb Dave Nottage (TeamB):
Roy Woll wrote:

FYI - OnVirtualKeyboardShown Broken in Tokyo for Android

The changes made in Tokyo for Android have broken the virtual
keyboard notification. The form event >> OnVirtualKeyboardShown no
longer fires so its impossible to scroll the form to keep the editor
in view. This worked >> in Berlin and prior releases.

Ok, thanks for that. I voted for this as supporting such a thing is
important and I'd even like EMBT to provide some even simpler form of
support for such kleyboard issues.

Greetings

Markus

Markus, I could not agree more with you.

Hello,

you might file a QP feature request about this and I'd happily vote for it!


Dave, I see that the 'Chinese' vkhelper has a note in its header as
follows:
* Fixed: When the scrollbox is scrolling,the adjust is too early
and makes position not correct
This supports your comment about timing.

I am testing their (Chinese) latest version of qdac_fmx_vkhelper.pas
dated 2017.3.27 and with Tokyo it scrolls correctly in my fixed
orientation app. However the ReturnKeyType=Next which was working
correctly in Berlin is no longer working all the time. It (Next) does
appear to work/fail consistently but I have not spotted the pattern yet.

( I got the .zip at item 3 on this page: http://blog.qdac.cc/?p=4485 )

Malcolm

Also detecting return pressed when being in a TEdit is not too easy as
well, as different Android phones seem to handle this differently.

Most send CR to the edit, a Nexus 4 seems to send LF and a LG L50
doesn't seem to send anything...

Greetings

Markus
Malcolm Taylor

Posts: 138
Registered: 7/16/01
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 30, 2017 12:46 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

Am 29.04.2017 um 10:21 schrieb Malcolm Taylor:
Markus Humm wrote:

Am 27.04.2017 um 23:20 schrieb Dave Nottage (TeamB):
Roy Woll wrote:

FYI - OnVirtualKeyboardShown Broken in Tokyo for Android

The changes made in Tokyo for Android have broken the virtual
keyboard notification. The form event >> OnVirtualKeyboardShown no
longer fires so its impossible to scroll the form to keep the
editor >> in view. This worked >> in Berlin and prior releases.

Ok, thanks for that. I voted for this as supporting such a thing is
important and I'd even like EMBT to provide some even simpler form
of >> support for such kleyboard issues.

Greetings

Markus

Markus, I could not agree more with you.

Hello,

you might file a QP feature request about this and I'd happily vote
for it!


Dave, I see that the 'Chinese' vkhelper has a note in its header as
follows:
* Fixed: When the scrollbox is scrolling,the adjust is too early
and makes position not correct
This supports your comment about timing.

I am testing their (Chinese) latest version of qdac_fmx_vkhelper.pas
dated 2017.3.27 and with Tokyo it scrolls correctly in my fixed
orientation app. However the ReturnKeyType=Next which was working
correctly in Berlin is no longer working all the time. It (Next)
does appear to work/fail consistently but I have not spotted the
pattern yet.

( I got the .zip at item 3 on this page:
http://blog.qdac.cc/?p=4485 )

Malcolm

Also detecting return pressed when being in a TEdit is not too easy as
well, as different Android phones seem to handle this differently.

Most send CR to the edit, a Nexus 4 seems to send LF and a LG L50
doesn't seem to send anything...

Greetings

Markus

I have made a discovery and hope to post about it when I understand
better.
My dilemma is that this is Android specific so should go into the
Android specific ng. But that it is now being polluted with spam (Is
the EMB love affair with Android over?).
But it is also about a 3rd party contribution so should maybe go there.

But on balance I like qdac_fmx_vkhelper.pas which is easy to use,
scrolls well, handles orientation changes acceptably, but has a curious
quirk with its NextHelper in Tokyo (works in Berlin) which I would bet
is down to Tokyo's 'problems'.

Malcolm
Markus Humm

Posts: 4,864
Registered: 11/9/03
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 1, 2017 12:08 AM   in response to: Malcolm Taylor in response to: Malcolm Taylor
Am 30.04.2017 um 09:46 schrieb Malcolm Taylor:
Markus Humm wrote:


Also detecting return pressed when being in a TEdit is not too easy as
well, as different Android phones seem to handle this differently.

Most send CR to the edit, a Nexus 4 seems to send LF and a LG L50
doesn't seem to send anything...

Greetings

Markus

I have made a discovery and hope to post about it when I understand
better.
My dilemma is that this is Android specific so should go into the
Android specific ng. But that it is now being polluted with spam (Is
the EMB love affair with Android over?).

No it's not over. Sometimes Rudy finds the time to remove some spam
there and I'm annoyed about this as well. But it's difficult to do
something about this without changing to full moderation where all posts
have to be apporoved by some admin before getting visible.

Those silly spammers simply create a new account for their next round
and they don't get it that the audience there is comparatively limited
and will most likely not react on their spam so no income is being
generated.

Greetings

Markus
Dave Nottage

Posts: 1,653
Registered: 1/7/00
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 1, 2017 3:35 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

No it's not over. Sometimes Rudy finds the time to remove some spam
there and I'm annoyed about this as well.

I used to remove the spam messages, however I've been short on time, and EMBT appears to be also, since they're yet to
remove them, and/or create measures to prevent the messages automatically. I'd be very surprised if that isn't
possible; it's a matter of spending the time on it.

--
Dave Nottage [MVP, TeamB]
Hints, tips and tricks at: http://www.delphiworlds.com/blog
Markus Humm

Posts: 4,864
Registered: 11/9/03
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 1, 2017 10:39 AM   in response to: Dave Nottage in response to: Dave Nottage
Am 01.05.2017 um 12:35 schrieb Dave Nottage (TeamB):
Markus Humm wrote:

No it's not over. Sometimes Rudy finds the time to remove some spam
there and I'm annoyed about this as well.

I used to remove the spam messages, however I've been short on time, and EMBT appears to be also, since they're yet to
remove them, and/or create measures to prevent the messages automatically. I'd be very surprised if that isn't
possible; it's a matter of spending the time on it.

Hello,

I guess so, but to be honest: who's got time nowadays? ;-)

Greetings

Markus
Ederson Selvati

Posts: 32
Registered: 12/2/10
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 4:33 PM   in response to: Malcolm Taylor in response to: Malcolm Taylor
Malcolm Taylor wrote:
Markus Humm wrote:

Am 29.04.2017 um 10:21 schrieb Malcolm Taylor:
Markus Humm wrote:

Am 27.04.2017 um 23:20 schrieb Dave Nottage (TeamB):
Roy Woll wrote:

FYI - OnVirtualKeyboardShown Broken in Tokyo for Android

The changes made in Tokyo for Android have broken the virtual
keyboard notification. The form event >> OnVirtualKeyboardShown no
longer fires so its impossible to scroll the form to keep the
editor >> in view. This worked >> in Berlin and prior releases.

Ok, thanks for that. I voted for this as supporting such a thing is
important and I'd even like EMBT to provide some even simpler form
of >> support for such kleyboard issues.

Greetings

Markus

Markus, I could not agree more with you.

Hello,

you might file a QP feature request about this and I'd happily vote
for it!


Dave, I see that the 'Chinese' vkhelper has a note in its header as
follows:
* Fixed: When the scrollbox is scrolling,the adjust is too early
and makes position not correct
This supports your comment about timing.

I am testing their (Chinese) latest version of qdac_fmx_vkhelper.pas
dated 2017.3.27 and with Tokyo it scrolls correctly in my fixed
orientation app. However the ReturnKeyType=Next which was working
correctly in Berlin is no longer working all the time. It (Next)
does appear to work/fail consistently but I have not spotted the
pattern yet.

( I got the .zip at item 3 on this page:
http://blog.qdac.cc/?p=4485 )

Malcolm

Also detecting return pressed when being in a TEdit is not too easy as
well, as different Android phones seem to handle this differently.

Most send CR to the edit, a Nexus 4 seems to send LF and a LG L50
doesn't seem to send anything...

Greetings

Markus

I have made a discovery and hope to post about it when I understand
better.
My dilemma is that this is Android specific so should go into the
Android specific ng. But that it is now being polluted with spam (Is
the EMB love affair with Android over?).
But it is also about a 3rd party contribution so should maybe go there.

But on balance I like qdac_fmx_vkhelper.pas which is easy to use,
scrolls well, handles orientation changes acceptably, but has a curious
quirk with its NextHelper in Tokyo (works in Berlin) which I would bet
is down to Tokyo's 'problems'.

Malcolm

Hi Malcolm

Is version (http://blog.qdac.cc/?p=4485) working in Berlin? I am receiving an error where the Class TAndroidApplicationGlue not found. Missing unit in the uses clause?

Ederson Selvati
Dave Nottage

Posts: 1,653
Registered: 1/7/00
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 5:40 PM   in response to: Ederson Selvati in response to: Ederson Selvati
Is version (http://blog.qdac.cc/?p=4485) working in Berlin? I am receiving an error where the Class TAndroidApplicationGlue not found. Missing unit in the uses clause?

That's for Tokyo, not Berlin

--
Dave Nottage [TeamB]
Find hints tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Malcolm Taylor

Posts: 138
Registered: 7/16/01
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 10:33 PM   in response to: Ederson Selvati in response to: Ederson Selvati
Ederson Selvati wrote:

Malcolm Taylor wrote:
Markus Humm wrote:

Am 29.04.2017 um 10:21 schrieb Malcolm Taylor:
Markus Humm wrote:

Am 27.04.2017 um 23:20 schrieb Dave Nottage (TeamB):
Roy Woll wrote:

FYI - OnVirtualKeyboardShown Broken in Tokyo for Android

The changes made in Tokyo for Android have broken the virtual
keyboard notification. The form event >>
OnVirtualKeyboardShown no >> longer fires so its impossible to
scroll the form to keep the editor >> in view. This worked >> in
Berlin and prior releases.

Ok, thanks for that. I voted for this as supporting such a
thing is >> important and I'd even like EMBT to provide some even
simpler form of >> support for such kleyboard issues.

Greetings

Markus

Markus, I could not agree more with you.

Hello,

you might file a QP feature request about this and I'd happily
vote for it!


Dave, I see that the 'Chinese' vkhelper has a note in its
header as follows:
* Fixed: When the scrollbox is scrolling,the adjust is too
early and makes position not correct
This supports your comment about timing.

I am testing their (Chinese) latest version of
qdac_fmx_vkhelper.pas dated 2017.3.27 and with Tokyo it scrolls
correctly in my fixed orientation app. However the
ReturnKeyType=Next which was working correctly in Berlin is no
longer working all the time. It (Next) does appear to
work/fail consistently but I have not spotted the pattern yet.

( I got the .zip at item 3 on this page:
http://blog.qdac.cc/?p=4485 )

Malcolm

Also detecting return pressed when being in a TEdit is not too
easy as well, as different Android phones seem to handle this
differently.

Most send CR to the edit, a Nexus 4 seems to send LF and a LG L50
doesn't seem to send anything...

Greetings

Markus

I have made a discovery and hope to post about it when I understand
better.
My dilemma is that this is Android specific so should go into the
Android specific ng. But that it is now being polluted with spam
(Is the EMB love affair with Android over?).
But it is also about a 3rd party contribution so should maybe go
there.

But on balance I like qdac_fmx_vkhelper.pas which is easy to use,
scrolls well, handles orientation changes acceptably, but has a
curious quirk with its NextHelper in Tokyo (works in Berlin) which
I would bet is down to Tokyo's 'problems'.

Malcolm

Hi Malcolm

Is version (http://blog.qdac.cc/?p=4485) working in Berlin? I am
receiving an error where the Class TAndroidApplicationGlue not found.
Missing unit in the uses clause?

Ederson Selvati

As Dave said. You need to find the version before the one for Tokyo,
but I don't have a link. :(

Malcolm
Erik Bellaard

Posts: 35
Registered: 5/30/00
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 30, 2017 12:56 AM   in response to: Malcolm Taylor in response to: Malcolm Taylor
I tried this unit and I am happy ! I does what I want.
Thanks a lot Malcolm :-)

Erik
Malcolm Taylor

Posts: 138
Registered: 7/16/01
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 30, 2017 2:22 AM   in response to: Malcolm Taylor in response to: Malcolm Taylor
OK, here's what I have found using the qdac_fmx_vkhelper.pas
It seems to me that the issue with the built-in TVKNextHelper could be
solved by someone more capable than me!

If interested, please try something like this:

1. Create a new Multi-Device project for the Android platform, I named
my one VKTest.
2. Drop five TEdits on the Form and space them vertically so that some
do not and others do require to be scrolled by the VKbd.
3. Make sure they all have TabStop=True and ReturnKeyType=Next
(actually the last can be = Default ot whatever)
4. Add qdac_fmx_vkhelper to uses clause and make sure the unit it
findable (in project folder for now?)

Run this on a device and observe that the Return key does not (or
certainly not on all TEdits) jump to the next TEdit

Restart the app and this time:
1. Tap on the first TEdit and immediately close down the VKbd (use the
virtual back key not the return key)
2. Repeat for each TEdit in turn.
3. Now tap on first TEdit, tap VKbd Return key and .. wow it will 'tab'
to the next .. and so on..
4. If your final TEdit has KillFocusByReturn=True, then the VKbd should
close

Now, go figure! It looks to me as if Tokyo is not providing the
TVKNextHelper procedure with the complete TabList it needs until after
a full cycle. Maybe some genius can suggest a solution?

Other things to confirm are my observations that:
* the scrolling works 'correctly'
* changing orientation from portrait to landscape works 'correctly'
* changing orientation from landscape to portrait works reasonably
well, a minor imperfection being that it does not change the viewport
top even if there would be space. But that would just be a nice touch.

Now, how do we get the qdac_fmx_vkhelper.pas developers to investigate
the 'NextHelper' issue?

Malcolm
Malcolm Taylor

Posts: 138
Registered: 7/16/01
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 9, 2017 10:37 PM   in response to: Malcolm Taylor in response to: Malcolm Taylor
For the record, the pre-Tokyo version I was using also has that issue
with its NextHelper.

Malcolm
Erik Bellaard

Posts: 35
Registered: 5/30/00
Re: Scrollable form demo does not work [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 28, 2017 3:51 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:
Am 27.04.2017 um 14:34 schrieb Erik Bellaard:
Hi,

using : Delphi Tokyo, Samsung S4 with Android 5.0.1

The demo [ http://docwiki.embarcadero.com/CodeExamples/XE8/en/FMX.Mobile.ScrollableForm_Sample ] does not work on my device.
I've used Google a lot, but did not get a good answer.
Who can tell me what's wrong ( and even better, what is the solution ) ?

Why not start with telling us what doesn't work for you in that demo?
For instance: does it compile? Can it be installed and run on the
device? Can't it scroll or does it crash etc.?

Greetings

Markus

Sorry Markus, I had to write that the virtual keyboard goes over the edit component, so the Tedit is not visible while typing

greetings
Erik
James Mack

Posts: 2
Registered: 8/16/04
Re: Scrollable form demo does not work
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2017 12:15 AM   in response to: Erik Bellaard in response to: Erik Bellaard
For me, in the demo the bottommost edit box is covered when it's the first one I try, but if I first try another field, then click the "No Edit Control" button, then try the bottom-most, it will correctly be scrolled into position.
Erik Bellaard

Posts: 35
Registered: 5/30/00
Re: Scrollable form demo does not work
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2017 6:10 AM   in response to: James Mack in response to: James Mack
James Mack wrote:
For me, in the demo the bottommost edit box is covered when it's the first one I try, but if I first try another field, then click the "No Edit Control" button, then try the bottom-most, it will correctly be scrolled into position.

I first do a SetFocus on the first edit field in the top of the "screen". Maybe that will help you ?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02