So - to clarify: You have some text input and if it is a valid URL you want to display the URL in the WebView and if it is not you want to display a search page with the entered text?
You can try-catch and make an URL object from the entered text - if it succeed you have a valid URL to show. On Mon, Aug 5, 2013 at 9:10 PM, SonyPhoneGuy <[email protected]> wrote: > Hello, > > I would like to make a search interface on android with Eclipse. > > I have managed to add a search box on my form by using the menu xml which > shows on the form action bar. I also have an webview on my form that is to > load what is entered into the search box. > > I was wondering if there was an easy way to do websearch (if the entered > term is not a webresource) or to display the webpage if the search term is > correct ... rather like how the native browser does it on android. > > Thank you. > > -- > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Michael Banzon http://michaelbanzon.com/ -- -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

