ScrollView无法填满整个屏幕

时间:2016-07-26 06:43:17

标签: android layout uiscrollview scrollview

我正在尝试在我的Android应用程序中执行一个简单的SrcollView。不幸的是我无法做到这一点,因为SrcollView没有填满屏幕,因此用户无法看到布局的底部。这是我的xml代码:

<?xml version="1.0" encoding="utf-8"?>
<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"
android:fillViewport="true">

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/background"
    android:id="@+id/relativeinfo1">

<View
    android:layout_width="wrap_content"
    android:layout_height="35dp"
    android:layout_above="@+id/titleinfo"
    android:layout_toRightOf="@+id/imageinfo"/>


<TextView
    android:id="@+id/titleinfo"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="30dp"
    android:textSize="20dp"
    android:textStyle="bold"
    android:textColor="#000000"
    android:layout_toRightOf="@+id/imageinfo"
    android:layout_marginLeft="20dp"/>

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:autoLink="phone"
    android:id="@+id/mooobil"/>

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:autoLink="phone"
    android:id="@+id/telefoneeo"/>

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:autoLink="email"
    android:id="@+id/emailese"/>

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:autoLink="web"
    android:id="@+id/honlapese"/>


<ImageView
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:id="@+id/imageinfo"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_marginLeft="10dp"
    android:layout_marginTop="10dp"/>

<View
    android:layout_width="wrap_content"
    android:layout_height="15dp"
    android:id="@+id/view1"
    android:layout_below="@+id/imageinfo"/>

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/cimtext"
    android:textStyle="bold"
    android:text="Cím: "
    android:textSize="15dp"
    android:textColor="#000000"
    android:visibility="invisible"/>


<View
    android:layout_width="wrap_content"
    android:layout_height="10dp"
    android:id="@+id/vonal"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:background="#FFD700" />

<View
    android:layout_width="wrap_content"
    android:layout_height="10dp"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:id="@+id/vonal2"
    android:background="#FFD700"/>

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="10dp"
    tools:context=".MainActivity"
    android:id="@+id/relativemaplayout">

    <fragment
        android:id="@+id/map"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="10dp"
        class="com.google.android.gms.maps.MapFragment" />

</RelativeLayout>

</RelativeLayout>

我可以向下滚动一点,但Google Map的一半以上似乎没有。您有什么想法如何让ScrollView填满整个屏幕,包括地图?

我已经阅读了很多相关内容,是的,我正在使用android:fillViewport="true",但它仍然是错误的。

0 个答案:

没有答案