Java 固定线性布局高度尺寸
我有一个线性布局,并为其设置了背景图像:Java 固定线性布局高度尺寸,java,android,android-linearlayout,Java,Android,Android Linearlayout,我有一个线性布局,并为其设置了背景图像: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainlayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/back" android
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainlayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/back"
android:orientation="vertical">
</LinearLayout>
但当android软键盘打开时,我的线性布局会变小,背景图像也会变大!!如何在没有绝对值的情况下固定线性布局高度,如android:layout\u height=500dp?有什么办法吗?你的意思是你想让图像适应整个布局吗是的,但当android键盘打开时,图像将适应android键盘边缘和屏幕顶部之间的尺寸,我不想这样