I am using jFeinstein’s sliding menu library .I am replacing the content by loading a web view each time an item in list is clicked.I am loading webpages in my webview (contentframe) with LoadDataWithBaseURL using html pages in my assets.The sliding menu action occurs first before the web page loads completely.(It’s a heavily loaded web page).I want the sliding animation because of getSlidingMenu().showContent(); to happen only after the commit completes execution ..ie after my web page loads the html.Can anyone help.
getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, fragment).commit();
getSupportFragmentManager().executePendingTransactions();
getSlidingMenu().showContent();
Can anyone help me.Is there any technique to know whether the transaction is done or can i speed up web view loading process.?
try implementing a listener in your fragment and using a custom WebViewClient call your listener in onPageFinished method. Then in your activity call showContent() from listener method.