Changing UI dynamically in the application is needed especially when you want the user do something step by step.
At the beginning, I thought it would be very difficult. Also I found nothing when searching on the Internet. When I noticed the ui is loaded through following method:
How about directly changing the ui when certain events occurs. Have a try. I just added the above code to a button event, using a new UI layout file. When I click that button, it works!!!!