I want to modify the visibility of an ImageView
which is located in the layout of an activity, from a fragment which is loaded in a container inside parent activity's layout.
In a parent activity class I have this method:
public void enableAddEvvOkBtn(boolean mHide, Activity mActivity) {
view = getView();
if(mHide) btnAddEvVOk.setVisibility(View.VISIBLE);
else btnAddEvVOk.setVisibility(View.GONE);
}
and in the fragment I am calling the method:
tabSketch.enableAddEvvOkBtn(true, getActivity());
where tabSketch is an instance of the parent activity.
However this is not working, I think it must be something related to the context how can I make this work?