An Activity can use setContentView(View view) to display different interfaces and pass in different views. This method is allowed to be called multiple times. But it is not recommended to use it this way, especially if you are using webview. Web page tags will give you a headache. Webview takes up a lot of memory. If memory recycling is not controlled well, this page will be a huge pit in the future. Let webview handle web page jumps internally. As for the AJAX repeated loading problem you mentioned, I think improving your loading mechanism would be a better solution. The multi-webview method does not guarantee that your web page will not be reloaded. When the memory is occupied to a certain extent, your webviews that are not displayed in the foreground may be recycled, and re-displaying them in the foreground will inevitably be accompanied by a reload process.
An Activity can use setContentView(View view) to display different interfaces and pass in different views. This method is allowed to be called multiple times. But it is not recommended to use it this way, especially if you are using webview. Web page tags will give you a headache. Webview takes up a lot of memory. If memory recycling is not controlled well, this page will be a huge pit in the future. Let webview handle web page jumps internally. As for the AJAX repeated loading problem you mentioned, I think improving your loading mechanism would be a better solution. The multi-webview method does not guarantee that your web page will not be reloaded. When the memory is occupied to a certain extent, your webviews that are not displayed in the foreground may be recycled, and re-displaying them in the foreground will inevitably be accompanied by a reload process.