简体   繁体   中英

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. 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:

android:windowSoftInputMode="adjustResize|stateHidden"

Hope, it will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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