键盘重叠Facebook登录屏幕

时间:2013-10-28 16:34:53

标签: android facebook facebook-graph-api

我正在使用Facebook SDK并使用Facebook登录按钮。当我点击登录时,会显示一个facebook弹出窗口。我的问题是,当屏幕在横向上并且我开始键入电子邮件时,键盘重叠弹出窗口,我无法看到我正在键入的内容,只显示弹出窗口的标题。当屏幕处于人像状态时,弹出窗口是正常的,我可以毫无问题地打字。

这是我的login.xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".LoginActivity" ><FrameLayout
    android:id="@+id/frame"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_alignParentEnd="false"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="false"
    android:layout_alignParentTop="true"
    android:addStatesFromChildren="false"
    android:background="@drawable/background_land"
    android:clipToPadding="true"
    android:contentDescription="@string/acLogin_FrameLayout"
    android:fitsSystemWindows="false"
    android:measureAllChildren="false"
    android:splitMotionEvents="false" >

    <com.facebook.widget.LoginButton
        android:id="@+id/authButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_gravity="center_horizontal|bottom" />
 </FrameLayout>
</RelativeLayout>

有什么方法我仍然可以使用Facebook登录按钮并将弹出式登录框架设置为几乎不可见?

1 个答案:

答案 0 :(得分:1)

尝试更改活动的windowSoftInput模式。我的猜测是android:windowSoftInputMode =“adjustResize”或“adjustPan”。您可以在AndroidManifest.xml中的活动中设置它