Multiple Button OnClick Listener in Android Studio | Android Tutorials
Channel: Traidev Official
Date: 2022-01-19

Multiple Button OnClick Listener in Android Studio | Android Tutorials 

In this video you Learn -  How to work with Multiple Buttons / Views,
 It is similar to that of working with buttons the difference is that we are going to work with multiple buttons .
We are just going to use a SWITCH case where the button id's are used in case.

public void onClick(View v)
    {
        switch (v.getId())
        {
        case R.id.button1:
   
            Toast.makeText(getApplicationContext(), "Button 1 is clicked", Toast.LENGTH_LONG).show();
           
            break;
           
        case R.id.button2:
           
            Toast.makeText(getApplicationContext(), "Button 2 is clicked", Toast.LENGTH_LONG).show();
           
            break;
           
         case R.id.button3:
   
            Toast.makeText(getApplicationContext(), "Button 3 is clicked", Toast.LENGTH_LONG).show();
   
            break;

        default:
            break;
        }
    }



Watch video Start to Finish please.

Send Data Activity to Activity : https://www.youtube.com/watch?v=g0fwS31JQNg

Previous Video Link : https://www.youtube.com/watch?v=jkRv1pjZwi0


To get all the latest update video tutorials, I encourage to subscribe to this channel, and don't forget to share this video to your friends on your social networks. If you have any question, please comment below and I will try to answer as many as I can. 



Tags : 
#AndroidTutorials
#Traidev
#android_app_development


Watch Full Video ...
If you face any problem Feel free to ask 
If you like my video don't forget to like and subscribe my Channel 
Thankhyou !
If you learn Android Studio free 100% Subscribe my Channel.
Channel Link:- https://www.youtube.com/c/traidev


If you enjoy this video than please Like, Share & subscribe to the channel.


Show your Love please

✅ Subscribe:  https://www.youtube.com/channel/UC3MacZztdpkSzs4aHDLLwYw?sub_confirmation=1

► Android Studio Playlist : https://www.youtube.com/watch?v=MJ-uRyNtcB4&list=PL-pnFFAm42sxQR9mlHqrmDLSP-L0Q8ljQ


► HTML & CSS Full Playlist : https://www.youtube.com/watch?v=JXrOdNag6BM&list=PL-pnFFAm42swFCrQjSXbgCKoi5I3VKfua


Link for Download
App Download Play Store Link : https://bit.ly/2wkMeSX​​​​​​​​​



I Wish you like this video. Ask any Query on Instagram : 
https://instagram.com/traidev




Enjoy & Stay Connected With Us!
► Subscribe To Traidev Officials  : https://bit.ly/Youtube-Traidev
► Like Us On Facebook : https://bit.ly/Facebook-Traidev
► Follow Us On Instagram : https://bit.ly/Instagram-Traidev
► Follow Us On Instagram Officials  : https://instagram.com/traidev​​​​​​​​​


======================================================


Thanks and Love #Traidev​​​​​​​​​​​​​​​​​​


LIKE | COMMENT | SHARE | SUBSCRIBE


In this Video we Will Cover Further Topics : 

How to create an onClickListener for multiple buttons in Android Studio,
OnClickListener for Multiple Buttons,
How to add OnClickListener for Multiple Buttons,
OnClickListener for Multiple Buttons in Android Studio,
implementing onclicklistener,
onClick,
onclicklistener android studio,
android onclicklistener multiple buttons,
android button click,
android button click event,
android button,
android button onclick tutorial,
android button onclick


=====================================================