Hey guys, I need help with changing a ContentView in the MainActivity (without changing the Activity). I want to display "Special Thanks". In there are names of users who helped me localizing and testing the app. For that, I am using a button with
android:onClick="onSpcThxButtonClick"
The xml I want to display is called "spcthx.xml"
I need you to complete the following code:
public void onSpcThxButtonClick (View view)
{
// insert ContentView switch here
}
Hope you are able to help me.
Thanks in advance!
You can't use setcontentview easily on just calling a setcontentview function. You can use Framelayout to remove all views and inflate new layout to change/switch different views. I hope this will help.