需求是这个样子的:我写了一个小游戏,并且我创建了一个自定义的View
现在,我需要在游戏结束之后跳转到另一个activity
我们使用常规的跳转方式,会发现自定义的View根本没有startActivity()
这个方法
那么,我们如何解决这个问题?
其实很简单,我们只需要获取当前view的context即可,使用context的方法来启动新的activity
Intent intent = new Intent(getContext(),GameOverActivity.class);
getContext().startActivity(intent);
注意,这里是无法使用finish()
方法来销毁activity的。
Blessed is Your Name, there is no true God but You cialis on sale in usa
buying cialis online safe If possible, steps should be taken to limit the number of medications to those most effective for the patient
Other considerations for nephrotoxin management cialis online generic Maca has also been shown to significantly increase testosterone levels
Take a small dose 25mg, 50mg purchase zithromax for chlamydia
PubMed 18496468 lasix 40 mg tablet
It s been over a week since I ovulated cialis buy
We do know that tamoxifen increases endometrial cancer by two to three fold; there is emerging evidence that the anti estrogenic properties of anastrozole actually reduce endometrial cancer buy cialis online 20mg Garcia FG, Marco MA, Vela J, et al