Hi!
I'm making an app with a widget, using the corwin's example, but I can't manage to set my own icon for the widget selector; I see the generic icon:
I correctly see my own icon in the app drawer. Also, when I start to drag that generic Icon, the icon dragged also is the correct icon.
My advancedwidget_info.xml:
My manifest:
Also; I've noticed that if i change the icon.png name in the drawable folder, aflter generating the app, a new-generic icon.png file is created in that folder...
Regards!
I'm making an app with a widget, using the corwin's example, but I can't manage to set my own icon for the widget selector; I see the generic icon:
I correctly see my own icon in the app drawer. Also, when I start to drag that generic Icon, the icon dragged also is the correct icon.
My advancedwidget_info.xml:
B4X:
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="70dp" android:minHeight="70dp"
android:minResizeWidth="70dp"
android:initialLayout="@layout/advancedwidget_layout_init"
android:previewImage="@drawable/icon"
android:configure="my.app.widgetconfig"
android:resizeMode="horizontal"
android:widgetCategory="home_screen|keyguard"
android:updatePeriodMillis="0" />
My manifest:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="13"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetReceiverAttribute(advancedwidget, android:icon, "@drawable/icon")
'End of default text.
AddActivityText(WidgetConfig, <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
</intent-filter>)
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
'End of default text.
AddReplacement(<action android:name="android.intent.action.MAIN" />, )
AddReplacement(<category android:name="android.intent.category.LAUNCHER" />, )
'RemovePermission(android.permission.WRITE_EXTERNAL_STORAGE)
Also; I've noticed that if i change the icon.png name in the drawable folder, aflter generating the app, a new-generic icon.png file is created in that folder...
Regards!