How can you change a Swipe refresh layout's color for each rotation?

前端 未结 5 2098
野的像风
野的像风 2021-02-03 19:19

Has anyone noticed the SwipeRefreshLayout in gmail. It changes color for every rotation in a single load iteration. Does anyone have any idea how to achieve it?

5条回答
  •  庸人自扰
    2021-02-03 19:59

    you can use any of those either passing Colors values or Colors Resource Ids

    • Passing Colors
    swipeRefreshLayout.setColorSchemeColors({COLOR VALUE},{COLOR VALUE },
    any number of colors values..., {COLOR VALUE});
    
    • Passing Colors Resources Ids
    swipeRefreshLayout.setColorSchemeResources( R.color.{your Color resource Id},
    any number of colors ids... , R.color.{your Color resource Id})```
    

提交回复
热议问题