A custom Drawable to use as background which embody "transparent", AKA checkerboard grid.
dependencies {
implementation 'com.github.duanhong169:checkerboarddrawable:${latestVersion}'
...
}
Replace
${latestVersion}
with the latest version code. See releases.
yourView.setBackgroundDrawable(CheckerboardDrawable.create());
CheckerboardDrawable drawable = new CheckerboardDrawable.Builder()
.colorOdd(Color.LTGRAY)
.colorEven(Color.DKGRAY)
.size(20)
.build();
yourView.setBackgroundDrawable(drawable);
See the LICENSE file.