In my activity, I'm trying to make decisions based on the text displayed on a button. I got it to work by doing:
if( startButton.getText() == "Stop" ) {
startButton.setText("Start");
} else {
startButton.setText("Stop");
}
But I'd like to do it in a way that is language independent, so by using the name of the string as it exists in strings.xml, i.e. "start_text" and "stop_text".
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments