views:

32

answers:

1

Why the last section is not displayed at all? AFAIK It should. It starts with :

<LinearLayout 
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_width="70dip"
android:minWidth="70dp"
android:layout_weight="1">

Thanks in advance.

Full XML layout:

<?xml version="1.0" encoding="utf-8"?>

<View
    android:layout_width="2dip"
    android:layout_height="match_parent"
    android:background="#FF909090" />

<LinearLayout android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="60dp">
    <LinearLayout 
        android:orientation="horizontal"
        android:layout_width="match_parent" 
        android:layout_height="30dp">

        <TextView
            android:layout_width="20dp"
            android:layout_height="30dp"
            android:gravity="center"
            android:layout_weight="0"
            android:text="---"/>

        <TextView android:id="@+id/trainingSegmentReps" 
            android:layout_width="15dip"
            android:layout_height="30dip"
            android:text="3" 
            android:gravity="center"
            android:textSize="6pt"
            android:layout_weight="1"   />
        <TextView 
            android:layout_width="15dip"
            android:layout_height="30dip"
            android:text="x" 
            android:gravity="center"
            android:textSize="6pt"  
            android:layout_weight="1"/>

        <TextView 
            android:id="@+id/trainingSegmentLength" 
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:gravity="center"
            android:text="200"
            android:paddingRight="5dp"
            android:layout_weight="1" />

        <TextView 
            android:id="@+id/trainingSegmentLengthUnit" 
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:gravity="center"
            android:text="m."
            android:layout_weight="1"/>

        <TextView 
            android:id="@+id/trainingSegmentActivity" 
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:gravity="center"
            android:text="Crawl"
            android:paddingLeft="10dp"
            android:layout_weight="1"/>

    </LinearLayout>
    <LinearLayout android:orientation="horizontal"
        android:layout_height="60dp"
        android:layout_width="match_parent">
        <TextView 
            android:id="@+id/trainingSegmentRest" 
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:textSize="8pt"
            android:paddingRight="10dp"
            android:paddingLeft="40dp"
            android:text="12"/>

        <TextView android:id="@+id/trainingSegmentRestUnit" 
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:textSize="8pt"
            android:text="breathes"/>
    </LinearLayout>
</LinearLayout>
<LinearLayout 
    android:orientation="vertical"
    android:layout_height="match_parent"
    android:layout_width="70dip"
    android:minWidth="70dp"
    android:layout_weight="1">
    <TextView android:id="@+id/trainingSegmentTotal" 
                android:layout_height="25dp"
                android:layout_width="match_parent"
                android:textSize="8pt"
                android:text="Total:"
                android:gravity="center"/>
    <TextView android:id="@+id/trainingSegmentTotal"
                android:layout_height="35dp"
                android:layout_width="match_parent"
                android:textSize="8pt"
                android:text="1000 m."
                android:gravity="center"/>
</LinearLayout>

+1  A: 

Has it gone off the bottom of the screen? Layouts don't scroll by default except in some cases (list views etc). Look at ScrollView.

When you find yourself using a lot of nested LinearLayouts it's usually better to switch to a single RelativeLayout.

Nick
RelativeLayout solved this nightmare
Egor