見出し画像

"Widget Preview" app missing from the Android emulator? It's here!

This says:

<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
  ...
  android:previewImage="@drawable/preview">
</appwidget-provider>
To help create a preview image for your app widget (to specify in the previewImage field), the Android emulator includes an application called "Widget Preview". To create a preview image, launch this application, select the app widget for your application and set it up how you'd like your preview image to appear, then save it and place it in your application's drawable resources.

But the application is missing on the latest Android system image!

The "Widget Preview" app will only show up when running an older version of Android on an emulator (API 26 or lower).


So how do generate a preview image?

Future readers, I solved this by using a newer android application called "Widget Preview".

画像1

画像2

画像3

After the preview has been created, the app gives you the option of emailing it so you can save it locally and later to the drawables folder of your project.

Hope that solves it for you too!


この記事が参加している募集

この記事が気に入ったらサポートをしてみませんか?