Android 2.3.3 touch by explore

爱⌒轻易说出口 提交于 2019-12-25 07:33:51

问题


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).

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.


回答1:


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);


来源:https://stackoverflow.com/questions/14296612/android-2-3-3-touch-by-explore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!