Application Tool Kit

Multi widget in one application

Hi,

We have requirement, where we have to embed multi singleLine widget in one application.
Now the problem is, embedding around 8-10 singleLine widget in one application, making the application slow in following style.
1. It writes little late than usual.
2. It responds little late than usual.
3. It recognise little late than usual.

Visual studio is running fine. Other buttons and boxes in the application, which are not merged with SingleLine widget are also running fine.
And we really have to use many(more than 50 widgets in one application) widgets in one application.

Please help us in handling this.


Regards
Satyendra


Dear Mithilesh,

you could indeed change the position of the writing area as follows: On top of your frame layout, create one layout with your form, and one with the Single Line Text Widget. When selecting a field, you can then decide to load the widget below/above/... the field of your form you select.

For such purpose, we do not have any code sample available. You should nevertheless be able to find information on the internet.

Best regards,

Olivier

Hi Oliver,

Do You mean we have one writing area and we keep on changing the position of it?
That could help!:)
Do you have any implementation suggestions?
Any function call to change position dynamically of something of this sort?


Thanks,
Mithilesh

Dear Mithilesh,

based on the specification you provided, we do not see other way to proceed with so many fields.

How about moving the writing area next to the field each time you fill in a new one?

Best regards,

Olivier

Hi Oliver,

Thanks for the suggestion.
Actually in our use case the user would write on each of fields(not a single writing area).
That is why we went ahead having one widget per field mapping.

I am afraid that have a single writing area is not what we intend to develop.
Can you please give us some other suggestion on how to overcome this challenge.

Thanks,
mithilesh

Dear Mithilesh,

thank you for the update, we now better understand your use-case.

Actually, I would rather recommend you proceed as follows, using only one instance of the Single Line Text Widget:
-When typing in a field, start the Single Line Text Widget.
-If a first start, proceed to the whole initialization in the onCreate function. If not, you can just call the configure method, to set the custom configuration you prefer (e.g. mWidget.configure(en_US, cur_text);)
-You can of course choose to display the widget where you prefer (e.g. at the bottom, at the top...).
-The user can now write in the writing area of the Widget.
-When switching to a new field, you should get the Text result. This can be done calling the getText function in the onTextChanged function:
public void onTextChanged(SingleLineWidgetApi w, String text, boolean intermediate) {
String textResult = w.getText();

-You can then store this text result, and display it in the corresponding field of your form.
-When switching to a new field, clear the widget calling mWidget.clear(); and just configure your widget with the corresponding configuration (mWidget.configure(en_US, YOUR_CONFIGURATION), see above)
-...
-If you want to edit a field that was previously written, when typing it, start and configure the widget. You can re-enter the previous text calling the setText function (e.g. mWidget.setText(my text to update);). Please note this will not display the previous ink, but only the text result.

Proceeding this way, you will then need only one instance of the widget.

Let us know if you have further questions.

Best regards,

Olivier

Hi Oliver,

Our application has a form like structure with around 120 fields.
Each of the field in the form should identify a text or number depending on requirements.
Please guide how to proceed.

Regards,
Mithilesh

Dear Mithilesh,

This is a limit you are reaching, nothing can be done in the Widget by itself.

Is it possible to learn more about your specification, to think of another way to proceed? Indeed, we are puzzled why you need so many instances at the same time.

Best regards,

Olivier

Hi oliver,

We are using >100 single line widgets.
When we are calling RegisterCertificate on the 99th widget the call is blocking and not returning, i.e.it seems like we are only able to register 98 widgets and RegisterCertificate neither returns TRUE or FALSE for the 99th one.

We are blocked on this, so can you please help us ASAP.

Thanks in Advance,
Mithilesh

Dear Satyendra,

thank you for your question.

Indeed, in theory there is no limit on the number of instances you can create with the widget, except the device capability.

You easily understand the more instances you create, the more the ATK is demanding from a CPU point of view. So we are not surprised by the behavior you are facing. On your side, can't you update the application to reduce the number of instances, or ideally load only one instance at a time?
Also, do you mandatory need the Single Line Text Widget? Is it to recognize isolated characters? In that latter case, you could use the Single Char Widget, which is less demanding than the Single Line.

If you need more help, feel free to provide with more specification, so that we may think of another solution?

Best regards,

Olivier

Login or Signup to post a comment