Hello everybody,
since 1.5 I have a strange problem. I hope sombeody can help me.
I'm using 2 activities. The second includes a WebView. But the WebView
is never shown inside this activity. Instead it's launched in a new
browser. (e.g. pressing back button leads me back to the second
activity)
Code in first activity to start the other activity:
Intent i = new Intent(this, ShowDetails.class);
i.putExtra("link", item.getLink());
startActivity(i);
Layout of second:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
Inside onCreate in second activity:
setContentView(R.layout.showdetails);
String link = "";
Intent intent = getIntent();
Bundle b = intent.getExtras();
link = b.getString("link");
WebView content = (WebView)findViewById(R.id.webview);
content.loadUrl(link);
Regards
Thomas
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---