armcha / armcha/Space-Navigation-View

setCentreButtonSelected() not working

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

Description

I would like to select as initial button the center button, I've set the center button item with a custom color.
When the app starts the center button is not actually highlighted, if I change fragment and than click back to the center button it highlights correctly. Can someone help me?

I'msetting the SpaceNavigationView in the MainActivity onCreate, here is my code:

`

spaceNavigationView.setCentreButtonRippleColor(ContextCompat.getColor(this, R.color.colorPrimary));
//Hide icon text
spaceNavigationView.showIconOnly();

//Center button selectable
spaceNavigationView.setCentreButtonSelectable(true);

spaceNavigationView.setCentreButtonSelected();`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in MainActivity.onCreate by reproducing the setup using setCentreButtonRippleColor, showIconOnly, setCentreButtonSelectable, and setCentreButtonSelected. Compare the initial state with the state after changing fragments and returning to the center button; done means the center button is highlighted immediately when the app starts.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
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.