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

[Android]: Prevent Entry from losing focus when touch to another child of the ViewGroup is performed #5916

Closed
APopatanasov opened this issue Apr 8, 2022 · 1 comment
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor partner Issue or Request from a partner team proposal/open
Milestone

Comments

@APopatanasov
Copy link

APopatanasov commented Apr 8, 2022

Description

The current implementation of the the LayoutViewGroup contains a specific logic for the EditText widgets when DispatchTouchEvent is executed. The logic makes the EditText lose focus when touch is performed in the ViewGroup. That is altering and changing the default behavior of Android where focus is not lost in that case.

I believe an extensibility point should be introduced in the LayoutViewGroup that makes it possible to break the logic that makes the EditText lose focus.

Public API Changes

One possible dummy solution could be a public bool property that tells whether the focus should be moved out of the EditText or that tells whether the logic in the LayoutViewGroup's should be overriden.

Intended Use-Case

I am building a custom control that consists of Entry and two Buttons. I want to prevent the Entry from losing its focus when the buttons are pressed.

@APopatanasov APopatanasov changed the title [Android]: Prevent Entry from losing focus when touch outside of ViewGroup is performed [Android]: Prevent Entry from losing focus when touch to another child of the ViewGroup is performed Apr 8, 2022
@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Apr 11, 2022
@jsuarezruiz jsuarezruiz added this to the 6.0.300-servicing milestone Apr 21, 2022
@jsuarezruiz jsuarezruiz added the partner Issue or Request from a partner team label Apr 21, 2022
@jsuarezruiz
Copy link
Contributor

This have been removed a3d8d20

@ghost ghost locked as resolved and limited conversation to collaborators Jun 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor partner Issue or Request from a partner team proposal/open
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants