Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Measuring a pressure of the touch  RSS feed

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I wonder that what I think is possible or not. I want to measure pressure of a touch in android. Is it possible?
Say on a screen user gives the touch I want to trigger different-different actions which is based on the amount of pressure user gives in its touch. Is it possible ?

If it is possible which class does this thing and which android OS version supports this feature.

Please reply.
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This would be a decidedly bad GUI, since what constitutes "light pressure" or "strong pressure" is going to be different for different people. Consider using two buttons, or one button and a selection dialog.

What *is* available is the long-click.
 
Hardik Trivedi
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:What *is* available is the long-click.



I do not want long press kind of thing.

That means measuring a pressure is not available in android, right?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!