Just for a short and quick tutorial today. I would just like to show how I was able to navigate through different activities using the OnClickListener. This time, instead of repetitively placing a "new OnClickListener" on every declared button, a much easier way would be is to implement it in the Activity.
First - Implement your OnClick Listener in your Activity.
Second - Implement onClick() method in the Activity
Third - Start implementing your OnClickListener() for your buttons
Fourth - Find your buttons via Id and start implementing your code on each line.
Through this, I was able to successfully navigate through my activities by inserting the proper code in each case in the Switch condition.
Well, the reason why I thought of posting this is because there has been a lot of misleading codes or perhaps inappropriate ones for your application. Luckily for me, this is the most simple and yet effective way I've used that shoots me out of the dilemma I faced. However, there are other ways to make things work and this could not guarantee a 100% result especially if you don't familiarize yourself with the basics.
Shoot your comments below if you have any questions. For detailed discussion please see the source given below.