문제

Is there any way to update the progress bar which is child view (row) of GalleryView with baseAdaptper.

I have tried some with this code

mProgressBar = (ProgressBar) ((View) mGalleryView.getChildAt(position))
                            .findViewById(R.id.progressBar);
mProgressBar.setProgress(value);

It is working fine but progress bar not filling completely.

For more clarity please check the attached images. When I am trying to update the progressbar with in the gallery it looks some what like this.

enter image description here enter image description here

Expecting to be.

enter image description here enter image description here

Thanks in advance.

도움이 되었습니까?

해결책

I am Posting Answer to my own Question. I would like to thank Andro Selva who showed his interest to solve this question.

mProgressBar = (ProgressBar) ((View) mGalleryView.getChildAt(position))
                            .findViewById(R.id.progressBar);
mProgressBar.setMax(100);
mProgressBar.setProgress(value);

After the above lines of code.

mGalleryView.invalidate();

adding above line resolved my issue to get expecting output.

Regards Vinay Kumar

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top