Android Widget Update TextView Text -


i have android widget updated 1 time per day (as stated in providerinfo.xml file). here is, currently, onupdate method:

public void onupdate(context context, appwidgetmanager appwidgetmanager, int[] appwidgetids)  {         remoteviews rvs = new remoteviews(context.getpackagename(), r.layout.main);         rvs.settextviewtext(r.id.textviewquote, "we updated! yay!");         appwidgetmanager.updateappwidget(new componentname(context, main.class), rvs); } 

however, textview never changes. onupdate called @ beginning, when widget first created right? how 1 change text in textview?

thanks

edit: provider info:

<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minwidth="294dp" android:minheight="72dp" android:updateperiodmillis="86400000" android:initiallayout="@layout/main"> 

and manifest:

<receiver android:name=".main" >        <intent-filter>             <action android:name="android.appwidget.action.appwidget_update" />        </intent-filter>        <meta-data android:name="android.appwidget.provider"                   android:resource="@xml/appwidgetproviderinfo" /> </receiver> 

update: method onupdate() not getting called. can tell me why?

major update: in android 2.3, onupdate() method not called, in android 2.2, called. wonder if bug, or perhaps changed way widgets work.

check updates:

major update: in android 2.3, onupdate() method not called, in android 2.2, called. wonder if bug, or perhaps changed way widgets work.

i'm accepting answer. we'll see if google it.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -