Thx Mark, that did it for me :) On 17 apr, 19:18, Mark Murphy <[email protected]> wrote: > Dirk Vranckaert wrote: > > On my widget I'm having a button and a textView. When clicking that > > button some data is registered and I want the TextView to be updated. > > However I can't get to the TextView instance from within my Activity > > it seems. > > > Any ideas? > > Use a RemoteViews, as that is the only way to update an app widget. > > ComponentName me=new ComponentName(this, AppWidget.class); > RemoteViews updateViews=new RemoteViews("apt.tutorial", R.layout.widget); > AppWidgetManager mgr=AppWidgetManager.getInstance(this); > > // populate the RemoteViews > > mgr.updateAppWidget(me, updateViews); > > You will need to substitute in appropriate values for AppWidget and > apt.tutorial, but you should have most of that from your IntentService > or AppWidgetProvider already. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android 2.x Programming Books:http://commonsware.com/books > > -- > 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 > athttp://groups.google.com/group/android-developers?hl=en
-- 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

