[英]How to navigate to another page in android?
我是android的新手。 請告訴我如何導航到android中的新頁面。 提前致謝。
編輯:如何從現有活動開始新活動
在android中導航到另一個頁面意味着你必須開始另一個活動。 要開始新活動,請使用此功能
Intent intent = new Intent(currentActivity.this, nextActivity.class);
startActivity(intent);
您應該在AndroidManifest文件中提及下一個活動。
要更改你的頁面(我認為你在android中引用了“活動”,你需要發出一個所謂的“意圖”)。
你可以這樣做:
startActivity(new Intent(nextactivity,NextActivity.class));
要么
startActivityForResult(new Intent(nextactivity,NextActivity.class),1);
如果您希望新活動將任何結果返回給啟動新活動的活動。
但我建議您在這里閱讀本文檔:
http://developer.android.com/guide/topics/intents/intents-filters.html
如果您需要有關該主題的具體問題的其他幫助,請回到這個問題。
我希望有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.