Android realizes the function of manual signature after consumption of UnionPay card reader (example code)

A few days ago, I went to the property management to pay the property fee. The property management staff said that the community introduced high-tech products. After using the bank card for consumption, they didn't need to take a pen to sign on the UnionPay machine. They directly touched their fingers to realize the consumption signature. At that time, they thought that it was really high-tech. the shape of the machine is shown in the left figure below, and the signature is shown in the right figure below.

If you look carefully, it is actually a touch screen on which users directly sign manually. It is not complicated to realize this function. We customize a control, inherit the view, and use the drawLine and drawpoint methods of canvas to realize this function.

First, customize the control mdrawlineview

Layout XML code

Background BG_ drawline .xml

Activity code

summary

The above is what Xiaobian introduced to you. Android realizes the function of manual signature after consumption of UnionPay card reader. 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
分享
二维码
< <上一篇
下一篇>>