sorry,about first quest, I want the variable can deliver between different .java in the same project.
2009/6/19 Tsai stanly <tsai.sta...@gmail.com> > thanks for your reply, > > for first question, > how can i do the garbage collection? > for second, > i was implement,but haw can get the link "address"? > > my code of implement shouldOverrideUrlLoading is bellow, > how can i get address? thanks! > > private class class_WebViewClient extends WebViewClient { > @Override > public boolean shouldOverrideUrlLoading(WebView view, String url) { > view.loadUrl(url); > return true; > } > } > 2009/6/19 Mark Murphy <mmur...@commonsware.com> > > >> > one is how can I define a global variable that can deliver between >> > several activities? >> >> If the activities are all in your process, you can use a public static >> data member. Be careful, though, that you do not mess up your garbage >> collection -- things held onto from static data members never get garbage >> collected. >> >> > two is how can I get the website address when I link to other sites? >> > for detail, >> > i use the webview to browse the web,but when i click the link on the >> > web, >> > i want to get the linking address >> >> Attach a WebViewClient to your WebView, then implement >> shouldOverrideUrlLoading() on the WebViewClient. >> >> -- >> Mark Murphy (a Commons Guy) >> http://commonsware.com >> _The Busy Coder's Guide to Android Development_ Version 2.0 Available! >> >> >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---