我是Android开发新手,我对活动很困惑(甚至不确定它们是否被称为活动lol) 我将如何从一个内部开始另一个活动?
public void work(View v) {
//does quite a bit of stuff in here
//then goes back to csend() to check if this needs to be repeated
}
public void csend(View view) {
if (i < x){
//does a little bit of stuff here
work(); //i need to make this run the other code
}
}
另外,(查看视图)是什么意思,有人可以给我一个教程链接来解释android代码的不同部分吗?
感谢 编辑:感谢您的快速回复,我会仔细阅读所有内容
答案 0 :(得分:3)
Intent showContent = new Intent(this, ActivityName.class);
startActivity(showContent);
http://www.androidcompetencycenter.com/2009/03/tutorial-how-to-start-a-new-activity/
答案 1 :(得分:0)
您也可以使用,
startActivity(new Intent(YourClassName.this, SecondActivity.class));