All Projects → jaredrummler → Htmlbuilder

jaredrummler / Htmlbuilder

Licence: apache-2.0
Build valid HTML for Android TextView

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Htmlbuilder

extra-textview
additional features for TextView
Stars: ✭ 21 (-95.85%)
Mutual labels:  textview
Swiftuix
Extensions and additions to the standard SwiftUI library.
Stars: ✭ 4,087 (+707.71%)
Mutual labels:  textview
Countanimationtextview
A tiny Android library makes very easier count animation of TextView.
Stars: ✭ 392 (-22.53%)
Mutual labels:  textview
LycricsTextView
No description or website provided.
Stars: ✭ 14 (-97.23%)
Mutual labels:  textview
Android Expandabletextview
An expandable TextView for Android applications
Stars: ✭ 268 (-47.04%)
Mutual labels:  textview
Attributedstring
基于Swift插值方式优雅的构建富文本, 支持点击长按事件, 支持不同类型过滤, 支持自定义视图等.
Stars: ✭ 294 (-41.9%)
Mutual labels:  textview
FSAnimatedTextView
Animated Number Text View Library
Stars: ✭ 32 (-93.68%)
Mutual labels:  textview
Stacklabel
🔥空祖家的堆叠标签(以下碎念:一开始起名字“StackLabel”没想太多结果被人吐槽Stack是整齐堆叠的意思...........好吧这是我的锅不过现在要改也来不及了,好用就行了...吧?
Stars: ✭ 471 (-6.92%)
Mutual labels:  textview
Fliptimerview
FlipTimerView library for Android
Stars: ✭ 275 (-45.65%)
Mutual labels:  textview
Advancedtextview
一个增强的TextView库。可以实现文字两端对齐,文字竖排,以及自定义选择文字后的弹出菜单。
Stars: ✭ 365 (-27.87%)
Mutual labels:  textview
CustomFontView
Custom View classes for TextView, EditText & Buttons - to set custom fonts
Stars: ✭ 26 (-94.86%)
Mutual labels:  textview
Gradienttextview
一个颜色逐渐改变的textview,类似歌词效果
Stars: ✭ 267 (-47.23%)
Mutual labels:  textview
Dropdowntextview
Simple drop-down(expandable) TextView for Android
Stars: ✭ 307 (-39.33%)
Mutual labels:  textview
textmatcher
A simple text watcher that matches specific targets like mention or hashtag in a string by defining rules
Stars: ✭ 67 (-86.76%)
Mutual labels:  textview
Text Decorator
Decorate your TextView easily
Stars: ✭ 402 (-20.55%)
Mutual labels:  textview
FOTextLayout
实现文字横竖向切换,实现各种文字的排版,可以某种程度上替代UILabel。
Stars: ✭ 36 (-92.89%)
Mutual labels:  textview
Spedittool
An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText
Stars: ✭ 292 (-42.29%)
Mutual labels:  textview
Flipview
Flipping views like Gmail & beyond
Stars: ✭ 477 (-5.73%)
Mutual labels:  textview
Inputkit
📝InputKit, an Elegant Kit to limits your input text, inspired by BlocksKit, written in both Objective-C & ⚡️Swift.
Stars: ✭ 420 (-17%)
Mutual labels:  textview
Rtextview
基于TextView 1.直接设置selector背景2.直接设置drawableLeft大小 3.圆角,圆形,背景/边框/文字根据状态变色
Stars: ✭ 359 (-29.05%)
Mutual labels:  textview

HTML Builder

Maven Central License API Twitter Follow

Build valid HTML for Android TextView.

Screenshot

Description

There is a lovely method on the android.text.Html class, fromHtml(), that converts HTML into a Spannable for use with a TextView.

However, the documentation does not stipulate what HTML tags are supported, which makes this method a bit hit-or-miss. This small library provides a fluent API for building valid HTML for android.widget.TextView.

Usage

HtmlBuilder html = new HtmlBuilder();
html.p("Lorem ipsum dolor sit amet, denique detraxit reprimique quo in. Ius dicat omnes mucius cu.");
html.font().color("red").face("sans-serif-condensed").text("Red Text").close();
textView.setText(html.build());

HTML Tags Supported by TextView

  • <a href="...">
  • <b>
  • <big>
  • <blockquote>
  • <br>
  • <cite>
  • <dfn>
  • <div align="...">
  • <em>
  • <font color="..." face="...">
  • <h1>
  • <h2>
  • <h3>
  • <h4>
  • <h5>
  • <h6>
  • <i>
  • <img src="...">
  • <p>
  • <small>
  • <strike>
  • <strong>
  • <sub>
  • <sup>
  • <tt>
  • <u>
  • <ul> (Android 7.0+)
  • <li> (Android 7.0+)

Download

Download the latest AAR or grab via Gradle:

compile 'com.jaredrummler:html-builder:1.0.0'

or Maven:

<dependency>
  <groupId>com.jaredrummler</groupId>
  <artifactId>html-builder</artifactId>
  <version>1.0.0</version>
  <type>aar</type>
</dependency>

License

Copyright 2016 Jared Rummler

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].