Which one is best way or easy to process for get text on button click (public void onClick /.setOnClickListner)?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Which one is best way or easy to process for get text on button click (public void onClick /.setOnClickListner)??

I have added multiple buttons with text. On button click getting text. But can you tell me which one will be best for processing for application. Public void onClick(View view){ } --- Button1.setOnClickListener(new View.OnClickListener(){} Is both work different or I can any one. Or do you have any best idea for get multiple buttons value in textview.

7th May 2020, 8:05 PM
Gorishankar
Gorishankar - avatar
1 Answer
0
Make button object array Then find them by child
9th May 2020, 2:57 AM
Kelvin Paul
Kelvin Paul - avatar