mBinding.etContent.initText(
"@1@嗨@3#1#哈#哼#2", mutableListOf(
TopicBean("#1", "1", 6, 8), TopicBean("#2", "2", 12, 14)
), mutableListOf(
MentionUserBean("1", "1", 0, 2), MentionUserBean("3", "3", 4, 6)
)
)
mBinding.etContent.setOnEditTextInputListener(object : OnEditTextInputListener {
override fun notifyAt() {
val intent = Intent(this@MainActivity, UserListActivity::class.java)
startActivityForResult(intent, REQUEST_USER_CODE_INPUT)
}
override fun notifyTopic() {
val intent = Intent(this@MainActivity, TopicListActivity::class.java)
startActivityForResult(intent, REQUEST_TOPIC_CODE_INPUT)
}
override fun onTextLengthChanged(count: Int) {
mBinding.tvCount.text = "${count}/${mBinding.etContent.getEditTextMaxLength()}"
}
})
-
Notifications
You must be signed in to change notification settings - Fork 0
libin1993/RichEditText
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
@相同名称用户、#话题输入框
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published