简体   繁体   English

Android键盘隐藏屏幕

[英]Android keyboard hiding the screen

I am developing an android application using Xamarin C# where we are using axml layout file to display a page on a tablet. 我正在使用Xamarin C#开发一个android应用程序,其中我们使用axml布局文件在平板电脑上显示页面。 Everything is working fine except with the problem that when i am open the keyboard, it hides the page underneath the keyboard. 一切工作正常,但有一个问题,当我打开键盘时,它会隐藏键盘下面的页面。

Is there any way using which i can view the keyboard and move the page at the top visable screen which could be scrolble so the user can scroll up and down to view the whole page. 有什么方法可以查看键盘并在可见的顶部屏幕上移动页面,以便用户可以上下滚动来查看整个页面。

Thanks and Regards 谢谢并恭祝安康

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:p1="http://schemas.android.com/apk/res/android"
    p1:orientation="vertical"
    p1:minWidth="25px"
    p1:minHeight="25px"
    p1:id="@+id/MLinerLay"
    p1:layout_width="fill_parent"
    p1:layout_height="fill_parent">
    <ScrollView
        p1:id="@+id/scrollFrame"
        p1:layout_height="fill_parent"
        p1:layout_width="fill_parent">
        <WebView
            p1:layout_width="fill_parent"
            p1:layout_height="match_parent"
            p1:id="@+id/webPay" />
    </ScrollView>
</LinearLayout>

This is my layout file 这是我的布局文件

将android:windowSoftInputMode =“ adjustResize”添加到清单中的活动标签。

In your AndroidManifest.xml , under the activity enter the following line: 在您的AndroidManifest.xml ,在活动下输入以下行:

android:windowSoftInputMode="adjustResize|stateHidden"

Hope, it will work. 希望,它将成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM