我如何给Android应用的Widget一个标签/名称 [英] How do I give a Android App Widget a Label/Name
问题描述
我刚刚完成我的第一个应用程序,它工作正常,我已经做了它的主屏幕小部件。但它不具有下它的名称。我下面教程没有提到它,不如果这仅仅是应用程序的名称,并在自动拉?
I just finished my first app, it works fine and I've made it a home screen widget. But it doesn't have the name under it. The tutorial i am following says nothing about it, Shouldnt this just be the name of the app and be pulled in automatically?
如果没有得到一个任何帮助有AP preciated。
If not any help on getting one there is appreciated.
推荐答案
您可以将您的应用程序窗口小部件的名称中加入的android显示在部件选择器:标签=的名称我appwidget
来处理在的AndroidManifest.xml
appwidget相关意向接收器。它被记录在一个有点模糊的地方:<一href=\"http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html#label\">http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html#label
You can set the name of your app widget to be displayed in the widget picker by adding android:label="the name of my appwidget"
to the receiver that handles appwidget related intents in AndroidManifest.xml
. It is documented in a somewhat obscure place: http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html#label
这篇关于我如何给Android应用的Widget一个标签/名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!