I meet web view problem. It cannot connect to network via webview.

by charles » Fri, 04 Sep 2009 01:59:44 GMT


Sponsored Links
 Hi all,

I can use browser to open the  http://www.google.com , but I cannot use
webview to open google page.

source code below.

        setContentView(R.layout.main);

        webview = (WebView) findViewById(R.id.webview);
        webview.getSettings().setJavaScriptEnabled(true);
        webview.loadUrl(" http://www.google.com ")

In AndroidManifest.xml, I also add permission. You can look below.

       <uses-permission android:name="android.permission.INTERNET" />

I cannot connect web via webvie.

Perhaps, this issue is proxy problem.

Can you give me some suggest to solve this issue?

Thanks,

Charles

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. ImageView - Can't read dimensions

I am trying to display an image at different scales within an
ImageView which is part of a larger LinearLayout.  Unfortunately, when
trying to calculate scaling factors, I am unable to read the
ImageView's dimensions.  The following code displays "Screen: 0, 0" in
the TextView, rather than the dimensions of the ImageView, as
expected.

I have tried this in 2.0 and 2.1.

What am I doing wrong?


ViewZoom.java: (included files left out for brevity)

public class ViewZoom extends Activity {
    ImageView mIv = null;
    TextView mTv = null;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mIv = (ImageView)findViewById(R.id.image);
        mTv = (TextView)findViewById(R.id.text);
    }

    @Override
    protected void onResume()
    {
        super.onResume();

        int screenWidth = mIv.getWidth();
        int screenHeight = mIv.getHeight();

        mTv.setText("Screen: " + screenWidth + ", " + screenHeight +
"\n");
    }
}


main.xml:

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:adjustViewBounds="true"
        android:id="@+id/image"/>

    <TextView
        android:layout_height="fill_parent"
        android:layout_width="wrap_content"
        android:layout_weight="1"
        android:id="@+id/text"/>

</LinearLayout>


Thank-you for your consideration.

-- 

2. Google map view uses which protocol

Hello Gurus,


Which protocol does google map uses?
Any particular documents that enlighten my query, if some one provides
would be really grateful !!

What authentication level it uses and its processes? I know about the
apikey token that need to use along with the mapview attribute in the
res layout.

Re,
yc

-- 

3. Getting contact phone numbers in a custom data layout.

4. 3-way calling enhancement

5. Weirdness with Notification.FLAG_AUTO_CANCEL

6. Socket problem n WIFI

7. Keyboard virtualization