Im willing to use a Button in the main layout to move into a new layout when I click it and I did read about it but when I tried myself something didn't work properly. It gives me one error on the setContentView (error: non-static method setContentView(int) cannot be referenced from a static context). Did I miss something or I'm doing it wrong ?
Since I already have a class for ChatController, I thought about just moving my bluetooth chat "terminal" into a new layout that I could access through a button to make things clean. Also that onClickListener is on my MainActivity
//show bluetooth chat layout when click chat button
btnChat.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view){
MainActivity.setContentView(R.layout.layout_chat);
}
});