ChartProgressBar-Android icon indicating copy to clipboard operation
ChartProgressBar-Android copied to clipboard

selectBar(int index) This method does not work well.

Open Afanbaby opened this issue 6 years ago • 8 comments

selectBar(int index) This method does not work well. please help me! thanks you!

Afanbaby avatar Dec 12 '18 08:12 Afanbaby

Hello,

can you add more details please, what is happening exactly?

hadiidbouk avatar Dec 12 '18 10:12 hadiidbouk

I would like to default that the last one is selected, but I set this method, no effect, or I use the wrong way.

   chartProgressBar.setDataList(dataList);
    chartProgressBar.build();
    chartProgressBar.selectBar(dataList.size());
    chartProgressBar.setOnBarClickedListener(this);

Afanbaby avatar Dec 13 '18 01:12 Afanbaby

dataList.size() Should be dataList.size() - 1?

hadiidbouk avatar Dec 13 '18 07:12 hadiidbouk

I set dataList.size() - 1,But it didn't work. I would like to default that the last one is selected, Run demo,It's also not easy to use.

Afanbaby avatar Dec 13 '18 07:12 Afanbaby

Any update on this ?

hadiidbouk avatar Apr 24 '19 13:04 hadiidbouk

It will simply crash so as @Afanbaby says... it's not working properly

Shusshu avatar Nov 22 '19 15:11 Shusshu

the issue is due to the selectBar is executed before the pins are set, which leads to pins.get((int) frameLayout.getTag()).setVisibility(View.VISIBLE); causes runtime exception cause of pins is empty. i have it working with postDelay on the selectBar ... but would be great if anyone had a better solution.

IriscShih avatar May 11 '20 19:05 IriscShih

Hi every body, It's always saying size = 0 and then crash Can anybody will help me?

punksbcha avatar Apr 06 '21 08:04 punksbcha