Android Question Is it possible to overwrite widget xml files with CreateResource feature?

corwin42

Expert
Licensed User
I'm currently a bit lazy to test it myself.

If I use Homescreen widgets with B4A there are some files automatically created in the res folder.

If I want to use a preview image for the widget I have to edit the <servicename>_info.xml file in the xml folder. Would it be possible to overwrite this auto generated file with the new CreateResource() feature of the manifest editor?
 

Erel

Administrator
Staff member
Licensed User
Yes.

For example:
B4X:
CreateResource(xml, widgetservice_info.xml,
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
   android:minWidth="140dp"
   android:minHeight="120dp"
   android:initialLayout="@layout/widgetservice_layout"
   android:updatePeriodMillis="12334" />
)
 
Upvote 0
Top