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

Set cursor position #52

Open
ecgreb opened this issue Nov 15, 2016 · 0 comments
Open

Set cursor position #52

ecgreb opened this issue Nov 15, 2016 · 0 comments

Comments

@ecgreb
Copy link
Collaborator

ecgreb commented Nov 15, 2016

Description

PeliasSearchView should allow cursor position to be set without performing a lookup on the EditText.

Steps to Reproduce

Currently cursor position can be set with the following code:

val editText = peliasSearchView.findViewById(R.id.search_src_text) as EditText?
editText?.setSelection(editText.text.length)

Client apps should not have to execute findViewById(R.id.search_src_text) to set the selection. Instead we should expose an API to set the position:

peliasSearchView.setCursorPosition(peliasSearchView.query.length)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant