在我的应用程序中,我需要获取AccessibilityManager实例,才能调用它

  AccessibilityManager am = (AccessibilityManager) getSystemService(ACCESSIBILITY_SERVICE);
  boolean isAccessibilityEnabled = am.isEnabled();
  boolean isExploreByTouchEnabled = am.isTouchExplorationEnabled();


我正在Xamarin中进行编码,因此我需要获得AccessibilityManager的帮助。

最佳答案

几乎一样。假设您正在通过活动进行呼叫:

var am = (AccessibilityManager)GetSystemService(Context.AccessibilityService);
bool isAccessibilityEnabled = am.IsEnabled;
bool isExploreByTouchEnabled = am.IsTouchExplorationEnabled;

关于java - 如何在Xamarin中获取AccessibilityManager实例,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29471744/

10-10 09:52