I have two Activity, Main and Rbrowser Activity. In Main Activity a list of urls is shown. When a link is clicked, Rbrowser Activity is launched. For each launch setContentView(R.layout.rbrowser); is called from onCreate, which is slow.
Is there any good practice to reuse Activity's instance, and just reload Rbrowser's webview with new url?
Thanks
Your problem is not the setContentView(), it can't make an app slow, it is executed in microseconds even on the slowest of devices. Are you loading some ArrayLists or HashMaps or any other bulky variable in the memory in the onCreate() ? If yes, try doing that in a seprate thread or via an AsyncTask.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With