Have some problem: I create simple Activity with webview. If you visit
Facebook Mobile, you will notice that you can scroll to the bottom of
the page and when you do, more loads posts - via default browser. But
this is not working in my webview.
The other thing that also needs to be fixed is the "More" button on
the top right corner. The menu itself works when you touch the "more"
button but none of the menu items are clickable in my webview. Can
anyone help me?
public class FacebookProjActivity extends Activity {
WebView webview;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.setWebViewClient(new FacebookProWebViewClient());
webview.loadUrl("http://m.facebook.com");
}
@Override
protected void onDestroy() {
super.onDestroy();
}
private class FacebookProWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView webview,
String url) {
webview.loadUrl(url);
return true;
}
}
}
and main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en