I want the user to input their search query into a search widget and then have the search results displayed to them and then when they click on a url that they want, I need to be able to save that url for use in other parts of my application.
Is this possible, and if not what are some of the restrictions preventing this?
EDIT — I figured I’d add the code for my activity that has the webview.
public class State extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final boolean customTitleSupport = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.state);
if( customTitleSupport ){
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title );
}
final TextView myTitleText = (TextView)findViewById(R.id.my_title);
if( myTitleText != null ){
myTitleText.setText(R.string.app_name);
}
WebView stateBrowser = (WebView)findViewById(R.id.state_search);
stateBrowser.loadUrl("http://www.google.com/");
}
}
you need to use something called WebViewClient
`