使用 Fragment.getActivity() 获取与当前Fragment关联的Activity Context。这样做:
CustomAdapter() { super(new CustomArrayAdapter(EndlessCustom.this.getActivity(), android.R.layout.simple_list_item_1, android.R.id.text1, eventsSub));