[android-developers] Re: working WebView example?
lol well, i did figure it out four years ago On Mon, Dec 10, 2012 at 10:15 AM, Roney Kakkanatt wrote: > To learn how to make a simple WebView Application > > http:/ > www.androidituts.blogspot.com/2012/12/android-tutorial-sample-webview.html > > For more tutorials > > Visit:www.androidituts.blogspot.com > -- 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
[android-developers] Re: working WebView example?
benadamx wrote: > yey folks, > > wondering if anyone can provide a quick WebView example that > successfully loads a page from the interweb; most of the examples I've > found either contain code that isn't valid againt the latest version > of the SDK, or that just outright doesn't work. here's what I have so > far: > > public class SuperDoodad extends Activity { > > public void onCreate(Bundle icicle) { > > super.onCreate(icicle); > WebView webview = new WebView(this); > webview.loadUrl("http://www.stumbleupon.com";); > setContentView(webview); > > } > > } Do you have the INTERNET permission in your AndroidManifest.xml file? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: working WebView example?
There is a WebViewDemo app which worked fine for me. http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/Samples/WebViewDemo Anders On Nov 18, 5:36 pm, joshv <[EMAIL PROTECTED]> wrote: > Try putting the WebView in your layout, assigning it an appropriate > ID, and then in onCreate get a reference to it using: > > setContentView(R.layout.webtest); //Or whatever the name of your > layout containing the webview is. > WebView wv = (WebView)findViewById(R.id.webViewID); > > This works for me. > > -josh > > On Nov 17, 3:36 pm, benadamx <[EMAIL PROTECTED]> wrote: > > > > > yey folks, > > > wondering if anyone can provide a quick WebView example that > > successfully loads a page from the interweb; most of the examples I've > > found either contain code that isn't valid againt the latest version > > of the SDK, or that just outright doesn't work. here's what I have so > > far: > > > public class SuperDoodad extends Activity { > > > public void onCreate(Bundle icicle) { > > > super.onCreate(icicle); > > WebView webview = new WebView(this); > > webview.loadUrl("http://www.stumbleupon.com";); > > setContentView(webview); > > > } > > > } > > > .. this builds and runs fine, but fails to load the page, giving me a > > 'Web page not available' error. > > > I have granted this app Internet permissions; what am I missing?- Hide > > quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: working WebView example?
Try putting the WebView in your layout, assigning it an appropriate ID, and then in onCreate get a reference to it using: setContentView(R.layout.webtest); //Or whatever the name of your layout containing the webview is. WebView wv = (WebView)findViewById(R.id.webViewID); This works for me. -josh On Nov 17, 3:36 pm, benadamx <[EMAIL PROTECTED]> wrote: > yey folks, > > wondering if anyone can provide a quick WebView example that > successfully loads a page from the interweb; most of the examples I've > found either contain code that isn't valid againt the latest version > of the SDK, or that just outright doesn't work. here's what I have so > far: > > public class SuperDoodad extends Activity { > > public void onCreate(Bundle icicle) { > > super.onCreate(icicle); > WebView webview = new WebView(this); > webview.loadUrl("http://www.stumbleupon.com";); > setContentView(webview); > > } > > } > > .. this builds and runs fine, but fails to load the page, giving me a > 'Web page not available' error. > > I have granted this app Internet permissions; what am I missing? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---