I have two buttons set, "OK" and "Cancel" in main.xml. I have setOnclickListener for the Cancel. When I click on OK i need another xml file say abc.xml to get displayed. I have added that xml file under the layout folder.
How do I do this?
I have two buttons set, "OK" and "Cancel" in main.xml. I have setOnclickListener for the Cancel. When I click on OK i need another xml file say abc.xml to get displayed. I have added that xml file under the layout folder.
How do I do this?
I guess your abc.xml is another Activity. What you need to do is:
Activity, for example Abc.onCreate() method call setContentView(R.layout.abc.xml).Activity to the AndroidManifest file.In the OnClickListener of the button, write:
startActivity(new Intent(YouActivityWithTheButtons.this, Abc.class));