문제

My application requires users to hold down the trackball in order to access an advanced menu. Not all phones have a trackball, however, so I need to remove this requirement for such phones. Is there a way to detect if the phone has a trackball?

도움이 되었습니까?

해결책

Use the Configuration object, specifically the navigation and navigationHidden fields. You can get a Configuration object via getResources().getConfiguration().

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top