Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Android Studio and Java calling a button press variable

Ranch Hand
Posts: 39
  • 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.
Posts: 7108
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have moved the thread to Mobile -> Android.
    Bookmark Topic Watch Topic
  • New Topic