Re: [android-developers] Loading html file on view
Hi Everyone, Thanks for support. I am able to solve my problem here is the code WebView browser; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.aboutus); browser=(WebView)findViewById(R.id.webkit); browser.loadUrl("file:///android_asset/about.html"); On Tue, Nov 2, 2010 at 9:59 AM, Mark Murphy wrote: > On Tue, Nov 2, 2010 at 10:28 AM, Amit Mangal > wrote: > > I want to load local html page on web view > > is this possible on android or not ? > > Yes. Use the WebView widget. Use loadUrl() (and a file:/// URL) or > loadData() to give it the HTML. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > Android 2.2 Programming Books: http://commonsware.com/books > > -- > 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 > -- 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
Re: [android-developers] Loading html file on view
On Tue, Nov 2, 2010 at 10:28 AM, Amit Mangal wrote: > I want to load local html page on web view > is this possible on android or not ? Yes. Use the WebView widget. Use loadUrl() (and a file:/// URL) or loadData() to give it the HTML. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 2.2 Programming Books: http://commonsware.com/books -- 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
Re: [android-developers] Loading html file on view
I want to load local html page on web view is this possible on android or not ? On Tue, Nov 2, 2010 at 6:54 AM, Amit Mangal wrote: > lay out xml file where i want to load html page. > html page just having 2 images and one link i want to display this html > page only . > html page i saved locally and images are also local. > > i just want to open this html page on view dont want to load this page from > internet. > > > On Tue, Nov 2, 2010 at 6:17 AM, Mark Murphy wrote: > >> What XML file? >> >> On Tue, Nov 2, 2010 at 9:11 AM, Amit Mangal >> wrote: >> > Means i should remove .xml file ? >> >> -- >> Mark Murphy (a Commons Guy) >> http://commonsware.com | http://github.com/commonsguy >> http://commonsware.com/blog | http://twitter.com/commonsguy >> >> Android 2.2 Programming Books: http://commonsware.com/books >> >> -- >> 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 >> > > -- 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
Re: [android-developers] Loading html file on view
lay out xml file where i want to load html page. html page just having 2 images and one link i want to display this html page only . html page i saved locally and images are also local. i just want to open this html page on view dont want to load this page from internet. On Tue, Nov 2, 2010 at 6:17 AM, Mark Murphy wrote: > What XML file? > > On Tue, Nov 2, 2010 at 9:11 AM, Amit Mangal > wrote: > > Means i should remove .xml file ? > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > Android 2.2 Programming Books: http://commonsware.com/books > > -- > 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 > -- 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
Re: [android-developers] Loading html file on view
What XML file? On Tue, Nov 2, 2010 at 9:11 AM, Amit Mangal wrote: > Means i should remove .xml file ? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 2.2 Programming Books: http://commonsware.com/books -- 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
Re: [android-developers] Loading html file on view
Means i should remove .xml file ? On Tue, Nov 2, 2010 at 6:05 AM, Mark Murphy wrote: > You cannot load an HTML file in an arbitrary view. Use WebView to > display HTML, or use Html.fromHtml() to create a SpannedString you can > use with TextView (suitable for very basic HTML). > > On Tue, Nov 2, 2010 at 9:02 AM, Amit Mangal > wrote: > > Hi Every one > > I have one html file and i want to load that html file in view for > loading > > png images i was doing > > android:background="@drawable/tips" this in xml file but how to load html > > file in view ? > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > Android 2.2 Programming Books: http://commonsware.com/books > > -- > 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 -- 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
Re: [android-developers] Loading html file on view
You cannot load an HTML file in an arbitrary view. Use WebView to display HTML, or use Html.fromHtml() to create a SpannedString you can use with TextView (suitable for very basic HTML). On Tue, Nov 2, 2010 at 9:02 AM, Amit Mangal wrote: > Hi Every one > I have one html file and i want to load that html file in view for loading > png images i was doing > android:background="@drawable/tips" this in xml file but how to load html > file in view ? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 2.2 Programming Books: http://commonsware.com/books -- 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