Reputation: 95
I have 2 functions send and receive. I need to display send and receive message. I have to display a.xml if it is send function and b.xml if it is received function. How can i set the flag. Please guide me how to call layouts based on function call.
Thanks.
Upvotes: 0
Views: 138
Reputation: 234797
You can call setContentView(R.layout.a)
or setContentView(R.layout.b)
to change the view hierarchy displayed by the activity. These can be called multiple times during an activity's life.
Upvotes: 1