Skip to content

Instantly share code, notes, and snippets.

@abelorian
Created September 11, 2014 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abelorian/1e2f76a0bc5729e1a8e0 to your computer and use it in GitHub Desktop.
Save abelorian/1e2f76a0bc5729e1a8e0 to your computer and use it in GitHub Desktop.
Button onClickListener Android
View rootView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
rootView = (View) inflater.inflate(R.layout.fragment, container, false);
Button mButton = (Button) rootView.findViewById(R.id.button);
mButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
}
});
return rootView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment