Im trying to scroll a ListView to a particular position in an AppWidget.
However it does not do anything, i also tried the setPosit
Whit the information I have, I think that the widget doesn't invalidate itself so it doesn't so the changes on it. So I would suggest to refresh your widget. There are two ways to do that, the first one is:
appWidgetManager.updateAppWidget(widgetId, remoteViews);
and there is a second way only in case we don't have direct access to AppWidgetManager
/**
* Refresh the views on the widget
* NOTE: Use only in case we dont have direct acces to AppWidgetManager
*/
private void invalidateWidget() {
ComponentName widget = new ComponentName(this, YourWidgetProvider.class);
AppWidgetManager manager = AppWidgetManager.getInstance(this);
manager.updateAppWidget(widget, mRv);
}
Like that the changes should be reflected in the widget. If this doesn't work I am gonna need more details to figure out the problem and edit this answer. Hope it helps.