我有一个应用于 ViewPager 的 PageTransfomer,效果很好,但我想在将 PageTransformer 设置为 ViewPager 后立即启动页面的转换.我已经试过了:
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 already tried:
我已经在我的活动的 onCreate 中尝试了所有这些,但也许我错了.
I've tried all these in the onCreate of my activity but maybe I'm wrong.
有人知道吗?
谢谢
尝试以下方法之一:
onPostCreate()
new Handler().post(new Runnable() {/* 你的代码 *