Ich habe ein Problem. Die vertikalen Trennlinien auf einem LinearLayout werden nicht für mich gerendert. Seltsamerweise rendert es in der Vorschau, aber nicht, wenn die App läuft. Tatsächlich werden die Trennlinien nur angezeigt, wenn ich ein Kind zu einem der LinearLayout-Kinder hinzufüge.LinearLayout Trennlinien nicht Rendering
Der Teiler funktioniert auch in anderen XML-Dateien, aber nicht in diesem.
Jede Hilfe wäre willkommen.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/calendar_inner_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/calendar_hour_col"
android:layout_width="@dimen/column_0"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:background="@drawable/rounded_borders"
android:backgroundTint="@android:color/holo_blue_light"
android:gravity="center_horizontal"/>
<LinearLayout
android:id="@+id/calendar_events_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center_horizontal"
android:layout_toEndOf="@+id/calendar_hour_container"
android:baselineAligned="false"
android:divider="@drawable/vertical_divider"
android:showDividers="middle">
<!-- The dividers here only show if the FrameLayout has children.
However if the FrameLayout is empty, no divider appears. -->
<FrameLayout
android:id="@+id/suday_col"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/mediumGray"/>
<!-- More days etc..-->
</LinearLayout>
</RelativeLayout>
</ScrollView>
Es ist, als ob die FrameLayouts innerhalb der LinearLayouts leer sind. Aber seit ich fillViewPort = true
auf der ScrollView gesetzt habe sollte es den gesamten Bildschirm nicht ausfüllen?