Upgrade to v2.5
Fyne API v2.5
package fyne
Animation
AnimationCurve
App
AppMetadata
BuildType
Canvas
CanvasObject
Clipboard
CloudProvider
CloudProviderPreferences
CloudProviderStorage
Container
Delta
Device
DeviceOrientation
Disableable
DoubleTappable
DragEvent
Draggable
Driver
Focusable
HardwareKey
KeyboardShortcut
KeyEvent
KeyModifier
KeyName
Layout
LegacyTheme
Lifecycle
ListableURI
Locale
MainMenu
Menu
MenuItem
Notification
OverlayStack
PointEvent
Position
Preferences
Resource
Scrollable
ScrollEvent
SecondaryTappable
Settings
Shortcut
Shortcutable
ShortcutCopy
ShortcutCut
ShortcutHandler
ShortcutPaste
ShortcutRedo
ShortcutSelectAll
ShortcutUndo
Size
StaticResource
Storage
StringValidator
Tabbable
Tappable
TextAlign
TextStyle
TextTruncation
TextWrap
Theme
ThemeColorName
ThemedResource
ThemeIconName
ThemeSizeName
ThemeVariant
URI
URIReadCloser
URIWithIcon
URIWriteCloser
Validatable
Vector2
Widget
WidgetRenderer
Window
app
canvas
container
data/binding
data/validation
dialog
driver
driver/desktop
driver/mobile
driver/software
lang
layout
storage
storage/repository
test
theme
widget
Fyne API "fyne.Animation"
fyne.Animation
import "fyne.io/fyne/v2"
Usage
type Animation
type Animation struct {
AutoReverse bool
Curve AnimationCurve
Duration time.Duration
RepeatCount int
Tick func(float32)
}
Animation represents an animated element within a Fyne canvas. These animations may control individual objects or entire scenes.
Since:
2.0
func NewAnimation
func NewAnimation(d time.Duration, fn func(float32)) *Animation
NewAnimation creates a very basic animation where the callback function will be called for every rendered frame between time.Now() and the specified duration. The callback values start at 0.0 and will be 1.0 when the animation completes.
Since:
2.0
func (*Animation) Start
func (a *Animation) Start()
Start registers the animation with the application run-loop and starts its execution.
func (*Animation) Stop
func (a *Animation) Stop()
Stop will end this animation and remove it from the run-loop.