this has became some thing complicated for me since im not so much familiar with fragments but it might also be simple for some of you guys, here i had this part of code referring to an activity, when i changed the activity to fragment it says can not cast from context to ListViewActivity
, can you please help me solve this:
@Override
public Filter getFilter() {
return ((ListViewActivity)mContext).new ListFilter();
}
obviously mContext
is a context reference.i understand that inside the fragment should get context with getActivity()
, but from outside ?thanks a lot.