Android uses < layer list > to realize wechat chat input box function

LayerDrawable

The < layer list > tag can set layerdrawable, a layered drawable overlay effect, < layer list > can contain multiple < item > tags,

Each < item > represents a drawable< Item > can set the left, right, top and bottom offsets through left, right, top and bottom. < item > can be applied to a picture or a shape

Let's imitate the chat input box of wechat:

Set the green background first:

Add another layer of white to leave the height of the green line on the side:

Then lay a layer of white to cover the set background, leaving lines at the bottom and sides. The middle layer is actually to leave the height of green wireframes on both sides:

The above is what Xiaobian introduced to you. Android uses < layer list > to realize wechat chat input box. I hope it will be helpful to you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>