Skip to content

Instantly share code, notes, and snippets.

@Bhavdip
Created July 22, 2016 08:34
Show Gist options
  • Select an option

  • Save Bhavdip/ceb2d7aa1fb67b09325ebbccaa693d24 to your computer and use it in GitHub Desktop.

Select an option

Save Bhavdip/ceb2d7aa1fb67b09325ebbccaa693d24 to your computer and use it in GitHub Desktop.
public class SampleFragment extends Fragment implements OnClickListener {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.sample_fragment,container, false);
Button nextButton = (Button) view.findViewById(R.id.button_first);
nextButton.setOnClickListener(this);
return view;
}
// ... some method of your fragment life cycle
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment