package com.jraska.dialog.sample;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SampleActivity extends AppCompatActivity {

  @BindView(R.id.toolbar) Toolbar toolbar;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sample);
    ButterKnife.bind(this);
    setSupportActionBar(toolbar);
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.menu_sample, menu);
    return true;
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();

    if (id == R.id.action_settings) {
      return true;
    }

    return super.onOptionsItemSelected(item);
  }

  @OnClick(R.id.fab) void onFabClick() {
    // TODO: 10/08/16 Do something
  }
}

@@ -54,16 +54,63 @@
 Bundle;%0A
+import android.support.design.widget.Snackbar;%0A
 import a
@@ -150,16 +150,16 @@
 tivity;%0A
-
 import a
@@ -336,16 +336,63 @@
 OnClick;
+%0Aimport com.jraska.dialog.LambdaDialogFragment;
 %0A%0Apublic
@@ -1111,38 +1111,880 @@
     
-// TODO: 10/08/16 Do something
+LambdaDialogFragment.builder(this)%0A        .validateEagerly(BuildConfig.DEBUG)%0A        .setIcon(android.R.drawable.ic_dialog_alert)%0A        .setMessage(%22Test message%22)%0A        .setTitle(R.string.app_name)%0A        .setPositiveText(android.R.string.ok)%0A        .setPositiveMethod(SampleActivity::onDialogOkClicked)%0A        .setNegativeText(android.R.string.cancel)%0A        .setNegativeMethod(SampleActivity::onDialogCancelClicked)%0A        .setNeutralText(%22Neutral%22)%0A        .setNeutralMethod(SampleActivity::onDialogNeutralClicked)%0A        .show();%0A  %7D%0A%0A  void onDialogOkClicked() %7B%0A    showSnackbar(%22Ok clicked%22);%0A  %7D%0A%0A  void onDialogNeutralClicked() %7B%0A    showSnackbar(%22Neutral clicked%22);%0A  %7D%0A%0A  void onDialogCancelClicked() %7B%0A    showSnackbar(%22Cancel clicked%22);%0A  %7D%0A%0A  void showSnackbar(String message) %7B%0A    Snackbar.make(toolbar, message, Snackbar.LENGTH_SHORT).show();
 %0A  %7D

Add first sample with dialog