Javascript is disabled by default in WebView, and you are loading a page
that requires Javascript. Either change the page or enable Javascript:
getSettings().setJavaScriptEnabled(true)
Eugene wrote:
> I am trying to perform a simple task - load a URL into my activity.
> When I start the application, the phone's screen turns white (as if
> something is about to start loading) and stays white... Nothing else
> happens. Am I doing something wrong? Thanks a bunch.
>
> I am using Eclipse 3.3.1.1 with the Android plugin
>
> Here is the code:
> public class MyLauncher extends Activity {
>
> private WebView wv;
>
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> wv = new WebView(this);
> setContentView(wv);
> }
>
> @Override
> protected void onStart() {
> super.onStart();
> wv.loadUrl("http://www.google.com/");
> }
> }
>
> Here is the security definition:
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
> package="myapp.android"
> android:versionCode="1"
> android:versionName="1.0.0">
> <application android:icon="@drawable/icon" android:label="@string/
> app_name">
> <activity android:name=".MyLauncher"
> android:label="@string/app_name">
> <intent-filter>
> <action android:name="android.intent.action.MAIN" />
> <category
> android:name="android.intent.category.LAUNCHER" />
> </intent-filter>
> </activity>
> </application>
> <uses-permission android:name="android.permission.INTERNET"></uses-
> permission>
> </manifest>
--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.9 Published!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---