I just finished my first app, it works fine and I've made it a homescreen widget. But it doesn't have the name under it. The tutorial I am following says nothing about it, shouldn't this just be the name of the app and be pulled in automatically?
Asked
Active
Viewed 1.7k times
26
-
@AnthonyChatellier Your link doen't open. – AndroidDev Apr 30 '12 at 08:10
-
Thanks @Anshuman. This question has been answered here : http://stackoverflow.com/questions/2651631/android-home-screen-widget-icon-label-style/2652961#2652961 – Anthony Chatellier Apr 30 '12 at 19:49
2 Answers
59
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
Example of use in AndroidManifest.xml
:
<receiver android:name=".widget.MyWidgetProvider" android:label="My App Widget">
...
</receiver>
Note: this property was deprecated in API 21, but still works as of API 29.
-
7
-
5This doesn't add text under the widget on the home screen on Lollipop. – Etienne Lawlor May 17 '15 at 16:05
-
I don't have a solution for this. I ended up putting text into my app widget. Check out my widget here : https://play.google.com/store/apps/details?id=com.etiennelawlor.eggday – Etienne Lawlor Sep 01 '16 at 21:16
-
1Nice! Note that the correct ref page is for
, https://developer.android.com/guide/topics/manifest/receiver-element. This field is not deprecated but it is supplanted in API 31 by android:description on the – Jerry101 Oct 28 '21 at 22:44.
0
You can set it in the AndroidManifest.xml. App Widgets might be of some help.

ninjasense
- 13,756
- 19
- 75
- 92