PhoneGap的的Android开启新活动 [英] Android PhoneGap to open a new Activity
本文介绍了PhoneGap的的Android开启新活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有满载的PhoneGap的HTML页面。该HTML是我的,是在手机上,让我完全控制了。
I have an html page loaded with PhoneGap. The html is mine and is on the phone, so I have full control of it.
我想点击HTML页面上的链接,打开一个新的活动。
I would like to click on a link on the html page to open a new activity.
例如:
index.html的
index.html
...
<a class="FullText" href="http://LinkToOpenPage" >Click me to open an activity</a>
...
MainActivity.java
MainActivity.java
...
public void OnReceiveLink(string Link)
{
if (Link=="LinkToOpenPage")
{
Intent myIntent = new Intent(view.getContext(), CalledActivity.class);
startActivity(myIntent);
}
}
...
有人能帮助我吗?
Can someone help me?
推荐答案
看看这个插件:的http://的SMU。 COM / Android的PhoneGap的-插件
这篇关于PhoneGap的的Android开启新活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文