• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How do I give my widget a name on the home screen?

jaykav99

Lurker
Seems like a stupid question, but when I add the widget for my finished app to my home screen, there isnt a name for it. And the book Im reading doesnt tell me.

Any help is appreciated, I check on the internet and this forum can't seem to get anywhere. I've tired including the Textview into my widget xml but that just makes the text show up on top of the widget itself. Seems like i need to create its own XML/Provider information.
 
Since posting this, i found out the manifest is the place but no matter where i put my label it wont show up on my phone or the emulator for that matter. I am using the samsung fascinate if that helps and i def setup my app as 2.1 as thats what the fascinate runs at. Please find my error im going crazy lol

HTML:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dummies.android.silentmodetoggle"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" 
android:label="@string/app_name"
android:debuggable="true">
<activity android:name=".MainActivity" 
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".AppWidget" 
android:label="@string/app_name"
android:icon="@drawable/icon">
<intent-filter>
<action 
android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_provider" /> 
</receiver>
<service android:name=".AppWidget$ToggleService"/>
</application>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-sdk android:minSdkVersion="7" />
</manifest>
 
Back
Top Bottom