BitmojiAlertDialog.java 1.99 KB
package com.bitstrips.imoji.ui;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

public class BitmojiAlertDialog
{
  private final AlertDialog.Builder a;
  
  public BitmojiAlertDialog(Context paramContext)
  {
    this.a = new AlertDialog.Builder(paramContext).setIcon(2130837752).setCancelable(false);
  }
  
  protected AlertDialog.Builder getBuilder()
  {
    return this.a;
  }
  
  public void show()
  {
    this.a.create().show();
  }
  
  public BitmojiAlertDialog withMessage(@NonNull String paramString)
  {
    this.a.setMessage(paramString);
    return this;
  }
  
  public BitmojiAlertDialog withOnNegativeClick(@Nullable final Runnable paramRunnable)
  {
    this.a.setNegativeButton(17039360, new DialogInterface.OnClickListener()
    {
      public final void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
      {
        paramAnonymousDialogInterface.dismiss();
        if (paramRunnable != null) {
          paramRunnable.run();
        }
      }
    });
    return this;
  }
  
  public BitmojiAlertDialog withOnPositiveClick(@Nullable final Runnable paramRunnable)
  {
    this.a.setPositiveButton(17039370, new DialogInterface.OnClickListener()
    {
      public final void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
      {
        paramAnonymousDialogInterface.dismiss();
        if (paramRunnable != null) {
          paramRunnable.run();
        }
      }
    });
    return this;
  }
  
  public BitmojiAlertDialog withTitle(@NonNull String paramString)
  {
    this.a.setTitle(paramString);
    return this;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ui/BitmojiAlertDialog.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */