Clean way to implement gradual fading of brightness in Android?

前端 未结 2 754
清酒与你
清酒与你 2021-02-20 05:32

At the moment I have code to fade brightness adjustments which looks something like this:

new Thread() {
    public void run() {
        for (int i = initial; i          


        
相关标签:
2条回答
  • 2021-02-20 05:39

    From Honeycomb you can do things lie this using Property Animation. This post on the Android Developers blog talks about it all in some detail.

    0 讨论(0)
  • 2021-02-20 05:41

    how about reducing the brightness to half in each iteration.

    Then loop will complete in O(log n) rather than O(n) in current solution.

    0 讨论(0)
提交回复
热议问题