My app preview image looks like this:
How can I make it look like the WhatsApp Chat preview, small with shadow. Also other apps in my phone use the same type of preview.
My widget xml:
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/appwidget"
android:minHeight="40dp"
android:minWidth="320dp"
android:previewImage="@mipmap/ic_launcher"
android:updatePeriodMillis="300000" >
</appwidget-provider>
Manifest:
<receiver
android:name=".activities.MyWidgetProvider"
android:label="Example Widget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_info" />
</receiver>
UPDATE:
Actually I have noticed this all shortcuts and not widgets, they all have this look.
You have set your launcher icon as widget preview image.
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
...
android:previewImage="@drawable/widget_preview">
</appwidget-provider>
I suggest you to make a screenshot of your widget with the emulator, which has an application (Widget Preview) for creating a preview with just the right size.
Then, you can also edit the picture if you are not satisfied.
Anyway, be sure to put it on drawable-nodpi.
Official guide to follow: https://developer.android.com/guide/topics/appwidgets/index.html#preview For other dev experience, see this link: Android Widget: previewImage size
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With