Android活动,如whats应用程序默认活动

Android活动,如whats应用程序默认活动,android,Android,我有一个包含listview的活动,在底部有edittext和底部对齐 类似于whatsapp默认活动 当我点击底部的编辑文本时,软键盘会将底部和编辑文本向上推,但它对列表视图的作用不一样,因此列表视图的底部会显示在botton和text视图下 这是我的XML <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com

我有一个包含listview的活动,在底部有edittext和底部对齐 类似于whatsapp默认活动 当我点击底部的编辑文本时,软键盘会将底部和编辑文本向上推,但它对列表视图的作用不一样,因此列表视图的底部会显示在botton和text视图下

这是我的XML

<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="wrap_content"
    android:orientation="vertical"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="com.test.testsms.app.SMSList">

    <ListView
        android:id="@+id/contactList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:dividerHeight="0px"
        android:divider="#00000000"
        >
    </ListView>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <Button
            android:text="@string/app_name"
            android:id="@+id/Button"
            android:layout_alignParentRight="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">
        </Button>

        <EditText

            android:id="@+id/EditText"
            android:layout_width="fill_parent"
            android:layout_toLeftOf="@id/Button"
            android:layout_height="wrap_content">
        </EditText>

</LinearLayout>


</LinearLayout>

如果你想用键盘向上推edittext,你必须设置RelativeLayout而不是main RineEarlayout。所以edittext和按钮中包含的LinearLayout将位于活动的底部。当你点击编辑文本时,键盘会向上推

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_height="fill_parent" 
android:layout_width="fill_parent">

...<ListView>    

<EditText 
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentBottom="true" 
android:selectAllOnFocus="true"
android:textStyle="normal"
>
</EditText> 

</RelativeLayout>

...    

如果你想用键盘向上推edittext,你必须设置RelativeLayout而不是main RineEarlayout。所以edittext和按钮中包含的LinearLayout将位于活动的底部。当你点击编辑文本时,键盘会向上推

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_height="fill_parent" 
android:layout_width="fill_parent">

...<ListView>    

<EditText 
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentBottom="true" 
android:selectAllOnFocus="true"
android:textStyle="normal"
>
</EditText> 

</RelativeLayout>

...    

如果你想用键盘向上推edittext,你必须设置RelativeLayout而不是main RineEarlayout。所以edittext和按钮中包含的LinearLayout将位于活动的底部。当你点击编辑文本时,键盘会向上推

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_height="fill_parent" 
android:layout_width="fill_parent">

...<ListView>    

<EditText 
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentBottom="true" 
android:selectAllOnFocus="true"
android:textStyle="normal"
>
</EditText> 

</RelativeLayout>

...    

如果你想用键盘向上推edittext,你必须设置RelativeLayout而不是main RineEarlayout。所以edittext和按钮中包含的LinearLayout将位于活动的底部。当你点击编辑文本时,键盘会向上推

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_height="fill_parent" 
android:layout_width="fill_parent">

...<ListView>    

<EditText 
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentBottom="true" 
android:selectAllOnFocus="true"
android:textStyle="normal"
>
</EditText> 

</RelativeLayout>

...    

编辑AndroidManifest.xml并添加/修改活动的android:WindowsOfInputMode属性。有关每个选项可以执行的操作的列表,请参见。听起来您可能想尝试编辑AndroidManifest.xml并添加/修改活动的android:WindowsOfInputMode属性。有关每个选项可以执行的操作的列表,请参见。听起来您可能想尝试编辑AndroidManifest.xml并添加/修改活动的android:WindowsOfInputMode属性。有关每个选项可以执行的操作的列表,请参见。听起来您可能想尝试编辑AndroidManifest.xml并添加/修改活动的android:WindowsOfInputMode属性。有关每个选项可以执行的操作的列表,请参见。听起来您可能想尝试使用botton推送编辑文本,但是列表视图的问题它没有推送还没有尝试几件事Dittext已经用botton推送了但是列表视图的问题它没有推送还没有尝试几件事Dittext已经推送了但是列表视图的问题它没有推上还没有尝试几件事它已经推上了,但是列表视图的问题它没有推上还没有尝试几件事