If the text length is like in the picture and you let the design cut the background to you, you do it with a linear layout. If the text length is variable, you can use drawable or point-nine pictures to achieve it
http://shapes.softartstudio.com/ Design the background style on this website, click GETCODE, save it as an xml file and put it in the drawable folder, set it as background
Actually, just catch the artist girl and beat her up.
Main topic:
用.9比较简单。。。就是画一个图定义为背景。。
Although it can all be implemented using xml, it is a bit of a curve to save the country. . .
The effect is as follows:
txt_left.xml
txt_right.xml
TextView Layout
Define a drawable, set shape corners, and set this drawable as background. Or cut the .9 picture, it will be a more worry-free solution.
If the text length is like in the picture and you let the design cut the background to you, you do it with a linear layout. If the text length is variable, you can use drawable or point-nine pictures to achieve it
http://shapes.softartstudio.com/ Design the background style on this website, click GETCODE, save it as an xml file and put it in the drawable folder, set it as background
It feels like it can be achieved using clipDrawable
canvas.drawRect(Rect,Paint)
Using Android’s own drawing class can solve this problem.
See that the length of the design text will not change, just ask for the background image