<commit_before>
![logo](media/header_logo.png)


[![travis_CI](https://travis-ci.org/loregr/LGSnackbar.svg?branch=master)](https://travis-ci.org/loregr/LGSnackbar) ![platform](https://img.shields.io/badge/platform-android-green.svg) [![license](https://img.shields.io/badge/license-MIT-red.svg)](./LICENSE.md)  [![](https://jitpack.io/v/loregr/lgsnackbar.svg)](https://jitpack.io/#loregr/lgsnackbar)
 ![API](https://img.shields.io/badge/minSdkVersion-19-orange.svg?style=flat)


An easy to use wrapper of the native Android Snackbar which stays visible across multiple activities. It provides different themes to start with, and allows you to easily manage common scenarios like _**success**, **warning**, **error**, **info**._

## Preview

Demo video:

![logo](media/demo.gif)

Try it on Appetize:

[![appetize](media/appetize.png)](https://appetize.io/app/rp93kgkya9b02f4qb0vw2f8h4r?device=nexus5&scale=75&orientation=portrait&osVersion=7.0)

## Install

In your root/build.gradle:

```groovy
allprojects {
  repositories {
  ...
  maven { url 'https://jitpack.io' }
  }
}  
```
In your app/build.gradle

```groovy
dependencies {
  compile 'com.github.loregr:lgsnackbar:1.0.0'
}
```

## Preparing

### Setup with a default theme

Define your default theme using `LGSnackbarManager.prepare(...)`, in your `Application` class in the `#onCreate()` method.


```java
@Override
public void onCreate() {
    super.onCreate();
    LGSnackbarManager.prepare(getApplicationContext(),
                LGSnackBarThemeManager.LGSnackbarThemeName.SHINE);
                //....
}
```

**You can check the available themes _[here](./themes.md)_.**

_Note: You can simply call `LGSnackbarManager.prepare(getApplicationContext())`, in this case `SHINE` theme will be automatically applied._

### Setup with a custom theme

Create your own `LGSnackbarTheme` by passing 4 `LGSnackBarStyle` instances (one for each scenario of the theme) and the `minHeight` and the `duration` values that you want to apply to the Snackbar.


```java<commit_msg>Readme updated<commit_after>
![logo](media/header_logo.png)


[![travis_CI](https://travis-ci.org/loregr/LGSnackbar.svg?branch=master)](https://travis-ci.org/loregr/LGSnackbar) ![platform](https://img.shields.io/badge/platform-android-green.svg) [![license](https://img.shields.io/badge/license-MIT-red.svg)](./LICENSE.md)  [![](https://jitpack.io/v/loregr/lgsnackbar.svg)](https://jitpack.io/#loregr/lgsnackbar)
 ![API](https://img.shields.io/badge/minSdkVersion-19-orange.svg?style=flat)


An easy to use wrapper of the native Android Snackbar which stays visible across multiple activities. It provides different themes to start with, and allows you to easily manage common scenarios like _**success**, **warning**, **error**, **info**._

## Preview

Demo video:

![logo](media/demo.gif)

Try it on Appetize:

[![appetize](media/appetize.png)](https://appetize.io/app/rp93kgkya9b02f4qb0vw2f8h4r?device=nexus5&scale=75&orientation=portrait&osVersion=7.0)

## Install

In your root/build.gradle:

```groovy
allprojects {
  repositories {
  ...
  maven { url 'https://jitpack.io' }
  }
}  
```
In your app/build.gradle

```groovy
dependencies {
  compile 'com.github.loregr:lgsnackbar:1.0.1'
}
```

## Preparing

### Setup with a default theme

Define your default theme using `LGSnackbarManager.prepare(...)`, in your `Application` class in the `#onCreate()` method.


```java
@Override
public void onCreate() {
    super.onCreate();
    LGSnackbarManager.prepare(getApplicationContext(),
                LGSnackBarThemeManager.LGSnackbarThemeName.SHINE);
                //....
}
```

**You can check the available themes _[here](./themes.md)_.**

_Note: You can simply call `LGSnackbarManager.prepare(getApplicationContext())`, in this case `SHINE` theme will be automatically applied._

### Setup with a custom theme

Create your own `LGSnackbarTheme` by passing 4 `LGSnackBarStyle` instances (one for each scenario of the theme) and the `minHeight` and the `duration` values that you want to apply to the Snackbar.


```java
{'fraction_non_alphanumeric': 0.15282228247473503, 'fraction_numerical': 0.010352477199901405, 'mean_word_length': 4.651810584958217, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, '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': '5720080', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1380, 'n_words': 312}