Facebook LoginActivity未正确显示 [英] Facebook LoginActivity is not shown properly

查看:95
本文介绍了Facebook LoginActivity未正确显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Facebook登录的应用程序。我有FacebookSDK,我使用com.facebook.LoginActivity。



问题是,在10个平板电脑上,当显示软键时,活动没有正确显示, m使用三星Galaxy Tab 2(10.1)(OS 4.0.2)。



这是我点击Facebook LoginActivity中的一个EditText后看到的:





在清单文件中,我有:

 < activity 
android:name = com.facebook.LoginActivity
android:windowSoftInputMode =adjustResize
android:theme =@ android:style / Theme.Translucent.NoTitleBar
android:label =@ string / app_name
< / activity>

还有其他人也有这个问题吗? b $ b有没有人使用LoginActivity没有问题?



还有什么我需要做的吗?



为什么不是Facebook活动采取全屏?

解决方案

快速修复将需要您修改SDK代码。



查看webDialog.java文件,在onCreate()方法中,在super.onCreate()调用之后添加:

  getWindow()setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)。 

这将把软键盘放在对话框的顶部。如果还不够,那么你可能想要在getMargins()方法中使用边距。在最糟糕的情况下,您可以让getMargins返回:

 返回新对<整数,整数>(1,1); 


I have an application that uses Facebook login. I have the FacebookSDK and I use com.facebook.LoginActivity.

The problem is that on 10" tablets the activity is not shown properly when the softkeybord is shown. I'm using a Samsung Galaxy Tab 2 (10.1) (OS 4.0.2).

This is what I see after clicking on one EditText in the Facebook LoginActivity:

In the manifest file I have:

<activity
    android:name="com.facebook.LoginActivity"
    android:windowSoftInputMode="adjustResize"
    android:theme="@android:style/Theme.Translucent.NoTitleBar"
    android:label="@string/app_name" >
</activity>

Is anyone else having this problem too? Is anyone using LoginActivity without having problems?

Is there anything else I need to do?

And why does not the Facebook activity take the full screen ?

解决方案

The quick fix will require you to modify the SDK code.

Look in the WebDialog.java file, in the onCreate() method, after the super.onCreate() call, add this:

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

This will pan the soft keyboard over top of the dialog. If that's still not enough, then you might want to play around with the margins in the getMargins() method. In the worst case, you can just have getMargins return:

return new Pair<Integer, Integer>(1, 1);

这篇关于Facebook LoginActivity未正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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