Forums

OverviewFelgo 2 Support (Qt 5) › ActivityIndicatorBarItem doesn't animiate

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20749

    Felgo User

    Is ActivityIndicatorBarItem supposed to animate if the “animating” property is set to true?  I would like to have a spinning animation in the navigation bar, however it does not initially spin when animating is set to true.   The showcase example (ExamplePage.xml) uses this control and it also does not initially spin, only if when the IconButtonBarItem is toggled.  Even then, it only spins for a few seconds.  Is this intended?  Is there a way I can get it spin indefinitely?

    #20750

    Alex
    Felgo Team

    Hi,

    the ActivityIndicatorBarItem as well as the AppActivityIndicator will be fixed with the next update. Until then, you can use this workaround:

    import Felgo 3.0
    import QtQuick 2.9
    
    App {
      NavigationStack {
        Page {
          title: "Activity Indicator"
          rightBarItem: ActivityIndicatorBarItem {
            Component.onCompleted: {
              var internalAnimation = data[0].data[0].data[0]
              // stop the internal animation to set the loops to infinite
              internalAnimation.stop()
              internalAnimation.loops = Animation.Infinite
              // from this point on the component works as desired
              // in case it should be running at the moment, we start the animation
              if(animating) internalAnimation.start()
            }
          }
    
          // same can be done for the AppActivityIndicator
          AppActivityIndicator {
            Component.onCompleted: {
              // different selector for the internal animation
              var internalAnimation = data[0].data[0]
              internalAnimation.stop()
              internalAnimation.loops = Animation.Infinite
              if(animating) internalAnimation.start()
            }
          }
        }
      }
    }
    

    Cheers,
    Alex

    #20756

    Felgo User

    Excellent.  Thanks for the quick response.  Works great.

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support