簡體   English   中英

當軟鍵盤啟動時,停止頁腳出現:android

[英]stop footer from coming up when softkeyboard up : android

我想知道如何阻止軟鍵盤使我的頁腳出現並掩蓋登錄按鈕

xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#fff">

    <!--  Header  Starts-->
    <LinearLayout android:id="@+id/header"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:background="@layout/header_gradient"
                  android:paddingTop="5dip"
                  android:paddingBottom="5dip">
        <!-- Logo Start-->
        <!--<ImageView android:src="@drawable/logo"-->
                   <!--android:layout_width="wrap_content"-->
                   <!--android:layout_height="wrap_content"-->
                   <!--android:layout_marginLeft="10dip"/>-->
        <!-- Logo Ends -->
    </LinearLayout>
    <!--  Header Ends -->
    <!-- Footer Start -->
    <LinearLayout android:id="@+id/footer"
                  android:layout_width="fill_parent"
                  android:layout_height="40dip"
                  android:background="@layout/footer_repeat"
                  android:layout_alignParentBottom="true">
    </LinearLayout>
    <!-- Footer Ends -->

    <!-- Login Form -->
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="10dip"
        android:layout_below="@id/header">
        <!--  Username Label -->
        <TextView android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:textColor="#372c24"
                  android:text="Username"/>
        <EditText android:id="@+id/reg_username"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="5dip"
                  android:singleLine="true"
                  android:layout_marginBottom="20dip"
                  android:textColor="#000"/>
        <!-- Password Label -->
        <TextView android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:textColor="#372c24"
                  android:text="Password"/>
        <EditText android:id="@+id/reg_password"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:password="true"
                  android:singleLine="true"
                  android:layout_marginTop="5dip"
                  android:textColor="#000"/>
        <!-- Login Button -->
        <Button android:id="@+id/buttonLogin"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dip"
                android:isScrollContainer="false"
                android:text="Login"/>

    </LinearLayout>
    <!-- Login Form Ends -->
</RelativeLayout>

您可以將此屬性設置為您的活動將對您有所幫助。

android:windowSoftInputMode="adjustPan" 

如果您想了解有關此屬性的更多詳細信息,請參閱:

wsoft

將其放入活動標記內的應用程序顯示文件中:

android:windowSoftInputMode="stateHidden"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM