Is it possible to know position of hardware settings button? I want to write an intro for my programm and show the user how to use it's features.

有帮助吗?

解决方案

No, it is not. You'd try to check what device you are running on and then get position from your prepopulated database, but otherwise there's no way. Please note hardware buttons are deprecated since Honeycomb (and the good thing is that software buttons order is known and almost device independent).

其他提示

The ViewConfiguration class might help. It has a method hasPermanentMenuKey()

public boolean hasPermanentMenuKey ()

Since: API Level 14 Report if the device has a permanent 
menu key available to the user.

Returns true if a permanent menu key is present, false otherwise.

But to know the exact position of the menu key isn't possible. You could just find out if it exists or not, in hardware.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top