0

In my application I want use WaterWave effect on custom shape such as below.
enter image description here

I want to change this WaterWave position with percent, for example this percent is 0 to 100.
When percent is 0 show empty, percent is 100 fill this shape, percent is 50 fill half shape and more ...
I search many time in google but just find library for circle or heart shape!
I can't find any shape such as above shape!

How can I create shape with WaterWave such as above image?
Please help me Please help me

Dr.KeyOk
  • 608
  • 1
  • 6
  • 13

1 Answers1

0

I think you should create a custom View and override the onDraw() method to calculate the percentage, then draw a mask on top of that to give the droplet effect. The shape of the wave looks like the sin function, so you should play around with that, so the view percentage is dynamic. Good luck!

ndriqa
  • 362
  • 2
  • 13
  • Thanks my friend, but I don't know how can I create custom shape for this! can you help me and send to me code? please – Dr.KeyOk Oct 20 '22 at 14:12
  • Here, this one might help: https://stackoverflow.com/questions/19519856/fill-sine-graph-android – ndriqa Oct 20 '22 at 14:24