Styling an android activity with html? - android

I am trying to add a "help" screen to my application. I inserted all of my text in, but I can't make it look how I want. Is it possible to use html to style and organize my text?

Yes you can create Html file in assets and use that into WebView. WebView for a HTML page display in Android app is a very good example for that.
You can also refer Android WebView Complete Example Tutorial

Related

I need to display only part of web page on android web view but I couldn't do with using Jsoup

I need display only specific part of web page on my webview and I tried it using Jsoup but selected part is display without java-script functionality and CSS styles. Jsoup display specified part but just only HTML elements and I can do nothing with it.
Can I do with zoom ? then how can I set initial zoom for specific area and I need to disable zoom option for users because if they adjust zoom then other part of web page will display.
How can I do this ?
You can do this by iFrame (HTML) , No neet to use Jsoup Also, Jsoup is exclusively made for data scraping.
Find out more here : link
Just make a html file in /assets folder in android studio and load that file in web view and you are done!

Render Native Components in between HTML tags on a webview

Can we embed our native Android components in between the normal HTML content and then render it on a webview?
For example, in a simple HTML page, if there is a button, I want to replace it with a Native Android Button.
How can we do that?
As far as I know, this is not possible with WebView (unless you split the HTML into multiple parts and render it in multiple WebViews with your button inserted inbetween, which may or may not work in your case).
Depending on the complexity of your HTML, you may want to consider this github project that renders HTML with native Android widgets: https://github.com/kobjects/htmlview

Replicate html state in a android native way

Let's say I have an HTML page which has CSS bound, all parsed from JSON data; is there a way to reproduce exactly ( with responsivity as well ) the same visualization in an android application with no webview ?
My goal is to have a html product that I can see also on an application, but with native elements.
EDIT
maybe this semplifies the situation: how to share HTML between mobile and web?
textview.setText(Html.fromHtml(HTML_STRING));

Where should I place this library in my android app?

I just downloaded this library ( http://mathscribe.com/author/jqmath.html ) to display equations. Now I have my equation in an html document. So far so good. My question is:
Can I just load that html document in a textview in my android app?
If so, where do I have to place those the html document and the jquery library in eclipse?
this tut might be useful
http://www.mobiledevelopersolutions.com/home/start/included-demo-apps
and you may have a similar problem so consider the following
Help using JQuery in Android WebView
You can display HTML content into a WebView control in your Android app.
You can place the html document into the app assets.

Custom pdf viewer in android

I need to have a custom pdf viewer inside my application where i have my own menu and all.
It is not working with webview and i tried by converting each page into image but i feel its not a good way and it make my application big and complex.
Is there any way to create custom pdf view in
suggest me some link and tutorial
Thanks
You obviously need a pdf renderer/viewer. Since core Android OS does not provide one you will need a 3rd party one.
Take a look at http://andpdf.sourceforge.net/

Categories

Resources