Skip to main content
Associate II
July 7, 2023
Question

TextArea in container move animation flickering

  • July 7, 2023
  • 1 reply
  • 946 views

Hello,

I made some test to realize a scrolling text, to do it I use :

This information   and This template 

Here my container code.cpp :

 

#include <gui/containers/Cont_Rolling_Text.hpp>

Cont_Rolling_Text::Cont_Rolling_Text():
 TextMoveAnimationEndedCallback(this, &Cont_Rolling_Text::TextMoveAnimationEndedHandler)
{
 /* setup animation */
 textArea1.startMoveAnimation(-textArea1.getWidth(), -8, 400, &EasingEquations::linearEaseNone);
 textArea1.setMoveAnimationEndedAction(TextMoveAnimationEndedCallback);
}


void Cont_Rolling_Text::TextMoveAnimationEndedHandler(const touchgfx::MoveAnimator<TextAreaWithOneWildcard>& b)
{
 /* reset it's position */
 textArea1.moveTo(0,-8); 
 /* reset animation */ 
 textArea1.startMoveAnimation(-textArea1.getWidth(), -8, 500, &EasingEquations::linearEaseNone); 
 textArea1.setMoveAnimationEndedAction(TextMoveAnimationEndedCallback);
 
}


void Cont_Rolling_Text::initialize()
{
 Cont_Rolling_TextBase::initialize();
}

 

 And .hpp

 

class Cont_Rolling_Text : public Cont_Rolling_TextBase
{
public:
 Cont_Rolling_Text();
 virtual ~Cont_Rolling_Text() {}

 virtual void initialize();
 void TextMoveAnimationEndedHandler(const touchgfx::MoveAnimator<TextAreaWithOneWildcard>& b);
 
 
protected:
 touchgfx::Callback <Cont_Rolling_Text, const touchgfx::MoveAnimator<TextAreaWithOneWildcard>&> TextMoveAnimationEndedCallback; 
};

 

It works well but on my screen text is flickering a little during animation 

Have you any clues about this issue ?

Regards,

Nicolas

This topic has been closed for replies.

1 reply

nmeAuthor
Associate II
July 13, 2023

Hello Again, 

Nobody get this kind of issue ?

Regards,

Nicolas