On Tue, Aug 3, 2010 at 10:27 AM, guich <guiha...@gmail.com> wrote: > I already tried a Dialog, but the events of the WebView are frozen, > and also the size does not take all the screen. > > So, i'm trying to do it with an Activity: > > class WebViewer extends Activity > { > String url; > public void onCreate(Bundle savedInstanceState) > { > super.onCreate(savedInstanceState); > WebView webview = new WebView(this); > setContentView(webview); > webview.loadUrl(url); > } > > public WebViewer(String url) > { > this.url = url; > } > } > > ... but i'm not being able to run it. I tried this: > > WebViewer w = new WebViewer(args); > w.startActivity(new Intent()); > > It doesn't work. I think that the problem is that i'm not selecting > the right intent.
You never create an instance of an activity yourself. You create an Intent that identifies the activity to be started and call startActivity() from your existing activity. Here is an example: http://github.com/commonsguy/cw-android/tree/master/Prefs/Simple/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- 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