Kleines Layout Problem

S

samarek

Fortgeschrittenes Mitglied
2
Hallo,

ich hab grad ein kleines Problem.

... und zwar habe ich hier ein kleines Layout und ab einer bestimmten Position im XML (siehe Kommentar) werden die Elemente nicht mehr angezeigt und ich blick gerade nicht mehr durch. Erbarmt sich mal grad jemand und sagt mir was da falsch ist?

Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="@dimen/rand" >

    <ImageView 
        android:id="@+id/igvBlinker"
        android:layout_width="@dimen/blinker"
        android:layout_height="@dimen/blinker"
        android:src="@drawable/blinker_rot"
        android:contentDescription="@string/blinkerDescription"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        />
    <TextView 
        android:id="@+id/txvGpsPosition"
        android:text="@string/gpsAus"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@id/igvBlinker"
        android:paddingTop="@dimen/randKlein"
        android:paddingLeft="@dimen/rand"
        style="@style/text_grau"
        />
    
    <LinearLayout 
        android:id="@+id/llaPosition"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/randGross"
        android:orientation="vertical"
        android:layout_below="@id/igvBlinker">
        <TextView 
            android:text="@string/positionsdaten"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/text_schwarz"
            />
<!-- Ab hier wird nichts mehr angezeigt -->
        <LinearLayout 
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            <TextView
                android:text="@string/posLatitude" 
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                style="@style/text_schwarz"
                />
            <TextView 
                android:id="@+id/txvPosLatitude"
                android:text="test"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                style="@style/text_schwarz"
                />
        </LinearLayout>
        <LinearLayout 
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            <TextView
                android:text="@string/posLongitude" 
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                style="@style/text_schwarz"
                />
            <TextView 
                android:id="@+id/txvPosLongitude"
                android:text="test"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                style="@style/text_schwarz"
                />
        </LinearLayout>
    </LinearLayout>

</RelativeLayout>
 
Ich kann es dir nicht genau sagen, währe es aber möglich, dass du fehler in den styles oder dimen hast?
Zum debuggen der Layouts gibe ich jeder Komponente eine andere Hintergrundfarbe. Manchmal sieht man dann wo eine Komponente hin ist.
 
Zuletzt bearbeitet:
an den Styles und Dimensionen kann es eigentlich nicht liegen, die funktionieren an anderen Stellen problemlos ... und da dachte ich mir "Farben ist ja eigentlich quatsch, ich hab ja den graphischen Editor in dem ich gucken kann" und nix is, das oberste TextView füllt die gesamte Höhe, trotz height=wrap_content. Dann stelle ich Hintergrundfarben ein und siehe da, plötzlich ist es nur so hoch wie vorgesehen, wenn ich jetzt also transparenten Hintergrund einstelle geht es. Kann mir das mal jemand erklären?
 
Manchmal ist die Lösung auch ein CLEAN und dann neu Bauen, gerade wenn man viel im XML geändert hat.
 
Ich weiss, hab ich auch probiert, brachte keine Veränderung.
So soll das Layout übrigens aussehen
View.png
 
Zuletzt bearbeitet:

Ähnliche Themen

L
Antworten
4
Aufrufe
1.333
lonnie9020
L
W
  • WuDiDong
Antworten
3
Aufrufe
767
jogimuc
J
A
Antworten
1
Aufrufe
881
koje71
koje71
Zurück
Oben Unten