undefinedfix
Sign in

Mixed text and text arrangement of live app chat bar

gxdeb edited in Sat, 24 Sep 2022

Problem description

Hello everyone, I'm learning to develop an Android live app. I encountered a problem when I developed the chat bar in the live room. I didn't solve it after searching Baidu for a few days. I'd like to ask for help. The problem is how to add one or more icons at the beginning of a published message, followed by text. It's easier to do here. Just make a few imageviews followed by textview, but there will be a problem. The text will go according to the position of textview when wrapping, and it can't be pushed to the front. I can't find a lot of solutions. Please look at the figure below. I use the red arrow to mark it. The icon at the beginning of the message line is not a pure picture, and there are level words in it. Find a lot of solutions, no one can achieve, hereby help, trouble to tell what solutions can be solved, or in Baidu search, how should search, search is the mixed arrangement of graphics and text is closer, but no effect can achieve this.

图片描述

4 Replies
thnqu
commented on Sat, 24 Sep 2022

Set span in spannablestring (set drawable through imagespan)

ant0nk
commented on Sat, 24 Sep 2022

Under the prompt of Daniel above, it's almost done. The pictures and words are all in. But there is a level number on the icon imagespan. How can I get it? And also want this font style

newbee
commented on Sat, 24 Sep 2022

Can't textview set drawablestart?

iyzfx
commented on Sat, 24 Sep 2022

Hello, has the problem been solved? How did you do it