I am using the following line of code to draw a path on a Canvas. So far everything works fine and I can easily draw path using this code.
But now our requirement is
You can use getPressure() method and combine it with this answer https://stackoverflow.com/a/15533607/1112882 to make it work. Idea is to keep storing widths and using it.