向所有人致以问候。我什么时候讨论这个问题。通过点击 在EditText上,我的键盘覆盖了一半的EditText。试图投入 Manifest adjustSpan - 键盘覆盖了EditTekst和adjustResize的一半 - 显示顶部面板也是RelativeLayout。帮助解决问题。 主要活动布局
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_background_1">
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/linear_bottom_panel" >
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#5c4768" >
</FrameLayout>
<ListView
android:id="@+id/right_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/darker_gray"
android:dividerHeight="0.1dp"/>
<ListView
android:id="@+id/new_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:choiceMode="singleChoice"
android:divider="@android:color/darker_gray"
android:background="#5c4768"
android:dividerHeight="0.1dp"/>
</android.support.v4.widget.DrawerLayout>
<LinearLayout
android:id="@+id/linear_bottom_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="@color/color_bottom_panel"
android:orientation="horizontal" >
<ImageView
android:id="@+id/image_main_news"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="@drawable/ic_main_news_selector" />
<ImageView
android:id="@+id/image_main_chat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="@drawable/ic_main_chat_selector" />
<ImageView
android:id="@+id/image_main_add_mp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="@drawable/ic_main_add_mp_selector" />
<ImageView
android:id="@+id/image_main_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:src="@drawable/ic_main_map_selector" />
<ImageView
android:id="@+id/image_main_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="@drawable/ic_main_user_selector" />
</LinearLayout>
<ProgressBar
android:id="@+id/progress_load"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="invisible"
android:indeterminateDrawable="@drawable/load_progress" />
</RelativeLayout>
此片段布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_background_1" >
<include
android:id="@+id/discus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
layout="@layout/layout_discus_view"
/>
<ListView
android:id="@+id/list_chat"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/discus"
android:layout_above="@+id/add_message"
android:listSelector="@drawable/listview_item_selector"
>
</ListView>
<include
android:id="@+id/add_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
layout="@layout/layout_add_new_message"
/>
</RelativeLayout>
其中adjustSpan布局@ + id / add_message键盘重叠