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?
Right-click in the widget title bar and select Rename widget in the context menu. Type and enter the custom name in the text field that appears. The custom name appears in the title bar.
First, touch hold an open space on your home screen. You'll see an option at the bottom of the screen to view the widgets drawer, which is where they dwell until summoned for duty. Select the widgets drawer, then browse through the choices.
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.
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