ismaeldivita / chip-navigation-bar

An android navigation bar widget
MIT License
877 stars 135 forks source link

setItemSelected calls setOnItemSelectedListener everytime #69

Closed AkshayAshokCode closed 3 years ago

AkshayAshokCode commented 3 years ago

Context: when the user clicks on any item from chip-navigation-bar then setOnItemSelectedListener is called then he has to pass through a Dialog box in which if he presses "No" he will stay in the current activity. Problem: So the problem is after pressing "No" the clicked item stays selected so if I try to set the previous/default item selected by setItemSelected then it also calls setOnItemSelectedListener again which repeats the Dialog box part!! Is there any recommended way to fix it?

Thank you!

ismaeldivita commented 3 years ago

This https://github.com/ismaeldivita/chip-navigation-bar/pull/76 will open the setItemSelected function and enable you to send false to dispatchAction, this will prevent the listeners to be triggered.

AkshayAshokCode commented 3 years ago

'setItemSelected(int, boolean, boolean)' has private access in 'com.ismaeldivita.chipnavigation.ChipNavigationBar' This function doesn't have a public access yet. I add this dependency "'com.github.ismaeldivita:chip-navigation-bar:1.3.4'" is there any update to it in which I can find setItemSelected as Public? Thank you for the Reply!

ismaeldivita commented 3 years ago

This change was not released yet

On Sat, Jul 10, 2021, 5:12 PM Akshay Ashok @.***> wrote:

'setItemSelected(int, boolean, boolean)' has private access in 'com.ismaeldivita.chipnavigation.ChipNavigationBar' This function doesn't have a public access yet. I add this dependency "'com.github.ismaeldivita:chip-navigation-bar:1.3.4'" is there any update to it in which I can find setItemSelected as Public? Thank you for the Reply!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ismaeldivita/chip-navigation-bar/issues/69#issuecomment-877662459, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4DWTW7HF6JSLSDZEEJHETTXBWORANCNFSM45AMIOWQ .

AkshayAshokCode commented 3 years ago

When can we expect it to be released?⏳︎