2014-05-02 23 views
0

我有一个LinearLayout包含一张图片和3 ButtonsImageView尺寸似乎比它小

图片只需要在屏幕的一小部分,然后他们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> 

这里是我的应用程序

Current Look of my app

目前看,我想只是出现下面的图片我的按钮。

有没有办法解决这个问题?

回答

1

添加到您的ImageView带走空间..

android:adjustViewBounds="true"