Hello All,

I am using tab layout and in each tab i want to open different
webview,

means at a time i can work with suppose three tabs

and can open different urls withing it.

But the problem is WebView always opens in full screen mode.......

So is there any way to manage the webview n to open them in tabs
simultaneously.

I am showing below the code of main.xml and one of the three java
files that using for tab.

main.xml

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android";
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:padding="5dp">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:padding="5dp" />
    </LinearLayout>
</TabHost>


Twitter_Activity .java

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;


public class Twitter_Activity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        WebView webview_for_twitter = new WebView(this);
        setContentView(webview_for_twitter);
        webview_for_twitter.getSettings().setJavaScriptEnabled(true);
        webview_for_twitter.loadUrl("http://www.twitter.com";);
    }
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to