https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png
![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
package com.filipkowicz.headeritemdecorator | |
/* | |
solution based on - based on Sevastyan answer on StackOverflow | |
changes: | |
- take to account views offsets | |
- transformed to Kotlin | |
- now works on viewHolders |
#!/bin/sh | |
# Example usage: | |
# ./generateAndroidDrawables.sh my_image.png 140 /absolute/path/to/android/res/drawables | |
# | |
# Will generate 140dp android drawables for 6 DPI on out/my_image.png/ directory. | |
# Be sure your original image has sustainable resolution for xxxhdpi drawable, | |
# which is 140 x 4 PX in case of this example. | |
# | |
# Requires ImageMagic | |
# SVG conversion recommended to be done with Inkscape: |