Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Change the button position before all the things #32

Open
guuilp opened this issue Oct 10, 2017 · 1 comment
Open

Change the button position before all the things #32

guuilp opened this issue Oct 10, 2017 · 1 comment

Comments

@guuilp
Copy link

guuilp commented Oct 10, 2017

One problem that I have today is: If I put a code that is a little bit slow, inside the radioGroup listener, the button position only changes when the processing finishes. This is very awkward when it comes to user experience. Could you change the button position before anything?

radioGroup.setOnClickedButtonListener(RadioRealButtonGroup.OnClickedButtonListener {
            button, position ->

            if(position != currentPosition) {
                when (button) {
                    ratingButton -> {
                        playersInFastAdapter.clear()
                        playersRating?.forEach {
                            playersInFastAdapter.add(PlayerListRankingComplete(this, it, App.CARD_RANKING_RATING_LIST))
                        }
                    }
            }
@SBD580
Copy link

SBD580 commented Mar 8, 2018

New selected position should be set before calling listeners (as a general rule)

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

No branches or pull requests

2 participants