Changing TextView on a homescreen widget

Put your problem here if it does not fit any of the other categories.

Changing TextView on a homescreen widget

Postby ozball » Sat Mar 05, 2011 4:14 pm

Hi, i'm trying to change the text on a textview for a homescreen widget. I created a class just for transferring a string to the widget.class and the main.class. The user gets to enter in text using a edittext they press the button when finished, this takes the text and sends it to the .class i made and holds it there. then for the widget.class i put
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. words words = new words();
  2.          text = words.getUserinput();
  3.         remoteViews.setTextViewText(, text);
Parsed in 0.011 seconds, using GeSHi
so it returns the string to widget.class and then i use setTextViewText to set the text... i put this code in the onUpdate method. Now i think the android:updatePeriodMillis="5000" line in widget_provider.xml is the interval in which the onUpdate method is executed?? soo when the string is changed, after 5 seconds the onUpdate should kick in and the textview should change... however it is not. Is my thought process correct on everything?
Once Poster
Once Poster
Posts: 1
Joined: Sat Mar 05, 2011 4:00 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 9 guests