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);
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.
精彩评论