Yagzii
Yagzii

Reputation: 286

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

Upvotes: 1

Views: 3062

Answers (2)

BST Kaal
BST Kaal

Reputation: 3033

In your AndroidManifest.xml , under the activity enter the following line:

android:windowSoftInputMode="adjustResize|stateHidden"

Hope, it will work.

Upvotes: 2

user3740085
user3740085

Reputation: 244

Add android:windowSoftInputMode="adjustResize" to your activity tag in the manifest.

Upvotes: 2

Related Questions