我的界面底部有个edittext输入框,当我把activity的 android:windowSoftInputMode="adjustPan|stateHidden"设置时,软件盘弹出时,会把整个界面都顶上去,我的titlebar也被顶上去了,很难看,有什么办法把标题栏以下的顶上去,标题栏不用顶上去,谢谢。

解决方案 »

  1.   

    用scrollview嵌套下,,解决就好,最好能把你解决方法写出来
      

  2.   

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >    <include
            android:id="@+id/include1"
             layout="@layout/title_bar" />            <ScrollView 
                android:id="@+id/scrollView2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >            <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical" >
              
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:orientation="vertical" >                    <EditText
                            android:id="@+id/ed_dealplan"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="10dp"
                            android:layout_marginRight="10dp"
                            android:hint="请输入"
                            android:textSize="15sp" />
                    </LinearLayout>
             
          </LinearLayout>
            </ScrollView></LinearLayout>把 EditText放在ScrollView中,然后把ScrollView放在Titlebar下,清单文件的activity中加入android:windowSoftInputMode="stateAlwaysHidden"
      

  3.   

    为什么我用了回复中的嵌套scrollview没用呢