質問

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