Android how to create triangle and rectangle shape programmatically?

前端 未结 7 1032
一整个雨季
一整个雨季 2020-11-29 01:15

How can we create ballon drawable shape as below. where we can change the color of it dynamically. \"enter

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 01:52

    Use a triangle image and a rectangular image and mathematically align them in the above mentioned format. Use color filtering to dynamically change its color.

    You can even draw them on a custom view, using vector graphics, using custom colors, and that would be another way of solving this problem.

提交回复
热议问题