请教,类似于下面截图中这种效果一般怎么实现?
像微博,推特,在数据加载过程中有个过渡,刚进去显示上面截图那种效果,数据加载完成后替换显示文本内容。我的问题是:上面截图这种效果怎么实现,单纯地设置背景颜色吗?还是有其他办法,谷歌对这种处理有没有官方支持。
天蓬老师2017-04-17 17:46:00
Developer options turn on display layout boundary judgment built with controls
Personal idea: You can use a picture as the background of an Item, and hide the background when the data is loaded
PHP中文网2017-04-17 17:46:00
The principle is actually quite simple, that is, TextView and ImageView in Item inherit a custom View, write a callback method, start the animation by default before loading the image and setting the text, and stop the animation after loading the image and setting the text
PHP中文网2017-04-17 17:46:00
The hard-coded width and height set the background of the control to gray. Replace it after getting the data.
PHP中文网2017-04-17 17:46:00
Does it have something to do with this https://github.com/elye/loade...