开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜