Android realizes sharing long image and adding full image watermark
Android realizes sharing long image and adding full image watermark
preface:
Long graphs are usually Scrollview and listview.
We need to get the picture of the complete display of these two controls. The principle is very simple. Create a canvas with the same length and width as the control (that is, create a bitmap with the same height and width). Then the draw method of the control is invoked to draw itself onto the canvas.
Paste the long picture acquisition method of two controls respectively
Present a method to obtain the display diagram of a specific view
Give me a method to generate a LinearLayout picture
After the product is finished, you will definitely add the company's logo picture below or above, huh. Good people do low, and then send a way to splice pictures
Another method to add full image watermark
There is a bug in Keng dad's Chrome. As soon as the line feed is connected to the up button at this position, it crashes. Writing a blog crashed seven or eight times. I've really had bad luck recently.
In fact, I want to say: Recently, an object has been injected, which is highly dependent, so I seldom write blogs these days. I'll add it later.
Thank you for reading, hope to help you, thank you for your support to this site!