Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Android Studio and Java calling a button press variable  RSS feed

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 4635
129
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have moved the thread to Mobile -> Android.
 
The moustache of a titan! The ad of a flea:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!