Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以基本上我在 onCreate 方法中创建了一个 URL,我想在我点击一个按钮时传递它。URL 已创建,但我无法将其发送到 NeXT 活动,因为它只是在 oncreate 方法中。我应该怎么办 ?
Create a class variable and assign it the url in the onCreate.
public class MyActiviy extends Activty { private URL myURL; public static void onCreate(Bundle bundle) { myURL={insert new URL}; } }