8000 Android from Entry to Button Focus Issue · Issue #5695 · fyne-io/fyne · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Android from Entry to Button Focus Issue #5695

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

Open
2 tasks done
heejit opened this issue Apr 24, 2025 · 5 comments
Open
2 tasks done

Android from Entry to Button Focus Issue #5695

heejit opened this issue Apr 24, 2025 · 5 comments
Labels
unverified A bug that has been reported but not verified

Comments

@heejit
Copy link
heejit commented Apr 24, 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

in android when entry widget has focus and soft keyboard is visible
click on Button widget do not trigger Tapped event it just shift the
focus to button and hide the soft keyboard I have to click again on button to trigger the Tapped event

How to reproduce

please run code then click on entry widget type something then click on button it suppose to show
a message

Screenshots

No response

Example code

package main

import (
	"fmt"
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/dialog"
	"fyne.io/fyne/v2/layout"
	"fyne.io/fyne/v2/widget"
)


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

	l := widget.NewList(nil, nil, nil)
	l.Length = func() int { return 20 }
	l.CreateItem = func () fyne.CanvasObject { return widget.NewLabel("----") }
	l.UpdateItem = func(id widget.ListItemID, o fyne.CanvasObject) {
		o.(*widget.Label).SetText(fmt.Sprintf("Line : %d", id))
	}

	e1 := widget.NewEntry()
	e2 := widget.NewEntry()
	b1 := widget.NewButton("Save", func() {
		dialog.ShowInformation("Click", "", w)
	})

	content := widget.NewForm()
	content.Append("Name:", e1)
	content.Append("Email:", e2)
	content.Append("", container.NewHBox(layout.NewSpacer(), b1, layout.NewSpacer()))

	layout := container.NewVSplit(l, content)

	w.SetContent(layout)
	w.ShowAndRun()
}

Fyne version

2.6

Go compiler version

1.23

Operating system and version

Android 14 and cross compile using opensuse 15.6

Additional Information

No response

@heejit heejit added the unverified A bug that has been reported but not verified label Apr 24, 2025
@andydotxyz
Copy link
Member

I cannot replicate with my Android devices.

Please provide more information about the hardware AND the keyboard that is loaded on them (different virtual keyboards can behave very differently).

@heejit
Copy link
Author
heejit commented Apr 28, 2025

Keyboard -> Samsung Keyboard
Android -> 14
Hardware -> Galaxy F13 | 4gb ram | ABI - armeabi-v7a | core - 8

Let me know what else information required.

@heejit
Copy link
Author
heejit commented Apr 28, 2025

I have tested with another android phone also it is same issue.

I used following to build apk ->
fyne-cross android --arch=arm --app-id="com.heejit.fyne1" --name="Fyne1"

@heejit
Copy link
Author
heejit commented Apr 29, 2025

One more thing I notice when soft keyboard hide focus shift to List Widget instead of button.

Copy link
Author
heejit commented May 1, 2025

after soft keyboard hides layout changes but click event mouse position(x,y) still holding position before the layout change
is that the reason list widget getting focus instead of button???

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

2 participants
0