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!