Android的WebView中选择选项打破了话语提示 [英] Android WebView Select option breaks with TalkBack ON

查看:258
本文介绍了Android的WebView中选择选项打破了话语提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的WebView加载包含页面下拉菜单(选择选项),有一个应用程序:结果
<选择一个id ='民'>
<期权价值= '10'大于10< /选项>
<期权价值=20> 20℃/选项>
<期权价值=50> 50℃/选项>

搜索结果
的WebView有的getSettings()setJavaScriptEnabled(真); 结果
当对讲系统打开着,我无法选择20或50(10默认选择)其他选项。对讲读取选项弹出,但双攻所有选项(10,20,50)选择一个选项,它只是关闭弹出,但不选择该选项。结果
我曾与的Nexus 4(的Andr​​oid 4.4.4)和三星S5(是Android 4.4.2)进行测试。搜索结果我提到的原因的 setJavaScriptEnabled 设置是,在删除此设置,它的工作原理罚款。请帮忙。结果

I have an app using WebView to load page containing dropdown(Select options):
<select id='num'> <option value='10'>10</option> <option value='20'>20</option> <option value='50'>50</option>

WebView has getSettings().setJavaScriptEnabled(true);
When Talkback is ON, I am unable to select other options 20 or 50(10 is default selected). Talkback reads all the options(10,20,50) in the option popup but on double tapping to select an option, it just closes the popup without selecting that option.
I have tested with Nexus 4(Android 4.4.4) and Samsung S5(Android 4.4.2).

The reason I mentioned setJavaScriptEnabled settings is that on removing this setting, it works fine.
Please help.

注:行为似乎不一致。有时被选中,但大部分没有时间。
关于进一步调查,我发现,在Android加载我的网页的 Chrome浏览器浏览器也导致了同样的问题。取消选中启用JavaScript的从内容设置选项修复该问题。搜索结果
更新:测试上的的Andr​​oid 4.0(ICS)和Android 4.1(果冻豆)我的应用程序即可。选择下拉选项时,不考虑设置的两个正常工作的增强的Web 的或的注入网页脚本的启用/禁用辅助功能。搜索结果
同样在Moto G的的Andr​​oid 5.0.2 测试。一切工作完全正常。结果
结果我不知道这是一个的是Android 4.4(KitKat)的的具体问题?结果
有没有解决方法呢?

Note: The behavior seems inconsistent. It sometimes gets selected but most of the time it does not.

On further investigating, I have found that loading my web page in the Android Chrome browser also leads to the same problem. Unchecking Enable JavaScript option from the Content settings fixes the issue.

Update: Tested my app on Android 4.0(ICS) and Android 4.1(Jelly bean). Both works fine when selecting dropdown options, irrespective of the setting Enhanced Web Accessibility or Inject Web Scripts enabled/disabled.

Also tested on Moto G Android 5.0.2. Everything works perfectly fine.

I wonder if this is an Android 4.4(KITKAT) specific issue ?
Is there any workaround for this ?

推荐答案

我的Andr​​oid 4.4.4坐上的Nexus 7完全一样的问题:
话语提示阅读所有选择选项,但是没有办法选择他们..
和你一样,它的工作原理上的Nexus 4采用Android 5.1.1。

I got exactly the same problem on a Nexus 7 with Android 4.4.4: TalkBack read all select options but no way to select them.. And like you, it works on Nexus 4 with Android 5.1.1.

要解决这个问题,我用人行横道这在您的应用程序提供了一个现代化的Chrome web视图,而不是使用每个设备web视图。

To solve this, I used Crosswalk which provide a modern Chrome webview to your application instead of using each device webview.

唯一的缺陷是,它20MB左右你的APK增加了(其实,你将有2 APK,一个用于X86,另一个用于ARM架构)。

The only flaw is that it adds around 20mb to your APK (in fact, you will have 2 APK, one for X86 and another for ARM architecture).

这篇关于Android的WebView中选择选项打破了话语提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆