RadioRealButton icon indicating copy to clipboard operation
RadioRealButton copied to clipboard

Change the button position before all the things

Open guuilp opened this issue 7 years ago • 1 comments

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))
                        }
                    }
            }

guuilp avatar Oct 10 '17 13:10 guuilp

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

SBD580 avatar Mar 08 '18 14:03 SBD580