I have a problem. I have a view with few vertical linearlayout and all of them has backgrounds, in one of them there a four textviews. Three of those textviews has short static text, but one I am filling with text programmatically and this text sometimes is quite long. When the text is longer then ~2300 characters the background of parent linearlayout disappear. And I have no idea why?
My view definition:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/activity_background"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/rounded_white"
android:orientation="vertical"
android:padding="16dp"
android:paddingBottom="30dp"
android:shadowColor="@color/black"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="5" >
Some stuff here...
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/rounded_white"
android:orientation="vertical"
android:padding="16dp"
android:paddingBottom="30dp"
android:shadowColor="@color/black"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="5" >
Some stuff here...
</LinearLayout>
<LinearLayout
android:id="@+id/section_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/rounded_white"
android:orientation="vertical"
android:padding="16dp"
android:paddingBottom="30dp"
android:shadowColor="@color/black"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="5" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:gravity="left|center_vertical"
android:textColor="@color/dark_gray"
style="@style/TextLarge"
android:text="@string/description_header" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="@color/gray"
style="@style/TextSmall"
android:text="@string/from_wiki_monit" />
<TextView
android:id="@+id/description_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:lineSpacingMultiplier="1.2"
android:textColor="@color/dark_gray"
style="@style/TextSmall" />
<TextView
android:id="@+id/description_source_url"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="@color/url_color"
android:linksClickable="true"
style="@style/TextSmall" />
</LinearLayout>
</LinearLayout>
</ScrollView>
Textview with id "description_content" is the long one filled programmatically.
And screenshots (sorry for links but I can't add images):
Edit: Thanks to @Haresh answer, it give me some new thoughts. I took a text with ~2380 characters and when I started to play with padding it turns out that when I change it in the way that the textview height was shorter, then the background was present.
So it looks like after some 'fixed' height of LinearLayout it is missing background.
But still I don't have any clue why it is happening.