Source:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_reminders); final Activity ReminderActivity = this; presenter = new RemindersPresenter(this); Toolbar toolbar = (Toolbar) findViewById(R.id.activity_main_toolbar); if (toolbar != null) { setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setElevation(2); getSupportActionBar().setTitle(getResources().getString(R.string.activity_reminders_title)); } addFab = (FloatingActionButton) findViewById(R.id.activity_reminders_fab_add); addFab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { AlertDialog.Builder builder = new AlertDialog.Builder(ReminderActivity); builder.setTitle(R.string.activity_reminder_add_label); final EditText input = new EditText(ReminderActivity); input.setInputType(InputType.TYPE_CLASS_TEXT); builder.setView(input); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { label = input.getText().toString(); if (label.isEmpty()){ showEmptyErrorMessage(view); } else { openTimePicker(); } } }); builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); builder.show(); } }); listView = (ListView) findViewById(R.id.activity_reminders_listview); listView.setEmptyView(findViewById(R.id.activity_reminders_listview_empty)); listView.setAdapter(presenter.getAdapter()); addFab.postDelayed(new Runnable() { @Override public void run() { AnimationTools.startCircularReveal(addFab); } }, 600); }

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_reminders); presenter = new RemindersPresenter(this); Toolbar toolbar = (Toolbar) findViewById(R.id.activity_main_toolbar); if (toolbar != null) { setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setElevation(2); getSupportActionBar().setTitle(getResources().getString(R.string.activity_reminders_title)); } addFab = (FloatingActionButton) findViewById(R.id.activity_reminders_fab_add); addFab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { AlertDialog.Builder builder = new AlertDialog.Builder(RemindersActivity.this); builder.setTitle(R.string.activity_reminder_add_label); final EditText input = new EditText(RemindersActivity.this); input.setInputType(InputType.TYPE_CLASS_TEXT); TableLayout.LayoutParams params = new TableLayout.LayoutParams(); params.setMargins(16, 16, 16, 16); input.setLayoutParams(params); builder.setView(input); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { label = input.getText().toString(); if (label.isEmpty()){ showEmptyErrorMessage(view); } else { openTimePicker(); } } }); builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); builder.show(); } }); listView = (ListView) findViewById(R.id.activity_reminders_listview); listView.setEmptyView(findViewById(R.id.activity_reminders_listview_empty)); listView.setAdapter(presenter.getAdapter()); addFab.postDelayed(new Runnable() { @Override public void run() { AnimationTools.startCircularReveal(addFab); } }, 600); }