JLB
JLB

Reputation: 242

Android Widget not responding

I have an issue I can't seem to figure out... I have a widget for my app that I'm using with a configure option to control what/how the widget launches the app. When the user adds the widget, it shows a listview of options allowing the user to select a part of the app to have the widget navigate/launch. Once the user makes a selection, it changes the textview on the widget to the selected option. Now... Problem is once I push the changes to the appWidgetManager to reflect the textview change, the widget no longer responds to presses. So basically, my widgets only work if I don't use any configure option. Any ideas?

// Tell the widget manager
appWidgetManager.updateAppWidget(appWidgetId, views);

Upvotes: 2

Views: 580

Answers (1)

Mark
Mark

Reputation: 558

On every update you have to set the OnClick intents again

views.setOnClickPendingIntent(R.id.bButton1, pendingIntent);

Just guessing. Your description is a bit vague. If my suggestion doesn't help, post the code how you create and push the update.

Upvotes: 3

Related Questions