Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Switch between layouts

Tags:

android

I have two layouts, what is the best way to switch between the two layouts when a user clicks on a button?

like image 612
JeffLemon Avatar asked May 13 '26 22:05

JeffLemon


1 Answers

You could call setContentView(R.layout.layout2) on ButtonClick

like image 143
Michele Avatar answered May 15 '26 10:05

Michele



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!