Skip to content

Instantly share code, notes, and snippets.

@yaronv
Created August 17, 2015 21:19
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 yaronv/d8217c55a6103a2f983f to your computer and use it in GitHub Desktop.
Save yaronv/d8217c55a6103a2f983f to your computer and use it in GitHub Desktop.
FloatingActionButton FAB = (FloatingActionButton) v.findViewById(R.id.fab);
FAB.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getActivity(), AddAlarmActivity.class);
getActivity().startActivityForResult(intent, Constants.ADD_ALARM_REQUEST);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment