An open API service indexing awesome lists of open source software.

https://github.com/duanhong169/checkerboarddrawable

A custom Drawable to use as background which embody "transparent", AKA checkerboard grid.
https://github.com/duanhong169/checkerboarddrawable

alpha checkerboard drawable transparent

Last synced: over 1 year ago
JSON representation

A custom Drawable to use as background which embody "transparent", AKA checkerboard grid.

Awesome Lists containing this project

README

          

# CheckerboardDrawable [![gitHub release](https://img.shields.io/github/release/duanhong169/CheckerboardDrawable.svg?style=social)](https://github.com/duanhong169/CheckerboardDrawable/releases) [![platform](https://img.shields.io/badge/platform-android-brightgreen.svg)](https://developer.android.com/index.html) [![license](https://img.shields.io/badge/license-Apache%202-green.svg)](https://github.com/duanhong169/CheckerboardDrawable/blob/master/LICENSE)

A custom Drawable to use as background which embody "transparent", AKA checkerboard grid.

## Gradle

```
dependencies {
implementation 'com.github.duanhong169:checkerboarddrawable:${latestVersion}'
...
}
```

> Replace `${latestVersion}` with the latest version code. See [releases](https://github.com/duanhong169/CheckerboardDrawable/releases).

## Usage

### Use `CheckerboardDrawable.create()` and set as background drawable

```java
yourView.setBackgroundDrawable(CheckerboardDrawable.create());
```

### Custom

```java
CheckerboardDrawable drawable = new CheckerboardDrawable.Builder()
.colorOdd(Color.LTGRAY)
.colorEven(Color.DKGRAY)
.size(20)
.build();
yourView.setBackgroundDrawable(drawable);
```

## License

See the [LICENSE](./LICENSE) file.