Hi guys I need a little advice. I trying to made an android app using Xamarin so C#. I made two layouts and in each one of them I made tow buttons to navigate between them.I
You're getting a NullReferenceException because this code:
FindViewById
returns null. This may be caused by either:
1 - You didn't properly annotate the Button with an android:id attribute, like so:
--OR--
2 - that Button isn't defined on the Main layout and therefore it isn't part of the Activity's current view. Therefore the FindViewById() method can't find it. Your intended approach to switch screens isn't supported on Android.
Which leads to a longer explanation about the Correct way to "switch screens" on Android: navigating between simple activities
Try one of these solutions.