How well supported is pressure sensitivity across Android devices?

前端 未结 2 677
南旧
南旧 2021-02-19 23:59

I want to write an app that reacts to how much pressure is applied from the user\'s finger. Specifically, I want to use this to vary the thickness of a line being drawn. I\'m ha

相关标签:
2条回答
  • 2021-02-20 00:29

    You will find useful information here in a project named Markers. Pressure detection has been available somehow in capacitive screens after Eclair.

    0 讨论(0)
  • 2021-02-20 00:30

    Note that capacitive touch screens don't actually directly measure pressure; generally the pressure information they report is computed in some way based on the size (since pushing your finger harder will tend to cause more of it to touch the screen).

    You definitely can't assume that either pressure or size will be reported for a particular device. Also, for pressure, the relationship between this and the actual pressure the user is pressing is going to vary widely between the devices. For something production-quality, you will want your application to be able to adjust itself to the data it is receiving on whatever device it is running.

    0 讨论(0)
提交回复
热议问题