What were the blocks for adding refresh button?

What were the blocks for adding refresh button?

What do you mean by refresh button? Any component that it can be clicked can be used as a refresh button.

2 Likes

Hello,
I think what you are looking for is that block, the refresh icon is an image.

1 Like

I have tried this but it wasn’t working.
May, I complete blocks to have refresh button

To make a refresh button you have to tell the button to do again what was done the first time.
For example, if you get data when you start the screen, the refresh button has to search for that data again

Can you show what you hav done please?

I know it is wrong but I’m unable to get the perfect execution. I’m trying my level best

When you open the app, does the refresh button appears?
Instead of adding it at when screen initialize, why not adding it at when menu initialize as suggested in Kodular Documentation.
Also, where is the event handler for that button?

1 Like

Even, I tried in that way too, didn’t it wasn’t working.
If you don’t mind, Will you do that and send a screen shot.

I can do it but you will have to wait until later because I’m not home and don’t have an access to a computer now.

Use the Menu Initialize event instead.

Show your blocks on the Screen.Initialize

component_event

When you start the app, data is loaded? From where?

Where do you get the data from? Where do you display it?

Yeah!
I have tried using menu initialize but it isn’t working. Can you make it and send screen shot of complete blocks for refresh button?

I think you don’t really understand the concept of a refresh button.

When you click that button you have to do something again that you already did, like loading data, showing something.

What you’re doing there is just showing a button.

If that’s all you’ve done with your app, keep doing it and then you’ll be doing the refresh button

Yeah! What you said is completely correct and I accept it. But, I was not able to go further. Literally, I’m in a confusion btw those blocks

Then you have to be clear about what you are doing in your application, what data you are showing and where. And then make that happen inside the button:

01

In the red arrow of the image you should put what you want that button to show or do

Well actually I’m using a webviewer. In the webview I’m gonna use refresh option as swipe refresh in kodular don’t work proper in webview

So if you do this, it will reload the page in the web viewer:
02

When you click the button, the web viewer reloads

1 Like

Yeah thank you very much for the information. But, I am using another title bar icon also that is back button. Back button is working perfectly.