armcha / armcha/Space-Navigation-View

Provide a way for the SpaceOnClickListener to veto switching to the clicked item

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
2k
Forks
376
PR merge metrics
No merged PRs in 30d

Description

Under certain circumstances I want to do something when one of the items is clicked, but prevent that item from being selected as the current item. Could be implemented as the onItemClick method instead of being void returning a boolean, indicating whether it wants to allow the view to switch to the clicked item or not.

I tried to work around that by setting the currently selected item back to the previous one from the click listener itself, but that doesn't work as the actual switch to the clicked item only occurs after the listener has been called.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating SpaceOnClickListener and the code that switches to the clicked item after the listener runs. Trace the click flow and define the listener result needed to allow or veto selection; done means a clicked item can trigger the callback without becoming current when vetoed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.