Java ImageView大小看起来比实际大小小

Java ImageView大小看起来比实际大小小,java,android,imageview,android-linearlayout,Java,Android,Imageview,Android Linearlayout,我有一个线性布局,其中包含一张图片和3个按钮 图片只占屏幕的一小部分,然后是3个按钮 问题是我必须向下滚动才能看到3个按钮 这张照片拍摄了很多地方 如何让它在一个屏幕上显示所有内容 这是密码 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_paren

我有一个
线性布局
,其中包含一张图片和3个
按钮

图片只占屏幕的一小部分,然后是3个按钮

问题是我必须向下滚动才能看到3个按钮

这张照片拍摄了很多地方

如何让它在一个屏幕上显示所有内容

这是密码

<ScrollView 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">

<LinearLayout 
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

    <ImageView
        android:scaleType="fitXY"
        android:maxHeight="40dp"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:src="@drawable/logooutlast" />

    <Button
        android:layout_marginTop="20dp"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/buttonWalktrough" />

    <Button
        android:layout_marginTop="20dp"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/buttonFullCompletion" />

    <Button
        android:layout_marginTop="20dp"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/buttonInsaneMode" />

</LinearLayout>

以下是我的应用程序的当前外观

我希望我的按钮显示在图片的正下方


有办法解决此问题吗?

将此添加到您的imageView以占用空间

android:adjustViewBounds="true"