0

Below i paste my layout xml with scroll view. In code it looks ok, layout is wrapped by scroll view and everything should by ok but it isnt. Below i paste print screen of my layout prieview. Anyone can tell me why relativelayout is on half of the screen, and not on full screen? I'm confused:( enter image description here

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    >
<RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#ffffffff"
                android:orientation="vertical">


    <ImageView
        android:id="@+id/IvCenter"
        android:layout_width="fill_parent"
        android:layout_height="240dp"
        />


    <ImageView
        android:id="@+id/IvLine"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="160dp"
        android:src="@drawable/line"/>

    <TextView
        android:id="@+id/tvNazwa"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/IvLine"
        android:layout_centerHorizontal="true"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="20dp"
        android:text="Cechowy"
        android:textColor="#ff0000"
        android:textSize="30dp"
        android:textStyle="bold"/>

    <ImageView
        android:id="@+id/IvLineDivide"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_below="@+id/tvInfo"
        android:layout_gravity="center_horizontal"
        android:src="@drawable/line_divider"/>

    <TextView
        android:id="@+id/tvInfo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/IvLine"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="55dp"
        android:text="Opis"
        android:textColor="#ff000000"
        android:textSize="20dp"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/IvLine"
        android:layout_centerHorizontal="true"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="125dp"
        android:text="Cechowy Bar bez sporów Zmianom, które dokonała znana restauratorka towarzyszyło wiele emocji. Rodzeństwo, które prowadzi Cechowy Bar żyło dotąd w sporze, co odbijało się na pracownikach, serwowanym menu i frekwencji. Spory jednak zażegnała Magda Gessler, postawiła ultimatum i chcąc nie chcąc właściciele Cechowego baru musieli się pogodzić. dziś po dawnych sporach nie pozostał żaden ślad."
        android:textColor="#ff000000"
        android:textSize="15dp"/>

</RelativeLayout>
</ScrollView>
bakusek
  • 135
  • 3
  • 17
  • 1
    Possible duplicate of http://stackoverflow.com/q/10962602/3385212 Just add `android:fillViewport="true"` and don't use `fill_parent` anymore. – tynn Jul 11 '15 at 20:58
  • Yes exactly it solve my problem, thanks a lot! – bakusek Jul 12 '15 at 10:38

0 Answers0