It would be Ok, as long as:
- updateAppWidgetLayout constructs a single RemoteViews;
- this RemoteViews is passed into updateStatus;
- updateStatus calls remoteViews.setTextViewText.
You can call setTextViewText multiple times on a *single* RemoteViews,
but that's kind of pointless, because only the most recent value will
end up showing.
Remember that the widget won't be updated until you call
AppWidgetManager.updateAppWidget, so if you're looking for some sort of
progress indicator, that's not it.
-- Kostya
05.05.2011 19:39, Niall ?????:
Suppose I have a status notification TextView on my appwidget. During
my big update function (that returns the single RemoteViews object)
would be be OK to call a method that'd update the value of the text?
Like:
void updateStatus( String str ) {
// update the status text R.id.statusUpdate
}
RemoteViews updateAppWidgetLayout( Context context, int id ) {
updateStatus( "starting update" );
// do everything else
// And here (end of function) manually set the R.id.statusUpdate
view via the RemoteViews I'm returning.
return remoteViews;
}
Where the big RemoteViews isn't touched? Or will that corrupt the
process?
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en