How to implement “Loading images” pattern (Opacity, Exposure and Saturation) from Google's new Material design guidelines

前端 未结 4 1897
礼貌的吻别
礼貌的吻别 2021-01-31 00:03

Has anyone looked into implementing the Loading images pattern from Google\'s latest Material Design guide.

It\'s a recommended way that \"illustrations and photographs

4条回答
  •  再見小時候
    2021-01-31 00:25

    Was just wondering this same thing. I found a blog post detailing how to go about it with an example written in Xamarin:

    http://blog.neteril.org/blog/2014/11/23/android-material-image-loading/

    The gist for someone writing in Java: use ColorMatrix and ColorMatrixColorFilter.

    The post also mentions an important optimization: using the Lollipop hidden setColorMatrix() API to avoid GC and GPU churn.

    Have you seen it in use in any Google apps yet? If you end up implementing it I'd love to see your source.

提交回复
热议问题