Android_ page moves up with input method

Source: Internet
Author: User

============ Problem Description ============


Problem Description:
Screen display


But when the input method pops up, the footer is followed up.



Problem point:
1 How to not display the footer when the input method is called,
2 What properties do I need to set in the layout?

Thank you

Here is a summary of my code:
<?xml version= "1.0"  encoding= "UTF-8"? ><linearlayout xmlns:android= "http// Schemas.android.com/apk/res/android "    xmlns:tools=" Http://schemas.android.com/tools "     android:id= "@+id/linearfittmain"     android:layout_width= "Fill_ Parent "    android:layout_height=" Fill_parent "    android:background=" @drawable/FITTMAINBG "    android:orientation=" vertical "    tools: Context= ". Mainactivity " >    <ScrollView         Android:layout_width= "Fill_parent"         android:layout_height= "0DP"         android:layout_weight= "1"          android:fadingedge= "Vertical"  >        < Linearlayout   &nbsP;        android:id= "@+id/content"              android:layout_width= "Fill_parent"              android:layout_height= "Wrap_content"              android:gravity= "Center"              android:orientation= "Horizontal"  >             <TextView                 android:id= "@+id/content"                  android:layout_width= "Wrap_content"                  android:layout_height= "Wrap_content"                 android:text= "Please enter"  />             <EditText                 android:id= "@+id/content"                  android:layout_width= "100DP"                  android:layout_height= " Wrap_content " />        </LinearLayout>     </ScrollView>    <!--  This is footer -->   .  <linearlayout        android:layout_width= "Fill_parent"          android:layout_height= "Wrap_content"          android:gravity= "Bottom"         android:orientation= "vertical"  >         <include layout= "@layout/commomfoot"  />     </LinearLayout></LinearLayout>


Main layout of the footer file
<?xml version= "1.0"  encoding= "UTF-8"? ><linearlayout xmlns:android= "http// Schemas.android.com/apk/res/android "    xmlns:tools=" Http://schemas.android.com/tools "     android:layout_width= "Match_parent"     android:layout_height= " Match_parent "    android:background=" @drawable/commombottom "     android:orientation= "Horizontal"  >    <LinearLayout         android:layout_width= "Wrap_content"          android:layout_height= "Wrap_content"         android:layout_gravity= " Center "        android:layout_weight=" 1 "         android:gravity= "Center"         android:orientation= "Horizontal"  >        <imageview             Android:id= "@+id/imvhome"             android: Layout_width= "Wrap_content"             android: layout_height= "Wrap_content"             android: background= "@drawable/index"  />    </LinearLayout>     <linearlayout        android:layout_width= "Wrap_content"          android:layout_height= "Wrap_content"          android:layout_gravity= "Center"         android: layout_weight= "1"         android:gravity= "center"          android: orientation= "Horizontal"  >        <ImageView             android:id= "@+id/imvperson"              android:layout_width= "Wrap_content"              android:layout_height= "Wrap_content"              android:background= "@drawable/person"              android:gravity= "Center"  />     </LinearLayout>    <LinearLayout         android:layout_width= "Wrap_content"         android:layout_height = "Wrap_content"         android:layout_gravity= "center"          android:layout_weight= "1"         android:gravity= "center"          android:orientation= "Horizontal"  >         <ImageView             Android:id= "@+id/imvmore"             android: Layout_width= "Wrap_content"             android: layout_height= "Wrap_content"             android: background= "@drawable/mainback"             android : gravity= "Center"  />    </LinearLayout></LinearLayout>

============ Solution 1============


Add Android:windowsoftinputmode= "Statevisible|adjustresize" under the corresponding activity in manifest.

Android_ page moves up with input method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.