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.
- Host: GitHub
- URL: https://github.com/duanhong169/checkerboarddrawable
- Owner: duanhong169
- License: apache-2.0
- Created: 2018-07-19T11:53:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-13T20:25:08.000Z (over 7 years ago)
- Last Synced: 2024-11-14T14:19:44.419Z (over 1 year ago)
- Topics: alpha, checkerboard, drawable, transparent
- Language: Java
- Size: 158 KB
- Stars: 23
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CheckerboardDrawable [](https://github.com/duanhong169/CheckerboardDrawable/releases) [](https://developer.android.com/index.html)
[](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.