我有以下处理程序:
public class SiteListener implements OnItemClickListener{
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
}
}
我希望能够调用以下内容:
myActivity.getSupportFragmentManager()
.beginTransaction()
.add(R.id.site_info, siteInfoFragment)
.commit();
如何从 SiteListener 访问活动?有没有办法使用adapterView
?