search

Home  >  Q&A  >  body text

Android TextView 或 ListView 加载过渡效果

请教,类似于下面截图中这种效果一般怎么实现?

像微博,推特,在数据加载过程中有个过渡,刚进去显示上面截图那种效果,数据加载完成后替换显示文本内容。我的问题是:上面截图这种效果怎么实现,单纯地设置背景颜色吗?还是有其他办法,谷歌对这种处理有没有官方支持。

迷茫迷茫2771 days ago568

reply all(5)I'll reply

  • 天蓬老师

    天蓬老师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

    reply
    0
  • PHP中文网

    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

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 17:46:00

    Can you explain it more clearly

    reply
    0
  • PHP中文网

    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.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:46:00

    Does it have something to do with this https://github.com/elye/loade...

    reply
    0
  • Cancelreply