Android的,调用自身内部活动 [英] Android, Calling Activity within itself

查看:120
本文介绍了Android的,调用自身内部活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让一个应用程序,它有2个主控件(与其他信息字段一起)
1.> Next按钮
2.>完成按钮

I am trying to make an app which have 2 main controls (along with other info fields) 1.> Next button 2.> Done button

我想打电话给同一个活动时,下一个按钮为pssed $ P $和显示一些其他活动完成按钮时pssed $ P $

I want to call the same activity when next button is pressed and display some other activity when Done button is pressed

完成按钮是工作的罚款。但是,当我preSS下一步按钮的应用程序停止工作。我得到的错误是:
不幸的是,的myapp已停止工作。

Done button is working fine. But when I press Next button the app stops working. The error that I get is : Unfortunately, myapp has stopped working

这是同样的错误,当我不在清单文件中定义的活动,我通常得到。
任何人都可以请帮我解决这个问题。

This is the same error which I usually get when I don't define activity in manifest file. Can anyone please help me with this problem.

最后是是合法的范围内自称相同的活动?

And finally Is is legitimate to call same activity within itself ?

感谢

推荐答案

我觉得这应该工作

Intent i= new Intent(ActivityA.this,ActivityA.class);

这篇关于Android的,调用自身内部活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆