ST意法半导体
直播中

尚文清

8年用户 1710经验值
私信 关注
[问答]

如何更改屏幕覆盖动画时间?

在我的程序中,我有一些屏幕,我通过编程在屏幕之间切换。如果按下代码下方的按钮切换屏幕
  • void Screen1_View::changeScreenToScreen2(){
  •   static_cast(Application::getInstance())->gotoScreen_Screen2CoverTransitionSouth();
  • }
这段代码工作正常,但我也想更改覆盖时间。是否可以更改屏幕转换时间?它是固定的吗?








回帖(1)

刘珊宏

2022-12-30 11:00:13
通常,应用程序中每个屏幕的过渡持续时间相同。所以改变动画时间的唯一方法是在touchgfx/Transitions/CoverTransition.hpp(或touchgfx/Transitions/ScreenTrantision.hpp)。增加步数以增加持续时间等。


  •     CoverTransition(const uint8_t transitionSteps = 20)
  •         : Transition(),
  •           handleTickCallback(this, &CoverTransition::tickMoveDrawable),
  •           direction(templateDirection),
  •           animationSteps(transitionSteps),


举报

更多回帖

发帖
×
20
完善资料,
赚取积分