Course: Android App Development Course

OnClickListener for Multiple Views Using All Possible Methods

In this tutorial, we will learn how to set OnClickListeners for multiple Views and handle them all in one onClickListner method. We will learn all possible ways to set onClickListner in Android Studio. We are going to use a switch/case statement to check for the button ID’s and handle the corresponding button click.      
Paste these colors in the color.xml file
<color name="firstwadred">#d2502e</color>
  <color name="firstwayskyblue">#00adf1</color>
  <color name="secondwayblue">#3b77b5</color>
  <color name="secondwaypink">#bf5b97</color>
  <color name="thirdwayyelllow">#e39b37</color>
  <color name="thirdwayred">#cd4341</color>