Kevin Well-Known Member Licensed User Longtime User Oct 14, 2011 #1 I've had a couple queries about adding widgets to my app and have a couple of questions: 1) In the tutorial thread, there were some posts about problems with widgets displaying correctly across multiple devices. Is this something that is a big issue and does it really require customizing the XML? I've tried to take extreme care in ensuring my app looks correct on all different devices and don't want to give customers something to complain about if the widgets aren't quite right. 2) Widgets are just a part of a normal app, right? So users could optionally use the widget or not use the widget, and this would not affect normal operation of my app at all, correct? 3) I have a free and pro version of my app and I only want the widget to be available in the pro version. I am desperately trying to keep things simple by using the exact same code for both with only a variable differentiating the two (and yes I understand the risks of doing this). Would this be possible with widgets? I.E., is there a "call" somewhere that calls the widget creation where I could only allow it to be added to the home screen if a variable is true (or false)? Or would I pretty much need to comment out an entire module and a couple lines of code before building the free version? Thanks! In case it isn't obvious, I am a total Widget :sign0104:!
I've had a couple queries about adding widgets to my app and have a couple of questions: 1) In the tutorial thread, there were some posts about problems with widgets displaying correctly across multiple devices. Is this something that is a big issue and does it really require customizing the XML? I've tried to take extreme care in ensuring my app looks correct on all different devices and don't want to give customers something to complain about if the widgets aren't quite right. 2) Widgets are just a part of a normal app, right? So users could optionally use the widget or not use the widget, and this would not affect normal operation of my app at all, correct? 3) I have a free and pro version of my app and I only want the widget to be available in the pro version. I am desperately trying to keep things simple by using the exact same code for both with only a variable differentiating the two (and yes I understand the risks of doing this). Would this be possible with widgets? I.E., is there a "call" somewhere that calls the widget creation where I could only allow it to be added to the home screen if a variable is true (or false)? Or would I pretty much need to comment out an entire module and a couple lines of code before building the free version? Thanks! In case it isn't obvious, I am a total Widget :sign0104:!
Erel B4X founder Staff member Licensed User Longtime User Oct 16, 2011 #2 1) Version 1.7 which will be released in a few days makes it simpler. You can now set your widgets to be centered automatically (related to the home screen cells). In most cases you will not need to modify any XML. 2) Yes. 3) Without removing the widget service module, the widget will appear in the widgets list. You can disable its functionality however. Upvote 0
1) Version 1.7 which will be released in a few days makes it simpler. You can now set your widgets to be centered automatically (related to the home screen cells). In most cases you will not need to modify any XML. 2) Yes. 3) Without removing the widget service module, the widget will appear in the widgets list. You can disable its functionality however.
Brad Active Member Licensed User Longtime User Oct 16, 2011 #3 Is there a way to assign the widget its own icon that is displayed in the widget list? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 17, 2011 #4 You can put a read-only image in res\drawable. For example put icon2.png. You will then need to modify res\xml\widgetservice_info.xml and add the following attribute: Code: Copy android:icon="@drawable/icon2" Then set it to be read-only as well. Upvote 0
You can put a read-only image in res\drawable. For example put icon2.png. You will then need to modify res\xml\widgetservice_info.xml and add the following attribute: Code: Copy android:icon="@drawable/icon2" Then set it to be read-only as well.