<commit_before># LovelyDialog
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-LovelyDialog-green.svg?style=true)](https://android-arsenal.com/details/1/3452)

This library is a set of simple wrapper classes that are aimed to help you easily create fancy material dialogs.

![Screenshots](https://raw.githubusercontent.com/yarolegovich/lovelydialog/master/art/lovelydialogs_framed.png)

## Gradle 
Add this into your dependencies block.
```
compile 'com.yarolegovich:lovely-dialog:1.0.4'
```

## Wiki
###General
As advised in Effective Java
>  Favor composition over inheritance.

LovelyDialog doesn't subclass any Dialog related classes, it is just a lightweight extensible wrapper for Dialog and manipulations with custom view. If you would like to improve something - pull requests are appreciated.

Sample project that shows how to work with different dialogs and handle screen rotation is available under the [sample module] (https://github.com/yarolegovich/LovelyDialog/tree/master/sample).
### Dialog types
Each dialog has colored top, icon, title and message + its own features. There are 6 types of dialogs available:
* [LovelyStandardDialog] (#lovelystandarddialog)
* [LovelyInfoDialog] (#lovelyinfodialog)
* [LovelyTextInputDialog] (lovelytextinputdialog)
* [LovelyChoiceDialog] (#lovelychoicedialog)
* [LovelyProgressDialog] (#lovelyprogressdialog)
* [LovelyCustomDialog] (#lovelycustomdialog)

#### LovelyStandardDialog
You can set positive, negative and neutral button here. Listeners can be set individually for each button, one for all three or not set at all (onClick on any button dialog will be just dismissed).

````java
new LovelyStandardDialog(this)
      .setTopColorRes(R.color.indigo)
      .setButtonsColorRes(R.color.darkDeepOrange)
      .setIcon(R.drawable.ic_star_border_white_36dp)
      .setTitle(R.string.rate_title) 
      .setMessage(R.string.rate_message)
      .setPositiveButton(android.R.string.ok, new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Toast.makeText(context, "positive clicked", Toast.LENGTH_SHORT).show();
          }<commit_msg>Fix TextInput link<commit_after># LovelyDialog
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-LovelyDialog-green.svg?style=true)](https://android-arsenal.com/details/1/3452)

This library is a set of simple wrapper classes that are aimed to help you easily create fancy material dialogs.

![Screenshots](https://raw.githubusercontent.com/yarolegovich/lovelydialog/master/art/lovelydialogs_framed.png)

## Gradle 
Add this into your dependencies block.
```
compile 'com.yarolegovich:lovely-dialog:1.0.4'
```

## Wiki
###General
As advised in Effective Java
>  Favor composition over inheritance.

LovelyDialog doesn't subclass any Dialog related classes, it is just a lightweight extensible wrapper for Dialog and manipulations with custom view. If you would like to improve something - pull requests are appreciated.

Sample project that shows how to work with different dialogs and handle screen rotation is available under the [sample module] (https://github.com/yarolegovich/LovelyDialog/tree/master/sample).
### Dialog types
Each dialog has colored top, icon, title and message + its own features. There are 6 types of dialogs available:
* [LovelyStandardDialog] (#lovelystandarddialog)
* [LovelyInfoDialog] (#lovelyinfodialog)
* [LovelyTextInputDialog] (#lovelytextinputdialog)
* [LovelyChoiceDialog] (#lovelychoicedialog)
* [LovelyProgressDialog] (#lovelyprogressdialog)
* [LovelyCustomDialog] (#lovelycustomdialog)

#### LovelyStandardDialog
You can set positive, negative and neutral button here. Listeners can be set individually for each button, one for all three or not set at all (onClick on any button dialog will be just dismissed).

````java
new LovelyStandardDialog(this)
      .setTopColorRes(R.color.indigo)
      .setButtonsColorRes(R.color.darkDeepOrange)
      .setIcon(R.drawable.ic_star_border_white_36dp)
      .setTitle(R.string.rate_title) 
      .setMessage(R.string.rate_message)
      .setPositiveButton(android.R.string.ok, new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Toast.makeText(context, "positive clicked", Toast.LENGTH_SHORT).show();
          }
{'fraction_non_alphanumeric': 0.0952712100139082, 'fraction_numerical': 0.00602688919796013, 'mean_word_length': 4.870748299319728, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6449963', 'n_tokens_mistral': 1289, 'n_tokens_neox': 1230, 'n_words': 376}