How to make a spinning wheel progressbar display as a popup view

I have a button, I want while button clicked, show a spinning wheel progressbar on top of the button, similarly to the demo of popupview below:
image

The button is in an actionpane, how to acheive that?

BTW,while I click the button, there is a progressbar exits on top of webpage, but I need the spinning wheel right on the button behavior. Below is the current progress bar
image

Hello @anjingjing

First of all, adding progress spinning wheel on a top of a button can lead to layout problems - always free space is needed there to show the spinning wheel.

The most suitable way is to show a progress inside of a button, like this:

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

Please add a pic to describe your needs if i understand you wrong.

Regards,
Daniil.

Hi Daniil,
I tried as you suggested , but it does not solve the case.

I call “iostestviewbutton.setIcon(“icons/1.gif”);” right after button clicked, and then execute my logic.

But the real result is that icon changes after all button logic completed, so it can’t solve the case, I need it change right after button clicked and back to original after button logic completed.

Maybe should change the icon via css? But I don’t know how, I can change the button background color while button focused or clicked. But how to change the icon?

How and when show and close the spinner is the second question. The spinner should be shown before button action is performed and be hidden in the end.

As an option you can set some special action that adds an icon to the button in the beginning, then performs the actual action and in the end reset the button icon.

Could you also clarify where the loader should be shown?

Regards,
Daniil

what do you mean by loader?

I’m talking about progress bar / spinning wheel

right above the button, like below:
image

Okay, thank you.

Unfortunately there is no straightforward way to do it - the custom component have to be implemented.

I can prepare sample project if you need it.

Regards,
Daniil.

Thanks Daniil.
By sample project, which solution do you plan with?

I suggest that it will be some custom component - an extension of default Button.

That seems good! could you help on the sample project, please?

I’ve tried to implement an extension based on PopupView but it turned out that there is an issue which prevents popup program control.

Solution based on Button seems to be not trivial and may take a lot of time.

I’ll let you know if there will be an opportunity.

Regards,
Daniil.

ok, never mind. I will try some other workaround