webview in tabhost
Posted
by
user1905845
on Stack Overflow
See other posts from Stack Overflow
or by user1905845
Published on 2012-12-18T10:57:01Z
Indexed on
2012/12/18
11:03 UTC
Read the original article
Hit count: 142
android
I am new to android. I am using webview
inside tabview
. In my app in first activity
facebook
button available.when click facebook
button connect to facebook
in second activity
inside tabs fine.In second activity
i am using webview
. this is the code.
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.facebook);
wvFacebook=(WebView)findViewById(R.id.webview);
btnBack=(Button)findViewById(R.id.back);
txtBarname=(TextView)findViewById(R.id.barnameheader);
if(check==1){
strFacebook=MyBarsActivity.strFacebook;
Log.e("Facebook url",strFacebook);
strBarName=MyBarsActivity.strBarName;
}
wvFacebook.setWebViewClient(new MyWebViewClient());
wvFacebook.loadUrl(strFacebook);
}
private class MyWebViewClient extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.getSettings().setJavaScriptEnabled(true);
view.loadUrl(url);
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
// progressDialog.show(getParent(), "In progress", "Loading, please wait...");
}
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
}
But my problem is when i click connect button facebook page will be displayed well inside tabs.But when i click emial or username and password button it is not responding.Why it is not responding please help me regarding this.thanks in advance.
© Stack Overflow or respective owner