i want to know how to navigate from one XML page to another in Java AWT on button click
i am making an andriod application in which i need to go from one page to another on a button click. i have tried several th开发者_高级运维ings but nothing worked out.
Okay, so given these are different .java files, and each has it own Activity (so, different Activities) what you want to do is call an intent as such:
Intent myActivity = new Intent(class1.this,class2.class);
main.this.startActivity(myActivity);
If its in the same Activity, (which I dont recomend) just call setContentView() again
精彩评论