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

How to make spotlight persistence. If the current Configuration changes, from port to landscape, then spotlight index should persist. #130

Open
rishidyno opened this issue Apr 16, 2022 · 1 comment

Comments

@rishidyno
Copy link

Consider a situation when there are some configuration changes. In the current spotlight, I don't think there is any way we can persist the targeted index. In my experience, if the screen is rotated, then the spotlight restart from the beginning.

Also, consider if the user is using a different UI for different orientations, then in that case we will have to use a different layout for each target. But the thing is, the spotlight takes predefined layout targets. How can we conditionally or with some other method can change the target layout during runtime?

@cmy82
Copy link

cmy82 commented May 6, 2022

Everything is recreated on rotation, so the target should move with the anchored view. The only thing that would need to be adjusted are your buttons and possibly the text view, but if you are using a ConstraintLayout, then they will move as well with the rotation. If your views are that different with different orientations, you'll have to check the orientation before setting the target/spotlight layout and set it accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants