FbDialog不显示在较小的设备全部内容 [英] FbDialog doesn't show full content on smaller devices

查看:113
本文介绍了FbDialog不显示在较小的设备全部内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

步骤瑞普

  • 登录到FB新的FB账号,我可以看到webdialog显示我 当前的目标和其他的东西,但我看不出授权确定取消 按钮(可能下移)。我不能滚动看到这些按钮
  • Log in to FB with new FB account I can see the webdialog showing me current goals and other stuff, but I can not see Authorize OK cancel buttons(probably moved down). I can not scroll to see those buttons

任何一个可以建议我速战速决,而不必更新FB SDK

Can any one suggest me quick fix, without necessarily updating FB SDK

推荐答案

我刚刚张贴此解决方法:<一href="http://stackoverflow.com/questions/16559120/facebook-login-webdialog-current-goals-header-but-no-button-to-authorize-or-ca/16807614#16807614">Facebook登录webDialog&QUOT;目前的目标&QUOT;头,但没有按钮授权或取消

I just posted this workaround to: Facebook login webDialog "CURRENT GOALS" header but no button to authorize or cancel

在FaceBookSDK我修改COM / Facebook的/空间/ WebDialog.java,这样一旦加载网页对话框,将查找包含当前目标的块,并隐藏它(如果存在的话)。一旦你做到这一点,按钮是再次可见(至少他们是给我)。

In the FaceBookSDK I modified com/facebook/widget/WebDialog.java, so that once the web dialog was loaded it would look for the block that contains "Current Goals" and hide it (if it exists). Once you do that, the buttons are visible again (at least they were for me).

在COM / Facebook的/空间/ WebDialog.java:

In com/facebook/widget/WebDialog.java:

私有类DialogWebViewClient扩展WebViewClient {

private class DialogWebViewClient extends WebViewClient {

// ... other methods ...

@Override
public void onPageFinished(WebView view, String url) {
    super.onPageFinished(view, url);
    if (!isDetached) {
        spinner.dismiss();
    }
    /*
     * Once web view is fully loaded, set the contentFrameLayout background to be transparent
     * and make visible the 'x' image.
     */
    contentFrameLayout.setBackgroundColor(Color.TRANSPARENT);
    webView.setVisibility(View.VISIBLE);
    crossImageView.setVisibility(View.VISIBLE);

    // I don't know how to highlight in the code block
    // So I just add this extra long comment to make it obvious
    // Add a javascript call to hide that element, if it exists
    webView.loadUrl("javascript:try{ document.getElementById('nux-missions-bar').style.display='none'; } catch (e) {}");
    // End changes           
}

这应该帮助,至少要等到FaceBook上修复了API。

This should help, at least until FaceBook fixes the API.

这篇关于FbDialog不显示在较小的设备全部内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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