直接在getView里使用方法,

使用activity中的方法见下面红色部分, 需要强制类型转换才能使用activity中的方法

@Override
    public View getView(final int position, View convertView, ViewGroup parent) {
        final VOGeofence model = getItem(position);
        if (convertView == null || convertView.getTag() != model) {
            final View view1 = infalter.inflate(R.layout.geofence_list_item,
                    null);
            view = view1;
            LinearLayout linearlayout_geofence = (LinearLayout) view1
                    .findViewById(R.id.linearlayout_geofence);
            TextView textview_geofenceIndex = (TextView) view1
                    .findViewById(R.id.textview_geofenceIndex);
            textview_geofenceIndex.setText("围栏" + model.getGeoID() + ":");

            TextView textview_geofenceName = (TextView) view1
                    .findViewById(R.id.textview_geofenceName);
            textview_geofenceName.setText(model.getGeoName());

            TextView textview_radio = (TextView) view1
                    .findViewById(R.id.textview_radio);
            textview_radio.setText(model.getRadius() + "米");

            CheckBox checkBox = (CheckBox) view1.findViewById(R.id.checkBox);
            checkBox.setChecked(model.getActive().equals("0") ? false : true);
            linearlayout_geofence.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    ((Activity_GeofenceList_New) mContext).showToast("点击");
                }
            });

            checkBox.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                   ((Activity_GeofenceList_New) mContext).showToast("开启或者关闭");
                }
            });

        } else {
            view = convertView;
        }
        view.setTag(model);
        return view;
    }
}