iwgang / Simplifyspan
Licence: mit
A easy-to-use and powerful Spannable library
Stars: ✭ 522
Programming Languages
java
68154 projects - #9 most used programming language
Labels
Projects that are alternatives of or similar to Simplifyspan
Attributedstring
基于Swift插值方式优雅的构建富文本, 支持点击长按事件, 支持不同类型过滤, 支持自定义视图等.
Stars: ✭ 294 (-43.68%)
Mutual labels: textview
Inputkit
📝InputKit, an Elegant Kit to limits your input text, inspired by BlocksKit, written in both Objective-C & ⚡️Swift.
Stars: ✭ 420 (-19.54%)
Mutual labels: textview
TTInputVisibilityController
Lightweight controller to keep your inputs visible when the keyboard is presented.
Stars: ✭ 21 (-95.98%)
Mutual labels: textview
Swiftuix
Extensions and additions to the standard SwiftUI library.
Stars: ✭ 4,087 (+682.95%)
Mutual labels: textview
Rtextview
基于TextView 1.直接设置selector背景2.直接设置drawableLeft大小 3.圆角,圆形,背景/边框/文字根据状态变色
Stars: ✭ 359 (-31.23%)
Mutual labels: textview
Spedittool
An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText
Stars: ✭ 292 (-44.06%)
Mutual labels: textview
Advancedtextview
一个增强的TextView库。可以实现文字两端对齐,文字竖排,以及自定义选择文字后的弹出菜单。
Stars: ✭ 365 (-30.08%)
Mutual labels: textview
CustomFontView
Custom View classes for TextView, EditText & Buttons - to set custom fonts
Stars: ✭ 26 (-95.02%)
Mutual labels: textview
Stacklabel
🔥空祖家的堆叠标签(以下碎念:一开始起名字“StackLabel”没想太多结果被人吐槽Stack是整齐堆叠的意思...........好吧这是我的锅不过现在要改也来不及了,好用就行了...吧?
Stars: ✭ 471 (-9.77%)
Mutual labels: textview
textmatcher
A simple text watcher that matches specific targets like mention or hashtag in a string by defining rules
Stars: ✭ 67 (-87.16%)
Mutual labels: textview
Dropdowntextview
Simple drop-down(expandable) TextView for Android
Stars: ✭ 307 (-41.19%)
Mutual labels: textview
Kotlinextensions.com
A handy collection of most commonly used Kotlin extensions to boost your productivity.
Stars: ✭ 522 (+0%)
Mutual labels: textview
Countanimationtextview
A tiny Android library makes very easier count animation of TextView.
Stars: ✭ 392 (-24.9%)
Mutual labels: textview
SimplifySpan
A easy-to-use and powerful Spannable library
screenshot
gradle
implementation 'com.github.iwgang:simplifyspan:2.2'
Support Units
- SpecialTextUnit
- text (Constructor | String)
- gravity (setGravity(gravity | int)) SpecialGravity.TOP, SpecialGravity.CENTER, SpecialGravity.BOTTOM
- convertMode (setConvertMode(convertMode | int)) SpecialConvertMode.ONLY_FIRST, SpecialConvertMode.ALL, SpecialConvertMode.ONLY_LAST
- textColor (Constructor Or setTextColor(int color))
- textSize (Constructor Or setTextSize(float size)) ps
- backgroundColor (setTextBackgroundColor(int color))
- showUnderline (showUnderline())
- showStrikeThrough (showStrikeThrough())
- textBold (useTextBold())
- textItalic (useTextItalic())
- textStyle (setTextStyle(Typeface style))
- clickableUnit (setClickableUnit(SpecialClickableUnit))
- SpecialLabelUnit
- text (Constructor | String)
- gravity (setGravity(gravity | int)) SpecialGravity.TOP, SpecialGravity.CENTER, SpecialGravity.BOTTOM
- convertMode (setConvertMode(convertMode | int)) SpecialConvertMode.ONLY_FIRST, SpecialConvertMode.ALL, SpecialConvertMode.ONLY_LAST
- labelTextColor (Constructor | int color)
- labelTextSize (Constructor | int color) sp
- labelBgColor (Constructor | int color)
- bitmap (Constructor | Bitmap)
- labelBgRadius (setLabelBgRadius(float radius)) Only support labelBgColor
- labelBgWidth And labelBgHeight (Constructor Or setLabelBgSize(int width, int height)) px
- padding (setPadding(int padding)) px
- paddingLeft (setPaddingLeft(int padding)) px
- paddingRight (setPaddingRight(int padding)) px
- labelBgBorderColor And borderSize (showBorder(int labelBgBorderColor, float borderSize | px))
- textBold (useTextBold())
- textItalic (useTextItalic())
- clickable See SimplifySpanBuild.appendMultiClickable() Or SimplifySpanBuild.appendMultiClickableToFirst()
- SpecialImageUnit
- text (Constructor | String)
- gravity (setGravity(gravity | int)) SpecialGravity.TOP, SpecialGravity.CENTER, SpecialGravity.BOTTOM
- convertMode (setConvertMode(convertMode | int)) SpecialConvertMode.ONLY_FIRST, SpecialConvertMode.ALL, SpecialConvertMode.ONLY_LAST
- bitmap (Constructor)
- width And height (Constructor) px
- clickable See SimplifySpanBuild.appendMultiClickable() Or SimplifySpanBuild.appendMultiClickableToFirst()
- SpecialClickableUnit
- curTextView (Constructor | TextView)
- onClickListener (Constructor | OnClickableSpanListener)
- isShowUnderline (showUnderline())
- pressTextColor (setPressTextColor(int color))
- pressBgColor (setPressBgColor(int color))
- normalTextColor (setNormalTextColor(int color))
- normalBgColor (setNormalBgColor(int color))
- SpecialRawSpanUnit
- text (Constructor | String)
- spanObj (Constructor) Spannable Object
- flags (Constructor | int) Spannable flags
Support Methods
- SimplifySpanBuild
- append (string | Units)
- appendToFirst (string | Units)
- appendMultiClickable ()
- appendMultiClickableToFirst ()
- build ()
how to use ?
// sample 1
tvText.setText(new SimplifySpanBuild("距离您:").append(new SpecialTextUnit("385", Color.BLUE)).append(" 米").build());
// sample 2
CharSequence spannableString = new SimplifySpanBuild(" 艾客优品雷霆Dock 2 雷电转USB3.0/火线/esata 扩展HUB")
.appendToFirst(new SpecialLabelUnit("1212", Color.WHITE, sp2px(8), Color.RED, 70, 35).useTextBold().setGravity(SpecialGravity.CENTER))
.appendToFirst(new SpecialLabelUnit("天猫", Color.WHITE, sp2px(8), 0xFFFF5000, 60, 35).setGravity(SpecialGravity.CENTER))
.build();
tvText.setText(spannableString);
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].