Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top