Skip to content

Instantly share code, notes, and snippets.

@gauravrai1
Created January 24, 2018 13:56
Show Gist options
  • Save gauravrai1/65de8694332871af90d6ffab4573527a to your computer and use it in GitHub Desktop.
Save gauravrai1/65de8694332871af90d6ffab4573527a to your computer and use it in GitHub Desktop.
Interface
private listner = Update_Interface;
onCreate(){
Fragment f = getActivity().getFragmentManager().findFragmentById(R.id.fragment_update);
setListner((Update_fragment) f);
}
public void post_data(View view) {
//some code to push post data
listner.refresh;
}
public interface Update_Interface() {
public void refresh();
}
public void setListner(Update_Interface listner) {
this.listner = listner;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment