apply PageTransformer to PagerView as soon as possible

后端 未结 2 1112
抹茶落季
抹茶落季 2021-01-13 10:56

I have a PageTransfomer applied to a ViewPager, it works great but I want to launch the page\'s transformation as soon as I set the PageTransformer to the ViewPager. I alrea

2条回答
  •  天涯浪人
    2021-01-13 11:16

    Try one of these things:

    1. Put the code in onPostCreate()
    2. Put the code in a handler; i.e. new Handler().post(new Runnable() { /* your code */ });

提交回复
热议问题