Referencing Android Views from within a Java class

carlos.loaisiga

New Member
I have a class that extends Activity and parses an xml file. The text I want from within the xml file is passed as arguments to a java class. The problem I have is that in the java class I want to reference android TextViews from the resource Layout folder so I can set the text to the String arguments I pass in. I guess I can extend the java class from Activity or pass in as an argument the current activity...are they the only to reference the files in res/layout? \[code\]public class xmlClass extends Activity{ //parse the xml MyDataFile mdf = new MyDataFile(arg1, arg2, arg3, arg4); }public class MyDataFile{ public MyDataFile(arg1, arg2, arg3, arg4) { } ******* Here I want to set the Text in a TextView to arg1;}\[/code\]
 
Back
Top