本文介绍了Android的触摸2.3.3通过探索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发盲人社区应用程序。我想给为用户提供一个选项,通过屏幕(触摸探索)刮手指去探索屏幕。我无法找到任何API构建此功能。我想在安卓2.3.3(API 10级),以实现这一目标。

I am developing app for blind community. I want to give an option for the user to explore the screen by scraping finger through the screen (exploring by touch). I am unable to find any api to build this functionality. I am trying to achieve this in android 2.3.3 (api level 10).

我知道在Android的探索通过触摸功能都默认4.1对讲用,但我想给这个功能,谁使用下面的Andr​​oid 4.1设备上的用户。任何想法是AP preciated。

I know in Android 4.1 talkback with 'touch by explore' functionality comes by default, but I want to give this feature to the users who are using below android 4.1 devices. Any ideas are appreciated.

推荐答案

您可能想尝试使用从眼睛免费项目库。它实现了在单个姜饼活动及以下ICS式触控探索。

You may want try using the AccessibilityShim library from Eyes-Free Project. It implements ICS-style touch exploration for individual Activities in Gingerbread and below.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.main_activity);

    // This call must occur after setContentView().
    AccessiblityShim.attachToActivity(this);
}

它也可以被应用到对话框

It can also be applied to Dialogs.

AccessiblityShim.attachToDialog(dialog);

这篇关于Android的触摸2.3.3通过探索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:32