嗨,我是android的新手,我已经创建了一个应用程序,它使用google places api并列出了几个百货商店。
在单击百货商店的名称时,我已使该列表可单击。我正在启动一个新活动,该活动将访问我创建的数据库,以提供该特定商店中的推荐或折扣产品。
我需要的是,当我点击百货商店的名称时,我希望应用程序重定向到商店网站,并列出该特定商店的所有推荐或折扣产品。
发布于 2013-01-23 13:52:36
list.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
long arg3) {
String url=urls[position];
Uri uri = Uri.parse(url);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
});在这里,您必须将所有部门urls放在一个名为urls的单独数组中
https://stackoverflow.com/questions/14473242
复制相似问题