Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slider snaps back to min-value on Android #5430

Open
2 tasks done
pneumaticdeath opened this issue Jan 18, 2025 · 1 comment
Open
2 tasks done

Slider snaps back to min-value on Android #5430

pneumaticdeath opened this issue Jan 18, 2025 · 1 comment
Labels
unverified A bug that has been reported but not verified

Comments

@pneumaticdeath
Copy link

pneumaticdeath commented Jan 18, 2025

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

I wrote this simple test https://github.com/pneumaticdeath/fyne_slider_test

When I run in under the mobile driver or on an emulator, it behaves as expected, but when I run it on real hardware, I get what you see in the attached video

Screen_recording_20250118_113617.mp4

How to reproduce

  1. Use fyne-cross to build an android apk
  2. Install and run on hardware
  3. Slide the slider back and forth
  4. Notice it snaps back to 0.0 seemingly at random.

Screenshots

See attached video in description

Example code

package main

import (
	"fmt"

	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/data/binding"
	"fyne.io/fyne/v2/layout"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("Slider Test")

	data := binding.NewFloat()
	slider := widget.NewSliderWithData(0.0, 10.0, data)
	slider.SetValue(5.0)
	slider.Step = 0.1
	display := widget.NewLabel("Holding")
	data.AddListener(binding.NewDataListener(func() {
		val, _ := data.Get()
		display.Text = fmt.Sprint(val)
		display.Refresh()
	}))

	content := container.New(layout.NewVBoxLayout(), slider, display)

	w.SetContent(content)
	w.Resize(fyne.NewSize(100,100))
	w.ShowAndRun()
}```

### Fyne version

2.5.3 (though fyne cross uses 2.3.5)

### Go compiler version

go1.23.4

### Operating system and version

darwin/arm64 14.6.1

### Additional Information

_No response_
@pneumaticdeath pneumaticdeath added the unverified A bug that has been reported but not verified label Jan 18, 2025
@pneumaticdeath
Copy link
Author

Update, I got the behavior in an emulator.

Screen_recording_20250118_115537.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

1 participant