CarGuo / Gsyricktext
Licence: mit
类似微博的emoji表情、@人、话题等的EdiText,优化了编辑框中的光标点击和删除处理。TextView支持emoji表情、话题、链接、电话和@某人特殊显示的文本。
Stars: ✭ 651
Projects that are alternatives of or similar to Gsyricktext
Spedittool
An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText
Stars: ✭ 292 (-55.15%)
Mutual labels: edittext, emoji, textview
Toggleedittextview
Easily switch between EditText and TextView seamlessly.
Stars: ✭ 146 (-77.57%)
Mutual labels: edittext, textview
Sharpview
安卓带有尖角气泡的控件(TextView,ImageView,EditText,Layout),支持渐变色,圆角等自定义属性
Stars: ✭ 137 (-78.96%)
Mutual labels: edittext, textview
ShapeView
打造万能shape,再也不用写很多xml了,可以当做TextView,Button,EditText等多种控件,方便实用
Stars: ✭ 34 (-94.78%)
Mutual labels: textview, edittext
Xrichtext
一个Android富文本类库,支持图文混排,支持编辑和预览,支持插入和删除图片。
Stars: ✭ 1,639 (+151.77%)
Mutual labels: edittext, textview
SuperShapeView
A smart custom view support shapes for ImageView, TextView ,EditView ,instead of shape.xml.(自定义形状控件,支持TextView,EditText)
Stars: ✭ 60 (-90.78%)
Mutual labels: textview, edittext
Rxmarkdown
📠Markdown for Android, supports TextView && EditText (Live Preview), supports code high light.
Stars: ✭ 714 (+9.68%)
Mutual labels: edittext, textview
TextViewPlus
an android library for setting custom font in xml layout
Stars: ✭ 27 (-95.85%)
Mutual labels: textview, edittext
KodeEditor
A simple code editor with syntax highlighting and pinch to zoom
Stars: ✭ 60 (-90.78%)
Mutual labels: textview, edittext
EasyMoney-Widgets
The widgets (EditText and TextView) for support of money requirements like currency, number formatting, comma formatting etc.
Stars: ✭ 91 (-86.02%)
Mutual labels: textview, edittext
textmatcher
A simple text watcher that matches specific targets like mention or hashtag in a string by defining rules
Stars: ✭ 67 (-89.71%)
Mutual labels: textview, edittext
CustomFontView
Custom View classes for TextView, EditText & Buttons - to set custom fonts
Stars: ✭ 26 (-96.01%)
Mutual labels: textview, edittext
Weibospider
⚡ A distributed crawler for weibo, building with celery and requests.
Stars: ✭ 4,670 (+617.36%)
Mutual labels: sina
Htextview
Animation effects to text, not really textview
Stars: ✭ 5,309 (+715.51%)
Mutual labels: textview
Xedittext
XEditText: clear contents easily; show/hide password; separeta contents automatically, such as credit card number; disable Emoji inputs; 带删除功能的EditText;显示或者隐藏密码;可设置自动添加分隔符分割电话号码、银行卡号等;支持禁止Emoji表情符号输入。
Stars: ✭ 474 (-27.19%)
Mutual labels: edittext
Selectabletextview
A text view that supports selection and expansion
Stars: ✭ 626 (-3.84%)
Mutual labels: textview
Textviewexpandableanimation
Expandable TextView With Smooth Transition Animation
Stars: ✭ 537 (-17.51%)
Mutual labels: textview
支持类似微博的文本效果,表情、@某人、话题、url链接等。DEMO同时演示了MVVM模式的使用。
状态 | 功能 |
---|---|
支持 | 表情 |
支持 | #话题 |
支持 | @某人 |
支持 | url与数字(可配置) |
支持 | 点击效果 |
支持 | 自定义span效果 |
支持 | 表情、#话题与@某人编辑时整块删除 |
支持 | 表情、#话题与@某人编辑时选择复制限制整块选择。 |
支持 | 表情大小设置、居中显示 |
支持 | MVVM(DataBing)。 |
支持 | kotlin(demo与lib) |
依赖方式
在project下的build.gradle添加
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
在module下的build.gradle添加
dependencies {
compile 'com.github.CarGuo.RickText:textUtilsLib:v2.1.5'
}
kotlin版本的依赖
dependencies {
compile 'com.github.CarGuo.RickText:textUtilsLib-kotlin:v2.1.5'
}
DEMO效果图
旧版简书解析
旧版README
QQ群,有兴趣的可以进来,群里视频项目的人居多,平时多吹水吐槽:174815284 。
使用方式参考demo
1、文本模式
1.1、RichTextView
richTextView = (RichTextView) findViewById(R.id.rich_text_2);
//直接使用RichTextView
richTextView.setAtColor(Color.RED);
richTextView.setTopicColor(Color.BLUE);
richTextView.setLinkColor(Color.YELLOW);
richTextView.setNeedNumberShow(true);
richTextView.setNeedUrlShow(true);
richTextView.setSpanAtUserCallBackListener(spanAtUserCallBack);
richTextView.setSpanTopicCallBackListener(spanTopicCallBack);
richTextView.setSpanUrlCallBackListener(spanUrlCallBack);
//所有配置完成后才设置text
richTextView.setRichText(content, nameList, topicModels);
1.2、普通TextView
//url点击回调
SpanUrlCallBack spanUrlCallBack = new SpanUrlCallBack() {
@Override
public void phone(String phone) {
Toast.makeText(MainActivity.this, phone + " 被点击了", Toast.LENGTH_SHORT).show();
richText.setHighlightColor(Color.TRANSPARENT);
}
@Override
public void url(String url) {
Toast.makeText(MainActivity.this, url + " 被点击了", Toast.LENGTH_SHORT).show();
richText.setHighlightColor(Color.TRANSPARENT);
}
};
//@点击回调
SpanAtUserCallBack spanAtUserCallBack = new SpanAtUserCallBack() {
@Override
public void onClick(UserModel userModel1) {
Toast.makeText(MainActivity.this, userModel1.getUser_name() + " 被点击了", Toast.LENGTH_SHORT).show();
richText.setHighlightColor(Color.TRANSPARENT);
}
};
//话题点击回调
SpanTopicCallBack spanTopicCallBack = new SpanTopicCallBack() {
@Override
public void onClick(TopicModel topicModel) {
Toast.makeText(MainActivity.this, topicModel.getTopicName() + " 被点击了", Toast.LENGTH_SHORT).show();
richText.setHighlightColor(Color.TRANSPARENT);
}
};
//配置TextView显示文本
RichTextBuilder richTextBuilder = new RichTextBuilder(this);
richTextBuilder.setContent(content)
.setAtColor(Color.RED)
.setLinkColor(Color.BLUE)
.setTopicColor(Color.YELLOW)
.setListUser(nameList)
.setListTopic(topicModels)
.setTextView(richText)
.setSpanAtUserCallBack(spanAtUserCallBack)
.setSpanUrlCallBack(spanUrlCallBack)
.setSpanTopicCallBack(spanTopicCallBack)
.build();
2、编辑模式(RichEditText)
richEditText = (RichEditText) findViewById(R.id.emoji_edit_text);
emojiLayout.setEditTextSmile(richEditText);
RichEditBuilder richEditBuilder = new RichEditBuilder();
richEditBuilder.setEditText(richEditText)
.setTopicModels(topicModels)
.setUserModels(nameList)
.setColorAtUser("#FF00C0")
.setColorTopic("#F0F0C0")
.setEditTextAtUtilJumpListener(new OnEditTextUtilJumpListener() {
@Override
public void notifyAt() {
JumpUtil.goToUserList(MainActivity.this, MainActivity.REQUEST_USER_CODE_INPUT);
}
@Override
public void notifyTopic() {
JumpUtil.goToTopicList(MainActivity.this, MainActivity.REQUEST_TOPIC_CODE_INPUT);
}
})
.builder();
版本更新
v2.1.5 (2018-01-23)
- 修复了ellipsize问题
v2.1.4 (2017-12-05)
- 修复了一个特殊场景下让人🥚疼的问题。
- 修复某些情况下删除按键导致的问题
v2.1.2 (2017-10-20)
- 优化一些问题
- 增加kotlin lib 与 kotlin demo
v2.1.1 (2017-09-19)
- 增加表情居中功能的支持。
v2.1.0 (2017-09-17)
- 修复了@和#输入存在的问题。
历史版本
License
MIT
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].