2

我正在尝试让 Facebook 登录适用于 Android TV,但弹出窗口中的任何元素都没有获得焦点。

我们正在使用该Session.openActiveSession(getActivity, true, pCallback)函数开始 Facebook 登录过程,并且我们正在使用v3.18.1Facebook SDK。

不幸的是,将 SDK 更新到最新版本并非易事,但我查看了版本说明并没有看到任何与非触摸输入相关的内容。

我查看了其他与 Facebook 登录弹出窗口配合使用的 Android TV 游戏的输出,但我无法从有限的输出中确定任何内容logcat

有谁知道如何赋予 WebView 元素焦点以便可以使用 dpad 进行导航?

4

1 回答 1

0

Not with Facebook, but I've got it working by simulating a click on the element:

document.getElementById(elementId).click();

I tried to use .focus(), but that didn't make any difference in my case.

Update: Once the webview has the focus, D-pad navigation (with the square around the clickable items) is re-enabled. Navigation will change between links containing either text or images.

于 2015-04-30T13:07:48.407 回答