B4A Library HTML TextView V1.0

Discussion in 'Additional libraries, classes and official updates' started by DonManfred, Feb 15, 2015.

  1. DonManfred

    DonManfred Expert Licensed User

    With this library you can use kind of a new view. A Textview which can show a subset of the html-language

    tv1.setHtmlFromString("<b><u>Hello B4X community</u></b><br><font face='monospace' color='#0000FF' size='6'>I wish you all a nice Sunday!</font><br><br><img src='http://www.b4x.com/images/Logo_on-dark.png'/>",False)
    "<b><u>I LOVE CATS</u></b><br><br><img src='http://snapshots.basic4android.de/cats_dogs.png'/>",False)


    Know issues:
    - i was not able to figure out why a fontsize dont get used.

    But as i like this library i share it with you even if the fontsize can not be changed actually.

    Maybe i just tried in in a wrong way. Please let me know if YOU know how this works :D

    Attached Files:

    fredo, Syd Wright, Mashiane and 10 others like this.
  2. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    Thank you.
    Can i use external font?
  3. DonManfred

    DonManfred Expert Licensed User

    Please note the last parameter. If set to true then the image src expect just a filename (NO URL) without extension.
    The file (must be png) will be loaded from res/drawable
    for example
    If you use this
    'tv1.setHtmlFromString("<b><u>I LOVE CATS</u></b><br><br><img src='cats_dogs'/>",True)
    then the file cats_dogs.png will be loaded from the folder drawable inside your res folder (or the resourcefolder you set with #AdditionalRes)
  4. DonManfred

    DonManfred Expert Licensed User

    I dont know. The lib is a wrapper for this Github Project. There is not much on Documentation ;)
  5. JohnK

    JohnK Active Member Licensed User

    It may only support "old" HTML tags, so you need to get "old-school" on its ar$e. Try the following:
    tv1.setHtmlFromString("<b><u>Hello B4X community</u></b><br><h1><font face='monospace' color='#0000FF'>I wish you all a nice Sunday!</font></h1><br><br><img src='http://www.b4x.com/images/Logo_on-dark.png'/>",False)
    The old "h1" tags from yester-year appear to have some effect.
    DonManfred likes this.
  6. watesoft

    watesoft Active Member Licensed User

    I download the latest version html-textview 2.0,who can help me to build it,for I don't have a Compile environment. thank you very much.

    Attached Files:

  7. tuhatinhvn

    tuhatinhvn Active Member Licensed User

    any one can set size for html textsize??
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice