在我的应用中,我需要获取AccessibilityManager实例,以便调用此
AccessibilityManager am = (AccessibilityManager) getSystemService(ACCESSIBILITY_SERVICE);
boolean isAccessibilityEnabled = am.isEnabled();
boolean isExploreByTouchEnabled = am.isTouchExplorationEnabled();
我在Xamarin编码,所以我需要帮助获取AccessibilityManager。
答案 0 :(得分:1)
它几乎一样。假设你在一个活动中打电话:
var am = (AccessibilityManager)GetSystemService(Context.AccessibilityService);
bool isAccessibilityEnabled = am.IsEnabled;
bool isExploreByTouchEnabled = am.IsTouchExplorationEnabled;