简体   繁体   English

android创建小部件菜单图标

[英]android create widget menu icon

when browsing the widget menu on Android 3.0+ some widgets have simple icons and others have more of a screenshot of what the widget actually looks like. 在Android 3.0+上浏览小部件菜单时,某些小部件具有简单的图标,而其他小部件则具有更多有关小部件实际外观的屏幕截图。

How would I portray the latter in my own widget? 我将如何在自己的小部件中描绘后者?

You can use the widget preview app on your Android emulator to take a screenshot of your widget and send it to yourself via email: 您可以在Android模拟器上使用小部件预览应用程序来获取小部件的屏幕截图,然后通过电子邮件将其发送给自己: 在此处输入图片说明

Then inside your appwidget-provider XML you can specify this: 然后,可以在您的appwidget-provider XML中指定以下内容:

<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    [...]
    android:previewImage="@drawable/preview"
    />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM