corwin42 Expert Licensed User Longtime User Jul 12, 2011 #1 Hi Erel, If I create two or more instances of a widget on the homescreen is it possible to differentiate between them? Currently if I press the ImageView of the example Project all widget instances are updated. Is it possible to create more than one widget layout? If I try to call ConfigureHomeWidget() from the same service twice B4A tells me that it is only allowed once per service module. If I create a second service module for a second widget (with another layout) I get the following error: Compiling code. 0.05 Generating R file. Error AndroidManifest.xml:27: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/widgetservice_info'). Click to expand... Would be nice if this is possible so we can create different widget layouts for our apps.
Hi Erel, If I create two or more instances of a widget on the homescreen is it possible to differentiate between them? Currently if I press the ImageView of the example Project all widget instances are updated. Is it possible to create more than one widget layout? If I try to call ConfigureHomeWidget() from the same service twice B4A tells me that it is only allowed once per service module. If I create a second service module for a second widget (with another layout) I get the following error: Compiling code. 0.05 Generating R file. Error AndroidManifest.xml:27: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/widgetservice_info'). Click to expand... Would be nice if this is possible so we can create different widget layouts for our apps.
Erel B4X founder Staff member Licensed User Longtime User Jul 12, 2011 #2 For now you cannot differentiate between multiple instances of the same widget. This feature can be implemented with a help of a small library. I preferred to keep the main interface simpler as this feature is not needed in most cases. You can have several types of widgets in the same application. Each widget type should have its own service. If it doesn't work for you, please upload your project. Upvote 0
For now you cannot differentiate between multiple instances of the same widget. This feature can be implemented with a help of a small library. I preferred to keep the main interface simpler as this feature is not needed in most cases. You can have several types of widgets in the same application. Each widget type should have its own service. If it doesn't work for you, please upload your project.
corwin42 Expert Licensed User Longtime User Jul 12, 2011 #3 Erel said: For now you cannot differentiate between multiple instances of the same widget. This feature can be implemented with a help of a small library. I preferred to keep the main interface simpler as this feature is not needed in most cases. Click to expand... This is OK for me. Erel said: You can have several types of widgets in the same application. Each widget type should have its own service. If it doesn't work for you, please upload your project. Click to expand... I just doubled the service from the example, created a slightly different (smaller layout) and tried to rename all process_global variables but still get the error. Attachments TwoWidgets.zip TwoWidgets.zip 14.8 KB · Views: 440 Upvote 0
Erel said: For now you cannot differentiate between multiple instances of the same widget. This feature can be implemented with a help of a small library. I preferred to keep the main interface simpler as this feature is not needed in most cases. Click to expand... This is OK for me. Erel said: You can have several types of widgets in the same application. Each widget type should have its own service. If it doesn't work for you, please upload your project. Click to expand... I just doubled the service from the example, created a slightly different (smaller layout) and tried to rename all process_global variables but still get the error.
Erel B4X founder Staff member Licensed User Longtime User Jul 12, 2011 #4 This is a bug. It will be soon fixed. Currently each widget deletes the other widget files. Upvote 0
I Inman Well-Known Member Licensed User Longtime User Jul 12, 2011 #5 So once you fix the bug, it will be possible for an app to have multiple widgets of may be different sizes like 4x4, 1x3 etc..? Upvote 0
So once you fix the bug, it will be possible for an app to have multiple widgets of may be different sizes like 4x4, 1x3 etc..?
Erel B4X founder Staff member Licensed User Longtime User Jul 12, 2011 #6 Yes. The bug is already fix. I will wait awhile before releasing the updated version in case more bugs are found. Upvote 0
Yes. The bug is already fix. I will wait awhile before releasing the updated version in case more bugs are found.
touchsquid Active Member Licensed User Longtime User Jul 21, 2011 #7 I have created a couple of widgets which work, but I often get the message "no More room on this homescreen" when configuring, and the widgets cannot be moved, they always stay where the main panel upper left and top settings are. Upvote 0
I have created a couple of widgets which work, but I often get the message "no More room on this homescreen" when configuring, and the widgets cannot be moved, they always stay where the main panel upper left and top settings are.
Erel B4X founder Staff member Licensed User Longtime User Jul 22, 2011 #8 This is a different issue which is not related to Basic4android. Each widget takes several "cells". If there are no cells available in the current home screen then you cannot add any more widgets. Upvote 0
This is a different issue which is not related to Basic4android. Each widget takes several "cells". If there are no cells available in the current home screen then you cannot add any more widgets.
C csgoh Member Licensed User Longtime User Jan 10, 2012 #9 Same widget two instances Hi. is it possible to have two similar widgets on the same screen? What I want to achieve is that each widget instance on the screen has same layout but different contents. Currently I placed two similar widgets on screen, but when I click a button on one widget, the other widget button is also clicked. This is not what I want. I want each of the widget respond to their own event. Is this possible? Upvote 0
Same widget two instances Hi. is it possible to have two similar widgets on the same screen? What I want to achieve is that each widget instance on the screen has same layout but different contents. Currently I placed two similar widgets on screen, but when I click a button on one widget, the other widget button is also clicked. This is not what I want. I want each of the widget respond to their own event. Is this possible?
Erel B4X founder Staff member Licensed User Longtime User Jan 10, 2012 #10 This is currently not possible. You will need to create two different widgets that look alike. Upvote 0