What are you meaning to do? In the java code you can use setText to set it to a new String resource in the Strings.xml file or in the java code you can setText to something that's not specifically in the Strings.xml file (just a standard string instead). I don't think the java code can change the actual strings in Strings.xml otherwise.