Closed arjunbabuc closed 2 years ago
@arjunbabuc Would you please check to set all the settings on top (common for if-else) then based on the condition you can set the adapter and try for listener let me know if that's working?
@sparrow007 each time setting adapter make properties inactive. Anyway i solved this by updating current adapter using update function. Now its working fine
@arjunbabuc I am glad that you solved it, but I will look into these properties inactive thanks for this.
if(selectedTeam=="homeTeam") { adapter = carousalViewAdapter( homePlayerList!!, basketballData.getTeams[0].colors[0] ) carouselRecyclerview.adapter = adapter carouselRecyclerview.set3DItem(false) setIntervalRatio(0.7f) carouselRecyclerview.setAlpha(true) carouselRecyclerview.setInfinite(false) } else { adapter = carousalViewAdapter( awayTeamPlayerList!!, basketballData.getTeams[1].colors[0] ) carouselRecyclerview.adapter = adapter carouselRecyclerview.set3DItem(false) setIntervalRatio(0.7f) carouselRecyclerview.setAlpha(true) carouselRecyclerview.setInfinite(false) }
In this case ItemSelectListener will only work when all property settings are removed. property will change each time when we set adapter also