How can I change the image displayed in the Android widget selection dialog?
2 answers
Specify the attributeandroid:previewImage
in the app widget metadata file:
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="146dip"
android:minHeight="146dip"
android:updatePeriodMillis="0"
android:initialLayout="@layout/widget"
android:autoAdvanceViewId="@+id/words"
android:previewImage="@drawable/preview"
android:resizeMode="vertical"
/>
(from this sample project )
+6
source to share
I got the same problem, tried everything, uninstalled the old previewImage, uninstalled / reinstalled the app, rebooted the device, synced the project with Gradle files, Invalidate Caches / Restart, nothing worked. Finally, I could only change it after changing the applicationId in the application build.gradle file .
0
source to share