I have created multiple webview with one custom webview extension of kodular. But When I Press back it works only for one id and not another

I have created multible webview with one custom webview extension of kodular. But When I Press back it works only for one id and not another. how to fix it?

This is the code I am using.

blocks (8)

Thanks in advance.

component_method

Before changing any settings and parameters you have to choose WebView ID you would like to take effect.

So for every WebView you created you have to firstly set the ID and then apply the changes and so on. The ID is set to the first created WebView automatically, that’s why only one WebViewer works as u want.

1 Like

I have set webview id respectively. for one website as 1 and for another as 2. and have kept different vertical arrangements for each ID. Still it is not working!!

All blocks will be executed on same webview until you change active webview using this block:

Read @HeyAveHey 's post again

webview keeps on changing. A user can switch from webview id 1 to 2. I using viewpage along with custom webview, so a user can switch between the two with mere swipe.

So how to change it dynamically when back pressed?

Change active webview when View Pager is swipped.

now what to do after this, how to set webview id dynamically?

blocks (9)

This will be easier to do if you create webview with id respective to View Pager position.
For example, first position will contain first webview with id as 1 and so on.
Then when Page is selected just get the position and make that webview active.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.