Android Studio and Java calling a button press variable
posted 1 year ago
I am using Android Studio to create a small app as an exercise, and I have hit a stumbling block of sorts.
I want my Android Screen to show the message "you have choosen " + the button press they just hit. In this instance a brand of denim jeans.
Is there anyway to get the .getText() from the toast to print on the screen, I would normally just type system.out.println("you have choosen "+getText);
But the XML format of Android doesn't seem to allow that command.
Any help is much appreciated.
PS: if this is the wrong forum for this question, I apologize, feel free to move it to the appropriate section.