• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Webbrowser

gracy

Newbie
Here is my program.
Code:
public class webkit extends Activity {
    /** Called when the activity is first created. */
    WebView browser;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        browser=(WebView) findViewById(R.id.webkit);
        browser.loadUrl("http://www.dramacrazy.net");
       // browser.loadUrl("http://localhost/Third" );
        
    }
}
Code:
<?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  
    android:id="@+id/webkit"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    
    />
</LinearLayout>
I have also add the following line the manifest.xml
<uses-permission android:name="android.permission.INTERNET" />

But the program shows only blank for every url.

What is the problem?

No, after a very long time, "web page not available" message is shown on the emulator.
But I can access the Internet from my laptop.
What is the problem?
 
Back
Top Bottom