[英]Android - Progressivly show image from bottom to top
Essentially what I have is a transparent image that I want to slowly "fill in" from bottom to top over time. 本质上,我想要的是透明图像,我希望随着时间的推移从底部到顶部逐渐“填充”。
I'm aware of using ClipDrawable
and the its level
value, but that would fill in from the top. 我知道使用
ClipDrawable
及其level
值,但是会从顶部开始填充。 Is there any way to reverse that? 有什么办法可以扭转这种情况吗? Thanks!
谢谢!
ClipDrawable
works just fine for this. ClipDrawable
可以很好地ClipDrawable
这一点。 Just use Gravity.BOTTOM
when you create it. 创建时只需使用
Gravity.BOTTOM
。
Drawable d = ContextCompat.getDrawable(this, R.drawable.my_drawable);
ClipDrawable clip = new ClipDrawable(d, Gravity.BOTTOM, ClipDrawable.VERTICAL);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.